Re: [PATCH v2 16/17] fetch: add a --fetch-prune option and fetch.pruneTags config
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Feb 9, 2018, 06:58 UTC
- Message-ID
- <CAPig+cS3OCi9CDykF-5EAx=J3ouXPo+7HE_CB8DfmWccBxyxgA@mail.gmail.com>
- In-Reply-To
- <20180208161936.8196-17-avarab@gmail.com>
On Thu, Feb 8, 2018 at 11:19 AM, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 11 quoted lines
> Add a --fetch-prune option to git-fetch, along with fetch.pruneTags
> config option. [...]
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
> 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?
Show 7 quoted lines
> + 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 is
s/explict/explicit/
Show 6 quoted lines
> +# 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 branches
s/negate/&s/ s/--prune-tags/&,/
> +# will not be pruned.