diff options
author | Simon Hausmann <shausman@trolltech.com> | 2007-05-21 10:08:11 +0200 |
---|---|---|
committer | Simon Hausmann <shausman@trolltech.com> | 2007-05-21 10:08:11 +0200 |
commit | cbf5efa61a30d6454f5739cee3498f98a01210da (patch) | |
tree | 204b5a6d63cf859b382bb5aefdca1dce5abdd261 /contrib/fast-import/git-p4 | |
parent | Fix git symbolic-ref warning on initial clone (diff) | |
download | tgif-cbf5efa61a30d6454f5739cee3498f98a01210da.tar.xz |
Detect with git-p4 submit --direct when there are no changes in the working directory
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
Diffstat (limited to 'contrib/fast-import/git-p4')
-rwxr-xr-x | contrib/fast-import/git-p4 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index 35a513fcb8..f08ee6da44 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -386,6 +386,9 @@ class P4Submit(Command): if self.directSubmit: self.diffStatus = mypopen("git diff -r --name-status HEAD").readlines() + if len(self.diffStatus) == 0: + print "No changes in working directory to submit." + return True patch = mypopen("git diff -p --binary --diff-filter=ACMRTUXB HEAD").read() self.diffFile = gitdir + "/p4-git-diff" f = open(self.diffFile, "wb") |