Skip to content

Add refs exists subcommand

Meet Soni git 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 2 repliesIn review
  2. v24 patches 2 repliesSuperseded
  3. v12 patches 6 repliesSuperseded

Changes in v3 from the cover letter

- Reverted commit message.
- nit: added empty line.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4builtin/refs: add 'exists' subcommandDocumentation/git-refs.adoc builtin/refs.c+55 -00 replies
2/4t1403: split 'show-ref --exists' tests into a separate filet/meson.build t/t1403-show-ref.sh t/t1422-show-ref-exists.sh+85 -660 replies
3/4t1422: refactor tests to be shareablet/show-ref-exists-tests.sh t/t1422-show-ref-exists.sh+78 -750 replies
4/4t: add test for git refs exists subcommandt/meson.build t/t1462-refs-exists.sh+11 -00 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by.

PatchPatrick Steinhardtshejialuo
SeriesMentored-by
1/4Mentored-by Mentored-by
2/4Mentored-by Mentored-by
3/4Mentored-by Mentored-by
4/4Mentored-by Mentored-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [GSoC][PATCH v3 0/4] Add refs exists subcommand

This series introduces git refs exists as a modern replacement for git show-ref --exists, continuing the effort to consolidate commands under the git refs namespace.

changes in v3:
- Reverted commit message.
- nit: added empty line.

Meet Soni (4):
builtin/refs: add 'exists' subcommand
t1403: split 'show-ref --exists' tests into a separate file
t1422: refactor tests to be shareable
t: add test for git refs exists subcommand

 Documentation/git-refs.adoc |  7 ++++
 builtin/refs.c              | 48 +++++++++++++++++++++++
 t/meson.build               |  4 +-
 t/show-ref-exists-tests.sh  | 77 +++++++++++++++++++++++++++++++++++++
 t/t1403-show-ref.sh         | 65 -------------------------------
 t/t1422-show-ref-exists.sh  |  9 +++++
 t/t1462-refs-exists.sh      | 10 +++++
 7 files changed, 154 insertions(+), 66 deletions(-)
 create mode 100644 t/show-ref-exists-tests.sh
 create mode 100755 t/t1422-show-ref-exists.sh
 create mode 100755 t/t1462-refs-exists.sh

Range-diff against v2:

 1:  19623eb97e <  -:  ---------- doc: factor out common option
 2:  69c207dc45 <  -:  ---------- builtin/for-each-ref: align usage string with the man page
 3:  6eeb1c070a <  -:  ---------- builtin/for-each-ref: factor out core logic into a helper
 4:  eecccfe98b <  -:  ---------- builtin/refs: add list subcommand
 5:  aa91c5c570 <  -:  ---------- t6300: refactor tests to be shareable
 6:  fed66d91c0 <  -:  ---------- t: add test for git refs list subcommand
 7:  b55e6d36eb <  -:  ---------- diff: ensure consistent diff behavior with ignore options
 8:  e1d3d61a45 <  -:  ---------- diff: --no-index should ignore the worktree
 9:  621ce9c1c6 <  -:  ---------- git-jump: make `diff` work with filenames containing spaces
10:  9a49aef8dc <  -:  ---------- environment: remove the global variable 'merge_log_config'
11:  22d421fed9 <  -:  ---------- builtin/fmt-merge-msg: stop depending on 'the_repository'
12:  741f36c7d9 <  -:  ---------- docs: remove stray bracket from git-clone synopsis
13:  1fa68948c3 <  -:  ---------- The second batch
14:  d1fa4e927e !  1:  0c9349fa74 builtin/refs: add 'exists' subcommand

@@ Commit message
builtin/refs: add 'exists' subcommand

As part of the ongoing effort to consolidate reference handling,
- introduce exists subcommand. This command provides the same
+ introduce a new exists subcommand. This command provides the same
functionality and exit-code behavior as git show-ref --exists, serving as its modern replacement.

@@ Commit message
git refs list, where sharing the larger implementation of for-each-ref was necessary.

- Documentation for this subcommand is also added to the git-refs(1)
+ Documentation for the new subcommand is also added to the git-refs(1)
man page.

15:  f1dfafe6c9 =  2:  d32067af55 t1403: split 'show-ref --exists' tests into a separate file
16:  a2a65c428c !  3:  fb7223ad07 t1422: refactor tests to be shareable
    @@ Commit message
      ## t/show-ref-exists-tests.sh (new) ##
     @@
     +git_show_ref_exists=${git_show_ref_exists:-git show-ref --exists}
    ++
     +test_expect_success setup '
     +	test_commit --annotate A &&
     +	git checkout -b side &&

17: e92da499b5 = 4: 75b5ee4ede t: add test for git refs exists subcommand

Signature · 1 line
2.34.1