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>
This commit is contained in:

committed by
Junio C Hamano

parent
9688460152
commit
913c983e04
@ -404,9 +404,9 @@ static int unresolve_one(const char *path)
|
|||||||
|
|
||||||
static void read_head_pointers(void)
|
static void read_head_pointers(void)
|
||||||
{
|
{
|
||||||
if (read_ref(git_path("HEAD"), head_sha1))
|
if (read_ref("HEAD", head_sha1))
|
||||||
die("No HEAD -- no initial commit yet?\n");
|
die("No HEAD -- no initial commit yet?\n");
|
||||||
if (read_ref(git_path("MERGE_HEAD"), merge_head_sha1)) {
|
if (read_ref("MERGE_HEAD", merge_head_sha1)) {
|
||||||
fprintf(stderr, "Not in the middle of a merge.\n");
|
fprintf(stderr, "Not in the middle of a merge.\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
@ -443,7 +443,7 @@ static int do_reupdate(int ac, const char **av,
|
|||||||
int has_head = 1;
|
int has_head = 1;
|
||||||
const char **pathspec = get_pathspec(prefix, av + 1);
|
const char **pathspec = get_pathspec(prefix, av + 1);
|
||||||
|
|
||||||
if (read_ref(git_path("HEAD"), head_sha1))
|
if (read_ref("HEAD", head_sha1))
|
||||||
/* If there is no HEAD, that means it is an initial
|
/* If there is no HEAD, that means it is an initial
|
||||||
* commit. Update everything in the index.
|
* commit. Update everything in the index.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user