summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorShawn Bohrer <shawn.bohrer@gmail.com>2008-03-13 00:03:23 (GMT)
committerSimon Hausmann <simon@lst.de>2008-03-13 07:57:29 (GMT)
commit67abd417165d1e7716d947949f5e5e27318c8a29 (patch)
tree7966edc1df208b65c75ddce9f3302f1baf59b21c /contrib
parent8ff45f2af5b25b7581072ee7896f4285dfc034ea (diff)
downloadgit-67abd417165d1e7716d947949f5e5e27318c8a29.zip
git-67abd417165d1e7716d947949f5e5e27318c8a29.tar.gz
git-67abd417165d1e7716d947949f5e5e27318c8a29.tar.bz2
git-p4: Unset P4DIFF environment variable when using 'p4 -du diff'
A custom diffing utility can be specified for the 'p4 diff' command by setting the P4DIFF environment variable. However when using a custom diffing utility such as 'vimdiff' passing options like -du can cause unexpected behavior. Since the goal is to generate a unified diff of the changes and attach them to the bottom of the p4 submit log we should unset P4DIFF if it has been set in order to generate the diff properly. Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com> Signed-off-by: Simon Hausmann <simon@lst.de>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/fast-import/git-p42
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 539c5cd..28b9c3c 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -627,6 +627,8 @@ class P4Submit(Command):
if self.interactive:
submitTemplate = self.prepareLogMessage(template, logMessage)
+ if os.environ.has_key("P4DIFF"):
+ del(os.environ["P4DIFF"])
diff = read_pipe("p4 diff -du ...")
for newFile in filesToAdd: