diff options
author | Guido Günther <agx@sigxcpu.org> | 2010-09-14 08:52:39 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2010-09-14 08:53:47 +0200 |
commit | af977814839275395f9c747b32611da712cf443d (patch) | |
tree | b1c0eafe0f22f696d5f225a12d136490467c8be7 | |
parent | 257a3e1f5aae069079db174ffa23c832643a485d (diff) | |
download | git-buildpackage-af977814839275395f9c747b32611da712cf443d.tar.gz git-buildpackage-af977814839275395f9c747b32611da712cf443d.tar.bz2 git-buildpackage-af977814839275395f9c747b32611da712cf443d.zip |
Avoid unnecessary branch switch
when fixing the previous issues.
LP: #637286
-rwxr-xr-x | git-import-dsc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/git-import-dsc b/git-import-dsc index 06747d5e..1a5d10b9 100755 --- a/git-import-dsc +++ b/git-import-dsc @@ -261,8 +261,9 @@ def main(argv): apply_debian_patch(repo, unpack_dir, src, options, parents) else: print >>sys.stderr, "Warning: Didn't find a diff to apply." - repo.set_branch(options.debian_branch) - repo.force_head(options.debian_branch, hard=True) + if repo.get_branch() == options.debian_branch: + # Update HEAD if we modified the checkout out branch + repo.force_head(options.debian_branch, hard=True) except KeyboardInterrupt: ret = 1 print >>sys.stderr, "Interrupted. Aborting." |