git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [GSoC][PATCH 5/5] t: add test for git refs optimize subcommand

From
Meet Soni <meetsoni3017@gmail.com>
Date
Aug 31, 2025, 06:20 UTC
Message-ID
<CAPhwyn0r11owkcSLXDALfPjKe1QvexC0uH6F7B=vktwfAue53w@mail.gmail.com>
In-Reply-To
<aK3QOtQzUFsGvmyA@ArchLinux>

Thanks for the review, and apologies for missing your email earlier, I just saw your comments today.

On Tue, 26 Aug 2025 at 20:48, shejialuo <shejialuo@gmail.com> wrote:
Show 22 quoted lines
>
> On Tue, Aug 26, 2025 at 01:06:45PM +0530, Meet Soni wrote:
>
> > diff --git a/t/t1463-refs-optimize.sh b/t/t1463-refs-optimize.sh
> > new file mode 100755
> > index 0000000000..c11c905d79
> > --- /dev/null
> > +++ b/t/t1463-refs-optimize.sh
> > @@ -0,0 +1,17 @@
> > +#!/bin/sh
> > +
> > +test_description='git refs optimize should not change the branch semantic
> > +
> > +This test runs git refs optimize and git show-ref and checks that the branch
> > +semantic is still the same.
> > +'
>
> When reading the description, I am wondering how this test runs `git
> refs optimize` and `git show-ref` to achieve the goal. Should we simply
> just say we use "pack-refs-tests.sh" to ensure the compatibility with
> the `git pack-refs`?
>

You're right that the current description is too tied to implementation details (git show-ref). The intent of this test is to ensure that git refs optimize does not change branch semantics, similar to the existing pack-refs tests.

I'll update the description to focus on the behavior being verified, not the specific commands used.

Show 16 quoted lines
> > +
> > +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
> > +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
> > +GIT_TEST_DEFAULT_REF_FORMAT=files
> > +export GIT_TEST_DEFAULT_REF_FORMAT
> > +
> > +. ./test-lib.sh
> > +
> > +pack_refs='refs optimize'
> > +. "$TEST_DIRECTORY"/pack-refs-tests.sh
> > --
> > 2.34.1
> >
>
> Thanks,
> Jialuo

Thanks, Meet

Previous: shejialuoNext: Patrick Steinhardt
Message 15 of 17 in “Add refs optimize subcommand”
  1. Meet SoniAug 26, 2025
  2. [GSoC][PATCH 1/5] builtin/pack-refs: factor out core logic into a helperMeet Soni, Aug 26, 2025
  3. Patrick SteinhardtSep 2, 2025
  4. Meet SoniSep 3, 2025
  5. Patrick SteinhardtSep 3, 2025
  6. Junio C HamanoSep 3, 2025
  7. Patrick SteinhardtSep 3, 2025
  8. Junio C HamanoSep 3, 2025
  9. [GSoC][PATCH 2/5] doc: factor out common optionMeet Soni, Aug 26, 2025
  10. [GSoC][PATCH 3/5] builtin/refs: add optimize subcommandMeet Soni, Aug 26, 2025
  11. Patrick SteinhardtSep 2, 2025
  12. [GSoC][PATCH 4/5] t0601: refactor tests to be shareableMeet Soni, Aug 26, 2025
  13. [GSoC][PATCH 5/5] t: add test for git refs optimize subcommandMeet Soni, Aug 26, 2025
  14. shejialuoAug 26, 2025
  15. Meet SoniAug 31, 2025
  16. Patrick SteinhardtSep 2, 2025
  17. Meet SoniSep 3, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.