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

Re: [PATCH] git-filter-branch.sh: Allow running in bare repositories

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 22, 2008, 23:27 UTC
Message-ID
<alpine.DEB.1.00.0807230025050.8986@racer>
In-Reply-To
<20080722223710.29084.61373.stgit@localhost>
Hi,
On Wed, 23 Jul 2008, Petr Baudis wrote:
> Commit 46eb449c restricted git-filter-branch to non-bare repositories
> unnecessarily; git-filter-branch can work on bare repositories just
> fine.
I think this is fine.
> This also fixes suspicious shell boolean expression during a check
> for dirty working tree.

If you are talking about X && Y || Z, it is well established (and should not be suspicious to a shell hacker like the creator of Cogito) that Z is executed if either X fails, or X succeeds and Y fails.

> +test_expect_success 'rewrite bare repository identically' '
> +	(git config core.bare true && cd .git && git-filter-branch branch)
> +'
> +git config core.bare false
Any reason why this is done outside the test?

Ciao, Dscho

Previous: Petr BaudisNext: Petr Baudis
Message 2 of 10 in “git-filter-branch.sh: Allow running in bare repositories”
  1. git-filter-branch.sh: Allow running in bare repositoriesPetr Baudis, Jul 22, 2008
  2. Johannes SchindelinJul 22, 2008
  3. Petr BaudisJul 22, 2008
  4. Junio C HamanoJul 23, 2008
  5. git-filter-branch.sh: Allow running in bare repositoriesPetr Baudis, Jul 23, 2008
  6. Johannes SchindelinJul 23, 2008
  7. Petr BaudisJul 23, 2008
  8. [PATCHv3] git-filter-branch.sh: Allow running in bare repositoriesPetr Baudis, Jul 23, 2008
  9. Junio C HamanoJul 23, 2008
  10. Junio C HamanoJul 23, 2008

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.