Detect with git-p4 submit --direct when there are no changes in the working directory
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
This commit is contained in:
parent
faf1bd2026
commit
cbf5efa61a
@ -386,6 +386,9 @@ class P4Submit(Command):
|
|||||||
|
|
||||||
if self.directSubmit:
|
if self.directSubmit:
|
||||||
self.diffStatus = mypopen("git diff -r --name-status HEAD").readlines()
|
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()
|
patch = mypopen("git diff -p --binary --diff-filter=ACMRTUXB HEAD").read()
|
||||||
self.diffFile = gitdir + "/p4-git-diff"
|
self.diffFile = gitdir + "/p4-git-diff"
|
||||||
f = open(self.diffFile, "wb")
|
f = open(self.diffFile, "wb")
|
||||||
|
Loading…
Reference in New Issue
Block a user