From 88916904b66e7866b0fd496adfe4b3acf0c77afe Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 21 May 2007 10:08:11 +0200 Subject: [PATCH] Detect with git-p4 submit --direct when there are no changes in the working directory --- git-p4 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/git-p4 b/git-p4 index 35a513f..f08ee6d 100755 --- a/git-p4 +++ b/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") -- 2.11.4.GIT