This will be used by the merge code.
Signed-off-by: Fredrik Kuivinen <[EMAIL PROTECTED]>
---
read-tree.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
12d226103dc278c5d5aaf6b2dc776af3170ed233
diff --git a/read-tree.c b/read-tree.c
--- a/read-tree.c
+++ b/read-tree.c
@@ -7,6 +7,7 @@
static int stage = 0;
static int update = 0;
+static int ignore_working_dir = 0;
static int unpack_tree(unsigned char *sha1)
{
@@ -80,7 +81,10 @@ static void verify_uptodate(struct cache
{
struct stat st;
- if (!lstat(ce->name, &st)) {
+ if (ignore_working_dir)
+ return;
+
+ if (!lstat(ce->name, &st)) {
unsigned changed = ce_match_stat(ce, &st);
if (!changed)
return;
@@ -510,7 +514,7 @@ static int read_cache_unmerged(void)
return deleted;
}
-static const char read_tree_usage[] = "git-read-tree (<sha> | -m [-u] <sha1>
[<sha2> [<sha3>]])";
+static const char read_tree_usage[] = "git-read-tree (<sha> | -m [-u] [-i]
<sha1> [<sha2> [<sha3>]])";
static struct cache_file cache_file;
@@ -535,6 +539,11 @@ int main(int argc, char **argv)
continue;
}
+ if (!strcmp(arg, "-i")) {
+ ignore_working_dir = 1;
+ continue;
+ }
+
/* This differs from "-m" in that we'll silently ignore
unmerged entries */
if (!strcmp(arg, "--reset")) {
if (stage || merge || emu23)
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html