summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8a785dc)
raw | patch | inline | side by side (parent: 8a785dc)
author | Junio C Hamano <gitster@pobox.com> | |
Wed, 19 Mar 2008 05:01:28 +0000 (22:01 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 19 Mar 2008 05:17:22 +0000 (22:17 -0700) |
This fixes the issue identified with recently added tests to t1004
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1004-read-tree-m-u-wf.sh | patch | blob | history | |
unpack-trees.c | patch | blob | history |
index 135614890419363d9cc0e3dce1912b6178f793f4..570d3729bd2312a8d9cf90f3d2e1121a58f43de6 100755 (executable)
'
-test_expect_failure 'funny symlink in work tree, un-unlink-able' '
+test_expect_success 'funny symlink in work tree, un-unlink-able' '
rm -fr a b &&
git reset --hard &&
diff --git a/unpack-trees.c b/unpack-trees.c
index 4b359e0832cc07af7c10322e796ff1ed245c2294..a59f47557a2b3760c27b93fa678697c35211f952 100644 (file)
--- a/unpack-trees.c
+++ b/unpack-trees.c
}
static struct checkout state;
-static void check_updates(struct unpack_trees_options *o)
+static int check_updates(struct unpack_trees_options *o)
{
unsigned cnt = 0, total = 0;
struct progress *progress = NULL;
char last_symlink[PATH_MAX];
struct index_state *index = &o->result;
int i;
+ int errs = 0;
if (o->update && o->verbose_update) {
for (total = cnt = 0; cnt < index->cache_nr; cnt++) {
if (ce->ce_flags & CE_UPDATE) {
ce->ce_flags &= ~CE_UPDATE;
if (o->update) {
- checkout_entry(ce, &state, NULL);
+ errs |= checkout_entry(ce, &state, NULL);
*last_symlink = '\0';
}
}
}
stop_progress(&progress);
+ return errs != 0;
}
static inline int call_unpack_fn(struct cache_entry **src, struct unpack_trees_options *o)
return unpack_failed(o, "Merge requires file-level merging");
o->src_index = NULL;
- check_updates(o);
+ if (check_updates(o))
+ return -1;
if (o->dst_index)
*o->dst_index = o->result;
return 0;