Skip to content

Commit

Permalink
Detect with git-p4 submit --direct when there are no changes in the w…
Browse files Browse the repository at this point in the history
…orking directory

Signed-off-by: Simon Hausmann <shausman@trolltech.com>
  • Loading branch information
Simon Hausmann committed May 21, 2007
1 parent faf1bd2 commit cbf5efa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contrib/fast-import/git-p4
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit cbf5efa

Please sign in to comment.