Re: [PATCH v2 16/17] fetch: add a --fetch-prune option and fetch.pruneTags config
From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2018-02-09 08:23:34
On Fri, Feb 09 2018, Eric Sunshine jotted:
On Thu, Feb 8, 2018 at 11:19 AM, Ævar Arnfjörð Bjarmason [off-list ref] wrote:quoted
Add a --fetch-prune option to git-fetch, along with fetch.pruneTags config option. [...] Signed-off-by: Ævar Arnfjörð Bjarmason <redacted> ---diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh@@ -592,6 +592,15 @@ test_configured_prune_type () { + if test "$fetch_prune_tags" = 'true' || + test "$remote_origin_prune_tags" = 'true' + then + if ! printf '%s' "$cmdline" | grep -q refs/remotes/origin/Is $cmdline guaranteed to end with a newline? Historically, not all 'grep's would be able to match the last line if it was not properly terminated. Perhaps you want '%s\n' instead?
Good point. No it's not, will fix that.
quoted
+ then + new_cmdline="$new_cmdline refs/tags/*:refs/tags/*" + fi + fi +@@ -705,6 +714,66 @@ test_configured_prune true true unset unset kept pruned \ +# When --prune-tags is supplied it's ignored if an explict refspec iss/explict/explicit/quoted
+# given, same for the configuration options. + +# Pruning that also takes place if s!origin!<file:// url of remote>!, +# or otherwise uses the file://-specific codepath. However, because +# there's no implicit +refs/heads/*:refs/remotes/origin/* refspec and +# supplying it on the command-line negate --prune-tags the branchess/negate/&s/ s/--prune-tags/&,/quoted
+# will not be pruned.
*nod*