diff options
Diffstat (limited to 'gbp/scripts/pq.py')
-rwxr-xr-x | gbp/scripts/pq.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gbp/scripts/pq.py b/gbp/scripts/pq.py index 945cf1ed..37968edd 100755 --- a/gbp/scripts/pq.py +++ b/gbp/scripts/pq.py @@ -168,8 +168,10 @@ def commit_patches(repo, branch, patches, options, patch_dir): # FIXME: handle case were only the contents of the patches changed added, removed = compare_series(oldpatches, newpatches) msg = format_series_diff(added, removed, options) - repo.add_files(PATCH_DIR) - repo.commit_staged(msg=msg) + + if not repo.is_clean(paths='debian/patches')[0]: + repo.add_files(PATCH_DIR) + repo.commit_staged(msg=msg) return added, removed |