Skip to content
Snippets Groups Projects
Commit 6856f984 authored by Kuang-che Wu's avatar Kuang-che Wu Committed by Mike Frysinger
Browse files

Fix repo mirror with --current-branch

Before a2cd6aea, "repo mirror with --current-branch" fetches git data
using command
    git fetch --progress --update-head-ok cros --tags
No refspec is specified, thus it fetches default refspec, which is +refs/heads/*:refs/heads/*

After a2cd6aea, the fetch command became
     git fetch --progress --update-head-ok cros --tags +refs/tags/*:refs/tags/*
It did not only add tags refspec, but also suppressed the fetching of default refspec.

In other words, repo mirrors doesn't work if current_branch_only=True.
This CL explicitly adds the default refspec to command line if none is
specified.

Bug: https://crbug.com/gerrit/11990
Change-Id: Iadcf7b9aa50f53c47132cfe6c53b3fb2076ebca2
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/246632


Reviewed-by: default avatarDavid Pursehouse <dpursehouse@collab.net>
Reviewed-by: default avatarMike Frysinger <vapier@google.com>
Tested-by: default avatarKuang-che Wu <kcwu@chromium.org>
parent 34bc5712
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment