summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 86118bc)
raw | patch | inline | side by side (parent: 86118bc)
author | Junio C Hamano <junkio@cox.net> | |
Sat, 6 May 2006 00:50:06 +0000 (17:50 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 6 May 2006 00:50:06 +0000 (17:50 -0700) |
It completely forgot to take the prefix into account, so you
had to feed the full path even when you start from a
subdirectory, which was nonsensical.
Signed-off-by: Junio C Hamano <junkio@cox.net>
had to feed the full path even when you start from a
subdirectory, which was nonsensical.
Signed-off-by: Junio C Hamano <junkio@cox.net>
update-index.c | patch | blob | history |
diff --git a/update-index.c b/update-index.c
index 9fa3d2bb96a6e01a6d28fa80efc60871ca32dbf9..1870ac79669142d2c63e30ae035637eb55cf2850 100644 (file)
--- a/update-index.c
+++ b/update-index.c
}
}
-static int do_unresolve(int ac, const char **av)
+static int do_unresolve(int ac, const char **av,
+ const char *prefix, int prefix_length)
{
int i;
int err = 0;
for (i = 1; i < ac; i++) {
const char *arg = av[i];
- err |= unresolve_one(arg);
+ const char *p = prefix_path(prefix, prefix_length, arg);
+ err |= unresolve_one(p);
+ if (p != arg)
+ free((char*)p);
}
return err;
}
break;
}
if (!strcmp(path, "--unresolve")) {
- has_errors = do_unresolve(argc - i, argv + i);
+ has_errors = do_unresolve(argc - i, argv + i,
+ prefix, prefix_length);
if (has_errors)
active_cache_changed = 0;
goto finish;