aboutsummaryrefslogtreecommitdiffstats
path: root/read-tree.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-10 11:32:54 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-10 11:32:54 -0700
commit121481abf8d752ef871821d4ab9a3747595d86ae (patch)
tree6722a6e40e1edeeec7cd4c527a16a51553074130 /read-tree.c
parentd6d3f9d0125a7215f3cdc2600b2307ca55b69536 (diff)
downloadgit-121481abf8d752ef871821d4ab9a3747595d86ae.tar.gz
Make "update-cache" a bit friendlier to use (and harder to mis-use).
It now requires the "--add" flag before you add any new files, and a "--remove" file if you want to mark files for removal. And giving it the "--refresh" flag makes it just update all the files that it already knows about.
Diffstat (limited to 'read-tree.c')
-rw-r--r--read-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/read-tree.c b/read-tree.c
index 6862d10126..5784802e94 100644
--- a/read-tree.c
+++ b/read-tree.c
@@ -18,7 +18,7 @@ static int read_one_entry(unsigned char *sha1, const char *base, int baselen, co
memcpy(ce->name, base, baselen);
memcpy(ce->name + baselen, pathname, len+1);
memcpy(ce->sha1, sha1, 20);
- return add_cache_entry(ce);
+ return add_cache_entry(ce, 1);
}
static int read_tree(unsigned char *sha1, const char *base, int baselen)