summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2018-02-19 15:11:10 +0000
committerSean McGivern <sean@gitlab.com>2018-02-19 15:11:10 +0000
commit01f5035bfe2c2fa6cc71564e8a02fbcb325e3370 (patch)
tree6324c9da14c4e7e6438c36ddc3729b50c82e7117 /lib
parent0b032daa11d5ea140f2eea99fa10b21da4b50f0b (diff)
downloadgitlab-ce-01f5035bfe2c2fa6cc71564e8a02fbcb325e3370.tar.gz
Fix squash with renamed filesfix-squash-with-renamed-files
We need to ignore the names for renamed files when configuring with sparse checkout.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/git/repository.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index a10bc0dd32b..4261f028d35 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -2188,7 +2188,7 @@ module Gitlab
)
diff_range = "#{start_sha}...#{end_sha}"
diff_files = run_git!(
- %W(diff --name-only --diff-filter=a --binary #{diff_range})
+ %W(diff --name-only --diff-filter=ar --binary #{diff_range})
).chomp
with_worktree(squash_path, branch, sparse_checkout_files: diff_files, env: env) do