diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-11-29 23:11:22 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-11-29 23:11:22 -0800 |
commit | 44148f2daf6e1ac3fe087dd07da2930411b3bcf2 (patch) | |
tree | dd8fa69cd7023f8cb1f4fd517701272fcb6e4f94 /unpack-trees.c | |
parent | builtin-merge.c: call exclude_cmds() correctly. (diff) | |
parent | Update draft release notes to 1.6.6 before merging topics for -rc1 (diff) | |
download | tgif-44148f2daf6e1ac3fe087dd07da2930411b3bcf2.tar.xz |
Merge remote branch 'ko/master' into HEAD
* ko/master: (366 commits)
Update draft release notes to 1.6.6 before merging topics for -rc1
Makefile: do not clean arm directory
Add a notice that only certain functions can print color escape codes
builtin-apply.c: pay attention to -p<n> when determining the name
gitworkflows: Consistently back-quote git commands
Explicitly truncate bswap operand to uint32_t
t1200: fix a timing dependent error
Documentation: update descriptions of revision options related to '--bisect'
Enable support for IPv6 on MinGW
Refactor winsock initialization into a separate function
t/gitweb-lib: Split HTTP response with non-GNU sed
pack-objects: split implications of --all-progress from progress activation
instaweb: restart server if already running
prune-packed: only show progress when stderr is a tty
remote-curl.c: fix rpc_out()
Protect scripted Porcelains from GREP_OPTIONS insanity
mergetool--lib: simplify guess_merge_tool()
strbuf_add_wrapped_text(): skip over colour codes
t4014-format-patch: do not assume 'test' is available as non-builtin
Fix over-simplified documentation for 'git log -z'
...
Diffstat (limited to 'unpack-trees.c')
-rw-r--r-- | unpack-trees.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/unpack-trees.c b/unpack-trees.c index 720f7a1616..dd5999c356 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -277,6 +277,17 @@ static int unpack_nondirectories(int n, unsigned long mask, return 0; } +static int unpack_failed(struct unpack_trees_options *o, const char *message) +{ + discard_index(&o->result); + if (!o->gently) { + if (message) + return error("%s", message); + return -1; + } + return -1; +} + static int unpack_callback(int n, unsigned long mask, unsigned long dirmask, struct name_entry *names, struct traverse_info *info) { struct cache_entry *src[MAX_UNPACK_TREES + 1] = { NULL, }; @@ -294,7 +305,7 @@ static int unpack_callback(int n, unsigned long mask, unsigned long dirmask, str int cmp = compare_entry(ce, info, p); if (cmp < 0) { if (unpack_index_entry(ce, o) < 0) - return -1; + return unpack_failed(o, NULL); continue; } if (!cmp) { @@ -352,17 +363,6 @@ static int unpack_callback(int n, unsigned long mask, unsigned long dirmask, str return mask; } -static int unpack_failed(struct unpack_trees_options *o, const char *message) -{ - discard_index(&o->result); - if (!o->gently) { - if (message) - return error("%s", message); - return -1; - } - return -1; -} - /* * N-way merge "len" trees. Returns 0 on success, -1 on failure to manipulate the * resulting index, -2 on failure to reflect the changes to the work tree. @@ -617,7 +617,7 @@ static int verify_absent(struct cache_entry *ce, const char *action, * found "foo/." in the working tree. * This is tricky -- if we have modified * files that are in "foo/" we would lose - * it. + * them. */ ret = verify_clean_subdirectory(ce, action, o); if (ret < 0) @@ -895,7 +895,7 @@ int threeway_merge(struct cache_entry **stages, struct unpack_trees_options *o) * Two-way merge. * * The rule is to "carry forward" what is in the index without losing - * information across a "fast forward", favoring a successful merge + * information across a "fast-forward", favoring a successful merge * over a merge failure when it makes sense. For details of the * "carry forward" rule, please see <Documentation/git-read-tree.txt>. * |