tags 726260 + patch kthxbye On Mon, Oct 14, 2013 at 10:29:58AM +0200, Guido Günther wrote: > Thanks for the update! I've read about --porcelain but didn't look take > the time to look when it was introduced, it's form before 2009 so we can > safely use it. A traditional diff is fine.
Attached is a patch to fix this issue. I've tested it and it seems to work fine. -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
diff --git a/gbp/git/repository.py b/gbp/git/repository.py index 4a58eea..d41af9c 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -775,9 +775,7 @@ class GitRepository(object): if self.bare: return (True, '') - clean_msg = 'nothing to commit' - - args = GitArgs() + args = GitArgs('--porcelain') args.add_true(ignore_untracked, '-uno') out, ret = self._git_getoutput('status', @@ -785,14 +783,9 @@ class GitRepository(object): extra_env={'LC_ALL': 'C'}) if ret: raise GbpError("Can't get repository status") - ret = False - for line in out: - if line.startswith('#'): - continue - if line.startswith(clean_msg): - ret = True - break - return (ret, "".join(out)) + out = "".join(out) + ret = not out + return (ret, out) def clean(self, directories=False, force=False, dry_run=False): """
signature.asc
Description: Digital signature