diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-06-16 14:33:47 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-06-16 14:33:47 -0700 |
commit | dfb67594e964e63f20546361597c06432c73779d (patch) | |
tree | 3ea858127e139ee620a010f4ba82aa95b9fca77c /merge-recursive.c | |
parent | 2cd8ebdd3d28359b7886d994e84a8725394935e7 (diff) | |
parent | 22570b68e3cb9380403d903680be3b3112a26490 (diff) | |
download | git-dfb67594e964e63f20546361597c06432c73779d.tar.gz |
Merge branch 'rs/janitorial' into maint
Code clean-up.
* rs/janitorial:
dir: remove unused variable sb
clean: remove unused variable buf
use file_exists() to check if a file exists in the worktree
Diffstat (limited to 'merge-recursive.c')
-rw-r--r-- | merge-recursive.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index 1c9c30db6c..44d85bea4b 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -611,7 +611,6 @@ static char *unique_path(struct merge_options *o, const char *path, const char * { struct strbuf newpath = STRBUF_INIT; int suffix = 0; - struct stat st; size_t base_len; strbuf_addf(&newpath, "%s~", path); @@ -620,7 +619,7 @@ static char *unique_path(struct merge_options *o, const char *path, const char * base_len = newpath.len; while (string_list_has_string(&o->current_file_set, newpath.buf) || string_list_has_string(&o->current_directory_set, newpath.buf) || - lstat(newpath.buf, &st) == 0) { + file_exists(newpath.buf)) { strbuf_setlen(&newpath, base_len); strbuf_addf(&newpath, "_%d", suffix++); } |