summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c60b528)
raw | patch | inline | side by side (parent: c60b528)
author | Junio C Hamano <gitster@pobox.com> | |
Mon, 14 Jan 2008 21:54:24 +0000 (13:54 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 14 Jan 2008 21:54:24 +0000 (13:54 -0800) |
This reverts commit 16335fdd7ace78a8285ba25fd7a81177a48e7c9b.
We are calling overlay_tree_on_cache() which does use CE_UPDATE
flag to mark duplicated entries, which is the same as the
codepath in git-ls-files with its --with-tree option.
Because the pathname ce->name is given to path_list_insert()
which does not allow duplicates, there is no breakage either way
from the correctness point of view in this codepath, unlike the
one in ls-files. But avoiding unnecessary processing with a
single bit check is certainly better.
We are calling overlay_tree_on_cache() which does use CE_UPDATE
flag to mark duplicated entries, which is the same as the
codepath in git-ls-files with its --with-tree option.
Because the pathname ce->name is given to path_list_insert()
which does not allow duplicates, there is no breakage either way
from the correctness point of view in this codepath, unlike the
one in ls-files. But avoiding unnecessary processing with a
single bit check is certainly better.
builtin-commit.c | patch | blob | history |
diff --git a/builtin-commit.c b/builtin-commit.c
index 265ba6bcd4586f11efc17d17b9ee4520edd04060..6d2ca808b55136b60e65994e8929c3a068b425d6 100644 (file)
--- a/builtin-commit.c
+++ b/builtin-commit.c
for (i = 0; i < active_nr; i++) {
struct cache_entry *ce = active_cache[i];
+ if (ce->ce_flags & htons(CE_UPDATE))
+ continue;
if (!pathspec_match(pattern, m, ce->name, 0))
continue;
path_list_insert(ce->name, list);