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

Re: [PATCH 1/2] rebase tests: test linear branch topology

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 22, 2019, 18:46 UTC
Message-ID
<xmqq7edrr79m.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20190222145344.GA5090@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 19 quoted lines
>> While I'm at it add a --fork-point test, strictly speaking this is
>> redundant to the existing '' test, as no argument to rebase implies
>> --fork-point. But now it's easier to grep for tests that explicitly
>> stress --fork-point.
>
> That makes sense.
>
>> +test_expect_success 'setup branches and remote tracking' '
>> +	git tag -l >tags &&
>> +	for tag in $(cat tags)
>> +	do
>> +		git branch branch-$tag $tag || return 1
>> +	done &&
>
> I don't think we need this extra tmpfile and cat, do we? I.e.,
>
>   for tag in $(git tag -l)
>
> would work.

I think it is being (overly) defensive not to lose the exit status of "git tag".

Show 9 quoted lines
> We should probably avoid depending on the exact output of
> the porcelain "tag", though. Maybe:
>
>   git for-each-ref \
>     --format='create refs/heads/branch-%(refname:strip=2) %(objectname)' \
>     refs/tags |
>   git update-ref --stdin
>
> which has the added bonus of using a constant number of processes.
Much better ;-)
Previous: Jeff KingNext: Ævar Arnfjörð Bjarmason
Message 8 of 12 in “BUG: 2.11-era rebase regression when @{upstream} is implicitly used”
  1. Ævar Arnfjörð BjarmasonFeb 14, 2019
  2. Jeff KingFeb 21, 2019
  3. Ævar Arnfjörð BjarmasonFeb 21, 2019
  4. Jeff KingFeb 21, 2019
  5. 0/2 rebase: fix 2.11.0-era --fork-point regressionÆvar Arnfjörð Bjarmason, Feb 21, 2019
  6. 1/2 rebase tests: test linear branch topologyÆvar Arnfjörð Bjarmason, Feb 21, 2019
  7. Jeff KingFeb 22, 2019
  8. Junio C HamanoFeb 22, 2019
  9. 2/2 rebase: don't rebase linear topology with --fork-pointÆvar Arnfjörð Bjarmason, Feb 21, 2019
  10. Jeff KingFeb 22, 2019
  11. Ævar Arnfjörð BjarmasonFeb 22, 2019
  12. Jeff KingFeb 24, 2019

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.