summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0def5b6)
raw | patch | inline | side by side (parent: 0def5b6)
author | Matthieu Moy <Matthieu.Moy@imag.fr> | |
Thu, 7 Jan 2010 14:54:10 +0000 (15:54 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 12 Jan 2010 23:48:24 +0000 (15:48 -0800) |
When calling a git command from a subdirectory and a file locking fails,
the user will get a path relative to the root of the worktree, which is
invalid from the place where the command is ran. Make it easy for the
user to know which file it is.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
the user will get a path relative to the root of the worktree, which is
invalid from the place where the command is ran. Make it easy for the
user to know which file it is.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
lockfile.c | patch | blob | history |
diff --git a/lockfile.c b/lockfile.c
index 6851fa55a503bd24dd204934d7433e306996ce09..b0d74cdddee2407de590cb9f725e8e24093d9d35 100644 (file)
--- a/lockfile.c
+++ b/lockfile.c
"If no other git process is currently running, this probably means a\n"
"git process crashed in this repository earlier. Make sure no other git\n"
"process is running and remove the file manually to continue.",
- path, strerror(err));
+ make_nonrelative_path(path), strerror(err));
} else
- strbuf_addf(&buf, "Unable to create '%s.lock': %s", path, strerror(err));
+ strbuf_addf(&buf, "Unable to create '%s.lock': %s",
+ make_nonrelative_path(path), strerror(err));
return strbuf_detach(&buf, NULL);
}