Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2020-04-01 16:03:36 +0300
committerChristian Couder <chriscool@tuxfamily.org>2020-04-02 09:04:25 +0300
commitd077adf2bc521caa2319cdddcfef74abb99699de (patch)
tree234262348e192a39c70d828eccc89b7ac8951115
parent45ed32c5c0836ab104f94fa6c886eb5b8b203b22 (diff)
Disable advice.objectNameWarning when rebasingcc-disable-advice-object-name-warning
It looks like some of our tests are sometimes triggering this advice and then failing because they didn't expect it. For example this is a test error we get: --- FAIL: TestFailedUserRebaseConfirmableDueToGitError (0.17s) rebase_test.go:390: Error Trace: rebase_test.go:390 Error: "Auto-merging README.md CONFLICT (content): Merge conflict in README.md From ssh://gitaly/internal * branch master -> FETCH_HEAD warning: refname '1942eed5cc108b19c7405106e81fa96125d0be22' is ambiguous. Git normally never creates a ref that ends with 40 hex characters because it will be ignored when you just specify 40-hex. These refs may be created by mistake. For example, git switch -c $br $(git rev-parse ...) where "$br" is somehow empty and a 40-hex ref is created. Please examine these refs and maybe delete them. Turn this message off by running "git config advice.objectNameWarning false" error: could not apply eb8f5fb... Make whitespace changes versão 5.5 Resolve all conflicts manually, mark them as resolved with "git add/rm <conflicted_files>", then run "git rebase --continue". You can instead skip this commit: run "git rebase --skip". To abort and get back to the state before "git rebase", run "git rebase --abort". Could not apply eb8f5fb... Make whitespace changes versão 5.5 " does not contain "error: Failed to merge in the changes."
-rw-r--r--changelogs/unreleased/cc-disable-advice-object-name-warning.yml5
-rw-r--r--ruby/lib/gitlab/git/repository.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/changelogs/unreleased/cc-disable-advice-object-name-warning.yml b/changelogs/unreleased/cc-disable-advice-object-name-warning.yml
new file mode 100644
index 000000000..97c650c87
--- /dev/null
+++ b/changelogs/unreleased/cc-disable-advice-object-name-warning.yml
@@ -0,0 +1,5 @@
+---
+title: Disable advice.objectNameWarning when rebasing
+merge_request: 2001
+author:
+type: fixed
diff --git a/ruby/lib/gitlab/git/repository.rb b/ruby/lib/gitlab/git/repository.rb
index dcc75e7b1..54c3af749 100644
--- a/ruby/lib/gitlab/git/repository.rb
+++ b/ruby/lib/gitlab/git/repository.rb
@@ -371,7 +371,7 @@ module Gitlab
with_worktree(worktree, branch, sparse_checkout_files: diff_files, env: env) do
run_git!(
- %W[pull --rebase #{remote_repo_path} #{remote_branch}],
+ %W[-c advice.objectNameWarning=false pull --rebase #{remote_repo_path} #{remote_branch}],
chdir: worktree.path, env: env, include_stderr: true
)