summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e1464ca)
raw | patch | inline | side by side (parent: e1464ca)
author | Johannes Sixt <johannes.sixt@telecom.at> | |
Mon, 21 Jul 2008 19:19:53 +0000 (21:19 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 26 Jul 2008 00:41:13 +0000 (17:41 -0700) |
$(gitexecdir) (as defined in the Makefile) has gained another path
component, but the relative paths in the MINGW section of the Makefile,
which are interpreted relative to it, do not account for it.
Instead of adding another ../ in front of the path, we change the code that
constructs the absolute paths to do it relative to the command's directory,
which is essentially $(bindir). We do it this way because we will also
allow a relative $(gitexecdir) later.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
component, but the relative paths in the MINGW section of the Makefile,
which are interpreted relative to it, do not account for it.
Instead of adding another ../ in front of the path, we change the code that
constructs the absolute paths to do it relative to the command's directory,
which is essentially $(bindir). We do it this way because we will also
allow a relative $(gitexecdir) later.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile | patch | blob | history | |
exec_cmd.c | patch | blob | history |
diff --git a/Makefile b/Makefile
index e096763060a71e24aab648fc65b1dbaac105fb50..fa8cf8adb69262a2033c1b2e1c815e9816480142 100644 (file)
--- a/Makefile
+++ b/Makefile
### Installation rules
ifeq ($(firstword $(subst /, ,$(template_dir))),..)
-template_instdir = $(gitexecdir)/$(template_dir)
+template_instdir = $(bindir)/$(template_dir)
else
template_instdir = $(template_dir)
endif
diff --git a/exec_cmd.c b/exec_cmd.c
index dedb01da6f1b7e98edb0ce4459039f6825e024da..45f92eb164f5680c224b2f96f146912224e7b03d 100644 (file)
--- a/exec_cmd.c
+++ b/exec_cmd.c
const char *system_path(const char *path)
{
- if (!is_absolute_path(path)) {
+ if (!is_absolute_path(path) && argv0_path) {
struct strbuf d = STRBUF_INIT;
- strbuf_addf(&d, "%s/%s", git_exec_path(), path);
+ strbuf_addf(&d, "%s/%s", argv0_path, path);
path = strbuf_detach(&d, NULL);
}
return path;