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

Re: [PATCH 1/2] t1415: avoid using `main` as ref name

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Oct 5, 2020, 09:54 UTC
Message-ID
<20201005095448.GN1166820@google.com>
In-Reply-To
<d3f7b39a2f11f4b05195f62190f75c84475c237d.1601888196.git.gitgitgadget@gmail.com>
Hi,
Johannes Schindelin wrote:
> In preparation for a patch series that will change the fall-back for
> `init.defaultBranch` to `main`, let's not use `main` as ref name in this
> test script.
Interesting.  I assume the issue is this line?
	-	git -C fer1/repo for-each-ref --format="%(refname)" | grep main >actual &&

I.e., it's not actually that naming a worktree "main" will break anything, but just that the test catches refs/heads/main in the same net when it does grepping?

If the commit message explains that, then this patch looks good to me. Without such an explanation, it would make me fear that we have some underlying bug in "git worktree".

Thanks, Jonathan

Previous: Johannes Schindelin via GitGitGadgetNext: Johannes Schindelin
Message 3 of 11 in “Avoid main as branch name in the test suite”
  1. 0/2 Avoid main as branch name in the test suiteJohannes Schindelin via GitGitGadget, Oct 5, 2020
  2. 1/2 t1415: avoid using `main` as ref nameJohannes Schindelin via GitGitGadget, Oct 5, 2020
  3. Jonathan NiederOct 5, 2020
  4. Johannes SchindelinOct 8, 2020
  5. 2/2 tests: avoid using the branch name `main`Johannes Schindelin via GitGitGadget, Oct 5, 2020
  6. Jonathan NiederOct 5, 2020
  7. Johannes SchindelinOct 8, 2020
  8. Derrick StoleeOct 8, 2020
  9. 0/2 Avoid main as branch name in the test suiteJohannes Schindelin via GitGitGadget, Oct 8, 2020
  10. 1/2 t1415: avoid using `main` as ref nameJohannes Schindelin via GitGitGadget, Oct 8, 2020
  11. 2/2 tests: avoid using the branch name `main`Johannes Schindelin via GitGitGadget, Oct 8, 2020

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.