git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/4] ref-filter: fix %(symref) for pretty_print_ref()
@ 2021-09-20  7:37 ZheNing Hu via GitGitGadget
  2021-09-20  7:37 ` [PATCH 1/4] refs: let repo_dwim_ref() learn get symref itself and ref flags ZheNing Hu via GitGitGadget
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ZheNing Hu via GitGitGadget @ 2021-09-20  7:37 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Jeff King, ZheNing Hu

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-20  7:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-20  7:37 [PATCH 0/4] ref-filter: fix %(symref) for pretty_print_ref() ZheNing Hu via GitGitGadget
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

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).