@matheusbsbs / matheus-bagliano / commits / 913c983e04
Fork 0

Fix git-update-index --again

It called read_ref(git_path(..)..), where read_ref does the git_path() stuff itself. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>

Johannes Schindelin committed Sep 21, 2006 at 23:29 UTC 913c983e0481b477ccc11fa72ebeb0d6ec8d06aa
1 file changed +3 -3
builtin-update-index.c
+3 -3
@@ -404,9 +404,9 @@ static int unresolve_one(const char *path)
404
405 static void read_head_pointers(void)
406 {
407 - if (read_ref(git_path("HEAD"), head_sha1))
407 + if (read_ref("HEAD", head_sha1))
408 die("No HEAD -- no initial commit yet?\n");
409 - if (read_ref(git_path("MERGE_HEAD"), merge_head_sha1)) {
409 + if (read_ref("MERGE_HEAD", merge_head_sha1)) {
410 fprintf(stderr, "Not in the middle of a merge.\n");
411 exit(0);
412 }
@@ -443,7 +443,7 @@ static int do_reupdate(int ac, const char **av,
443 int has_head = 1;
444 const char **pathspec = get_pathspec(prefix, av + 1);
445
446 - if (read_ref(git_path("HEAD"), head_sha1))
446 + if (read_ref("HEAD", head_sha1))
447 /* If there is no HEAD, that means it is an initial
448 * commit. Update everything in the index.
449 */