On Tue, Mar 03, 2009 at 03:03:56PM +0100, Luca Capello wrote:
> l...@gismo:~/linux-2.6-openmoko(git)[debian]$ git-buildpackage
> You have uncommitted changes in your source tree:
> # On branch debian
> # Your branch and 'origin/andy-tracking' have diverged,
> # and have 363 and 43986 different commit(s) each, respectively.
> #
> nothing to commit (working directory clean)
>
> Use --git-ignore-new to ignore.
> l...@gismo:~/linux-2.6-openmoko(git)[debian]$
> =====
The attached patch should fix your problem.
-- Guido
>From b0b7fcfa01759672c569c167f5ce22bcbe18925b Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Guido=20G=C3=BCnther?= <[email protected]>
Date: Tue, 3 Mar 2009 19:20:37 +0100
Subject: [PATCH] Skip all comments before looking for clean_msg
Closes: #518008
---
gbp/git_utils.py | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/gbp/git_utils.py b/gbp/git_utils.py
index 193efeb..c2c0f8f 100644
--- a/gbp/git_utils.py
+++ b/gbp/git_utils.py
@@ -77,16 +77,12 @@ class GitRepository(object):
clean_msg = 'nothing to commit'
out = self.__git_getoutput('status')[0]
ret = False
- if out[0].startswith('#'):
- try:
- if out[1].strip().startswith(clean_msg):
+ for line in out:
+ while line.startswith('#'):
+ continue
+ if line.startswith(clean_msg):
ret = True
- elif out[3].strip().startswith(clean_msg):
- ret = True
- except IndexError:
- pass
- elif out[0].strip().startswith(clean_msg): # git << 1.5
- ret = True
+ break
return (ret, "".join(out))
def is_empty(self):
--
1.6.2.rc0