From 39003be207b8d6fe57206373587b57c20a38b06f Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 10 Aug 2018 15:25:31 +0100 Subject: [PATCH] git-debrebase: read_tree_upstream: New option $keep_patches NFC with existing callers. Signed-off-by: Ian Jackson --- git-debrebase | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-debrebase b/git-debrebase index ad20e4b6..66cbb58e 100755 --- a/git-debrebase +++ b/git-debrebase @@ -261,12 +261,12 @@ sub read_tree_debian ($) { rm_subdir_cached 'debian/patches'; } -sub read_tree_upstream ($) { - my ($treeish) = @_; +sub read_tree_upstream ($;$) { + my ($treeish, $keep_patches) = @_; my $save = cmdoutput @git, qw(write-tree --prefix=debian/); runcmd @git, qw(read-tree), $treeish; read_tree_subdir 'debian', $save; - rm_subdir_cached 'debian/patches'; + rm_subdir_cached 'debian/patches' unless $keep_patches; }; sub make_commit ($$) { -- 2.30.2