dch: make sure branch is always defined
authorGuido Günther <agx@sigxcpu.org>
Thu, 2 May 2013 19:35:10 +0000 (21:35 +0200)
committerGuido Günther <agx@sigxcpu.org>
Thu, 2 May 2013 19:36:52 +0000 (21:36 +0200)
This fixes a problem when running git-dch form a detached HEAD

gbp/scripts/dch.py

index 12eae36..9b73b24 100644 (file)
@@ -271,6 +271,7 @@ def main(argv):
     until = 'HEAD'
     found_snapshot_header = False
     version_change = {}
+    branch = None
 
     try:
         parser = GbpOptionParserDebian(command=os.path.basename(argv[0]), prefix='',