Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Extend git-has-nothing-to-commit detection

Git may report empty commit sets also as "nothing added to commit".
Catch this as well so that we raise no false exceptions.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
  • Loading branch information...
commit 46c028a708eccb8ab5d349127b16f94d6cad75ce 1 parent 5962f4d
@jan-kiszka jan-kiszka authored committed
Showing with 2 additions and 1 deletion.
  1. +2 −1  rebase.py
View
3  rebase.py
@@ -8,6 +8,7 @@
from fnmatch import fnmatch
from clearcase import cc
from cache import Cache, CCFile
+from re import search
"""
Things remaining:
@@ -178,7 +179,7 @@ def getUserEmail(user):
try:
git_exec(['commit', '-m', comment], env=env)
except Exception as e:
- if not e.args[0].find('nothing to commit') >= 0:
+ if search('nothing( added)? to commit', e.args[0]) == None:
raise
def cc_file(file, version):
Please sign in to comment.
Something went wrong with that request. Please try again.