All of lore.kernel.org
 help / color / mirror / Atom feed
From: "ZheNing Hu via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>,
	ZheNing Hu <adlternative@gmail.com>
Subject: [PATCH 0/4] ref-filter: fix %(symref) for pretty_print_ref()
Date: Mon, 20 Sep 2021 07:37:52 +0000	[thread overview]
Message-ID: <pull.1042.git.1632123476.gitgitgadget@gmail.com> (raw)

Because pretty_print_ref() currently has no ref_item flag, but the
implementation of %(symref) need this flag, so git tag --verify or git
verify-tag cannot get the output of %(symref). Therefore, %(symref) will be
fixed in this patch series.

This bug was discovered by Peff here:
https://lore.kernel.org/git/YUO63qy2%2F5wibY4%2F@coredump.intra.peff.net/

on the other hand, git tag --verify --format="%(refname)" or git verify-tag
--forrmat="%(refname)" does not show the fullref name, but seems to be
similar to using %(refname:lstrip=2).

And git verify-tag --format="verify: %(refname)" c06b72d02` will output:
"verify: c06b72d02". They are wrong features, but because some scripts are
using them, so our current approach is to keep them.

ZheNing Hu (4):
  refs: let repo_dwim_ref() learn get symref itself and ref flags
  ref-filter: provide ref_flags to pretty_print_ref()
  verify_tag: use repo_dwim_ref() to get ref fullname and ref_flags
  ref-filter: let tag verify use %(refname:lstrip=2) by default

 builtin/tag.c         | 16 ++++++++-------
 builtin/verify-tag.c  |  9 ++++++++-
 object-name.c         |  6 +++---
 ref-filter.c          | 47 +++++++++++++++++++++++++++++++++----------
 ref-filter.h          |  4 +++-
 refs.c                | 15 +++++++++-----
 refs.h                |  8 +++++---
 t/t7030-verify-tag.sh | 23 +++++++++++++++++++++
 upload-pack.c         |  2 +-
 9 files changed, 98 insertions(+), 32 deletions(-)


base-commit: 8b7c11b8668b4e774f81a9f0b4c30144b818f1d1
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1042%2Fadlternative%2Fpretty-print-ref-symref-fix-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1042/adlternative/pretty-print-ref-symref-fix-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1042
-- 
gitgitgadget

             reply	other threads:[~2021-09-20  7:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-20  7:37 ZheNing Hu via GitGitGadget [this message]
2021-09-20  7:37 ` [PATCH 1/4] refs: let repo_dwim_ref() learn get symref itself and ref flags ZheNing Hu via GitGitGadget
2021-09-20  7:37 ` [PATCH 2/4] ref-filter: provide ref_flags to pretty_print_ref() ZheNing Hu via GitGitGadget
2021-09-20  7:37 ` [PATCH 3/4] verify_tag: use repo_dwim_ref() to get ref fullname and ref_flags ZheNing Hu via GitGitGadget
2021-09-20  7:37 ` [PATCH 4/4] ref-filter: let tag verify use %(refname:lstrip=2) by default ZheNing Hu via GitGitGadget

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.1042.git.1632123476.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=adlternative@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.