diff options
author | Daniel Barkalow <barkalow@iabervon.org> | 2008-02-07 11:40:13 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-09 23:16:51 -0800 |
commit | 94a5728cfb593d80164620f8fa7e1ef322ad0025 (patch) | |
tree | 9bdc3b6efece60e4b72a90b3d5c75670dbf4deb8 /builtin-merge-recursive.c | |
parent | 922d87f92f79d76ee1d9027d4a0f8a0cf36d5340 (diff) | |
download | git-94a5728cfb593d80164620f8fa7e1ef322ad0025.tar.gz |
Library function to check for unmerged index entries
It's small, but it was in three places already, so it should be in the
library.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Diffstat (limited to 'builtin-merge-recursive.c')
-rw-r--r-- | builtin-merge-recursive.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/builtin-merge-recursive.c b/builtin-merge-recursive.c index 45d4601533..558a58e4d3 100644 --- a/builtin-merge-recursive.c +++ b/builtin-merge-recursive.c @@ -223,22 +223,11 @@ static int git_merge_trees(int index_only, return rc; } -static int unmerged_index(void) -{ - int i; - for (i = 0; i < active_nr; i++) { - struct cache_entry *ce = active_cache[i]; - if (ce_stage(ce)) - return 1; - } - return 0; -} - struct tree *write_tree_from_memory(void) { struct tree *result = NULL; - if (unmerged_index()) { + if (unmerged_cache()) { int i; output(0, "There are unmerged index entries:"); for (i = 0; i < active_nr; i++) { @@ -1524,7 +1513,7 @@ int merge_trees(struct tree *head, sha1_to_hex(head->object.sha1), sha1_to_hex(merge->object.sha1)); - if (unmerged_index()) { + if (unmerged_cache()) { struct path_list *entries, *re_head, *re_merge; int i; path_list_clear(¤t_file_set, 1); |