author | Gary Gibbons <ggibbons@perforce.com> | |
Fri, 9 Dec 2011 23:48:16 +0000 (18:48 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 12 Dec 2011 05:13:52 +0000 (21:13 -0800) | ||
commit | bf1d68ff4c86f6d6fb3214ae9b0dc9c7ac0ff781 | |
tree | 2d6f597a9df2e7cc6cf95c83a1804c51a713e84d | tree | snapshot |
parent | c145225a35c4975ae922b1906ae07c3fb44b7e07 | commit | diff |
git-p4: use absolute directory for PWD env var
P4 only looks at the environment variable $PWD to figure out
where it is, so chdir() has code to set that every time. But
when the clone --destination is not an absolute path, PWD will
not be absolute and P4 won't be able to find any files expected
to be in the current directory. Fix this by expanding PWD to
an absolute path.
One place this crops up is when using a P4CONFIG environment
variable to specify P4 parameters, such as P4USER or P4PORT.
Setting P4CONFIG=.p4config works for p4 invocations from the
current directory. But if the value of PWD is not absolute, it
fails.
[ update description --pw ]
Signed-off-by: Gary Gibbons <ggibbons@perforce.com>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
P4 only looks at the environment variable $PWD to figure out
where it is, so chdir() has code to set that every time. But
when the clone --destination is not an absolute path, PWD will
not be absolute and P4 won't be able to find any files expected
to be in the current directory. Fix this by expanding PWD to
an absolute path.
One place this crops up is when using a P4CONFIG environment
variable to specify P4 parameters, such as P4USER or P4PORT.
Setting P4CONFIG=.p4config works for p4 invocations from the
current directory. But if the value of PWD is not absolute, it
fails.
[ update description --pw ]
Signed-off-by: Gary Gibbons <ggibbons@perforce.com>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/fast-import/git-p4 | diff | blob | history |