On Thu, Feb 8, 2018 at 11:19 AM, Ævar Arnfjörð Bjarmason
<ava...@gmail.com> wrote:
> Add a --fetch-prune option to git-fetch, along with fetch.pruneTags
> config option. [...]
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <ava...@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?

> +                       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/

> +# 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.

Reply via email to