Message ID | 20230719162424.70781-1-five231003@gmail.com (mailing list archive) |
---|---|
Headers | show |
Series | Add new "describe" atom | expand |
Kousik Sanagavarapu <five231003@gmail.com> writes: > PATCH 1/2 - Left unchanged expect for small changes in the commit > message for more clarity. > > PATCH 2/2 - We now parse the arguments in a seperate function > `describe_atom_option_parser()` call this in > `describe_atom_parser()` instead to populate > `atom->u.describe_args`. This splitting of the function > helps err at the right places. This topic may be getting rerolled but from the CI logs, comparing * https://github.com/git/git/actions/runs/5603242871 (seen at 77ba682) that passes the tests * https://github.com/git/git/actions/runs/5605480104 (seen at 29f0316) that breaks linux-gcc (ubuntu-20.04) at t6300 [*] output from "git shortlog --no-merges 77ba682..29f0316" [*] makes us suspect that this topic may be the culprit of the recent breakage. The linux-gcc job is where we force the initial branch name to be 'main' and not 'master', so if your tests assume that the initial & primary branch name is 'master', that may be something you need to fix. Thanks. [Reference] * https://github.com/git/git/actions/runs/5605480104/job/15186229680 * git shortlog --no-merges 77ba682..29f0316 Alex Henrie (1): sequencer: finish parsing the todo list despite an invalid first line Beat Bolli (1): trace2: fix a comment Junio C Hamano (4): short help: allow multi-line opthelp remote: simplify "remote add --tags" help text short help: allow a gap smaller than USAGE_GAP ### Kousik Sanagavarapu (2): ref-filter: add multiple-option parsing functions ref-filter: add new "describe" atom
Junio C Hamano <gitster@pobox.com> writes: > The linux-gcc job is where we force the initial branch name to be > 'main' and not 'master', so if your tests assume that the initial & > primary branch name is 'master', that may be something you need to > fix. Perhaps something along the line of the attached patch? The primary test repository t6300 uses is aware of the "problem" where the tester may set GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME to 'main' and hacks it around by using git branch -M main as one of the first things it does, to _force_ the primary branch name always to 'main', whether the tester's environment forces "git" to start with 'main' or 'master', and existing tests in the script relies on 'main' being the primary branch. But your tests are done in a repository newly created with your own "git init", so depending on the tester's environment, the primary branch may be 'master' or 'main'. The way your new tests are written, however, things will fail if "refs/heads/master" is not the primary branch. t/t6300-for-each-ref.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git c/t/t6300-for-each-ref.sh w/t/t6300-for-each-ref.sh index 4bbba76874..489f4d9186 100755 --- c/t/t6300-for-each-ref.sh +++ w/t/t6300-for-each-ref.sh @@ -563,7 +563,7 @@ test_expect_success 'color.ui=always does not override tty check' ' ' test_expect_success 'setup for describe atom tests' ' - git init describe-repo && + git init -b master describe-repo && ( cd describe-repo &&
On Thu, Jul 20, 2023 at 04:10:09PM -0700, Junio C Hamano wrote: > Junio C Hamano <gitster@pobox.com> writes: > > > The linux-gcc job is where we force the initial branch name to be > > 'main' and not 'master', so if your tests assume that the initial & > > primary branch name is 'master', that may be something you need to > > fix. > > Perhaps something along the line of the attached patch? > > The primary test repository t6300 uses is aware of the "problem" > where the tester may set GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME > to 'main' and hacks it around by using > > git branch -M main > > as one of the first things it does, to _force_ the primary branch > name always to 'main', whether the tester's environment forces "git" > to start with 'main' or 'master', and existing tests in the script > relies on 'main' being the primary branch. > > But your tests are done in a repository newly created with your own > "git init", so depending on the tester's environment, the primary > branch may be 'master' or 'main'. The way your new tests are > written, however, things will fail if "refs/heads/master" is not the > primary branch. > I see. I looked at the trash directory by doing -v -i -d when running these describe tests and was under the impression that it is always master.I guess I should have had a bigger view of things. > t/t6300-for-each-ref.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git c/t/t6300-for-each-ref.sh w/t/t6300-for-each-ref.sh > index 4bbba76874..489f4d9186 100755 > --- c/t/t6300-for-each-ref.sh > +++ w/t/t6300-for-each-ref.sh > @@ -563,7 +563,7 @@ test_expect_success 'color.ui=always does not override tty check' ' > ' > > test_expect_success 'setup for describe atom tests' ' > - git init describe-repo && > + git init -b master describe-repo && > ( > cd describe-repo && I'll add this to the re-rolled version. Thanks