summaryrefslogtreecommitdiff
path: root/rerere.c
diff options
context:
space:
mode:
authorThiago Farina <tfransosi@gmail.com>2010-07-04 16:46:19 -0300
committerJunio C Hamano <gitster@pobox.com>2010-07-05 11:47:57 -0700
commit183113a5ca99cb228b2ba0a29e53f1ac11f2c7c2 (patch)
tree2ab3a6f27ab3e8857cf3b5a825435f7bf6ed5b72 /rerere.c
parent8a57c6e9437eeebf849f0def03389078a510312e (diff)
downloadgit-183113a5ca99cb228b2ba0a29e53f1ac11f2c7c2.tar.gz
string_list: Add STRING_LIST_INIT macro and make use of it.
Acked-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'rerere.c')
-rw-r--r--rerere.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/rerere.c b/rerere.c
index d03a69634b..78bbcf1403 100644
--- a/rerere.c
+++ b/rerere.c
@@ -426,8 +426,8 @@ static int update_paths(struct string_list *update)
static int do_plain_rerere(struct string_list *rr, int fd)
{
- struct string_list conflict = { NULL, 0, 0, 1 };
- struct string_list update = { NULL, 0, 0, 1 };
+ struct string_list conflict = STRING_LIST_INIT_DUP;
+ struct string_list update = STRING_LIST_INIT_DUP;
int i;
find_conflict(&conflict);
@@ -547,7 +547,7 @@ int setup_rerere(struct string_list *merge_rr, int flags)
int rerere(int flags)
{
- struct string_list merge_rr = { NULL, 0, 0, 1 };
+ struct string_list merge_rr = STRING_LIST_INIT_DUP;
int fd;
fd = setup_rerere(&merge_rr, flags);
@@ -585,8 +585,8 @@ static int rerere_forget_one_path(const char *path, struct string_list *rr)
int rerere_forget(const char **pathspec)
{
int i, fd;
- struct string_list conflict = { NULL, 0, 0, 1 };
- struct string_list merge_rr = { NULL, 0, 0, 1 };
+ struct string_list conflict = STRING_LIST_INIT_DUP;
+ struct string_list merge_rr = STRING_LIST_INIT_DUP;
if (read_cache() < 0)
return error("Could not read index");