summaryrefslogtreecommitdiff
path: root/Documentation/git-check-ref-format.txt
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2020-11-14 13:21:30 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-11-16 12:54:43 -0800
commit1c1518071c7fa79de13b8c599d8dbb371950b033 (patch)
treefa6ad9366253a8f89a5f8480d9f7faf2cb457dd3 /Documentation/git-check-ref-format.txt
parentGit 2.29.2 (diff)
downloadtgif-1c1518071c7fa79de13b8c599d8dbb371950b033.tar.xz
submodule: use "fetch" logic instead of custom remote discovery
Replace a use of the get_default_remote() function with an invocation of "git fetch" The "fetch" command already has logic to discover the remote for the current branch. However, before it learned to accept a custom refspec *and* use its idea of the default remote, it wasn't possible to get rid of some equivalent of the "get_default_remote" invocation here. As it turns out the recently added "--stdin" option to fetch[1] gives us a way to do that. Let's use it instead. While I'm at it simplify the "fetch_in_submodule" function. It wasn't necessary to pass "$@" to "fetch" since we'd only ever provide one SHA-1 as an argument in the previous "*" codepath (in addition to "--depth=N"). Rewrite the function to more narrowly reflect its use-case. 1. https://lore.kernel.org/git/87eekwf87n.fsf@evledraar.gmail.com/ Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-check-ref-format.txt')
0 files changed, 0 insertions, 0 deletions