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

Re: [BUG] git-rebase fails when a commit message contains a diff

From
Benoit Sigoure <tsuna@lrde.epita.fr>
Date
Nov 9, 2007, 09:07 UTC
Message-ID
<87747E02-0C25-4330-84F4-1C56C0196BD5@lrde.epita.fr>
In-Reply-To
<473420FE.7010807@viscovery.net>
On Nov 9, 2007, at 9:57 AM, Johannes Sixt wrote:
Show 14 quoted lines
> Benoit Sigoure schrieb:
>> Off topic question: why do you guys always do this instead of  
>> doing, say, this:
>> INTERACTIVE=false
>> case $1 in
>>   --interactive|-i)
>>     INTERACTIVE=:
>>     ... ;;
>> esac
>> if $INTERACTIVE; then
>>   git_editor "$TODO" || die ...
>> fi
>
> Because in some shells 'false' is not a built-in.

Can you name such a shell? (besides Solaris' brain-damaged, b0rken and foobared /bin/sh which will most likely not work with Git anyway)

> But then this might do it without the extra process:
>
> 	INTERACTIVE="! :"	# false

`!' is not portable either. In particular, I highly doubt `!' will work on shells that don't have `false' as a builtin (Hello Mr Solaris).

Show 9 quoted lines
>
> 	case $1 in
> 	--interactive|-i)
> 	    INTERACTIVE=:
> 	    ... ;;
> 	esac
> 	if $INTERACTIVE; then
> 	  git_editor "$TODO" || die ...
> 	fi

Correct me if I'm wrong but I think that some shells don't have `test' as a builtin either.

-- 
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory
Previous: Ralf WildenhuesNext: Johannes Schindelin
Message 12 of 17 in “[BUG] git-rebase fails when a commit message contains a diff”
  1. Jonas FonsecaNov 9, 2007
  2. Junio C HamanoNov 9, 2007
  3. Junio C HamanoNov 9, 2007
  4. Junio C HamanoNov 9, 2007
  5. Johannes SchindelinNov 9, 2007
  6. Junio C HamanoNov 9, 2007
  7. Johannes SchindelinNov 9, 2007
  8. Björn SteinbrinkNov 11, 2007
  9. Benoit SigoureNov 9, 2007
  10. Johannes SixtNov 9, 2007
  11. Ralf WildenhuesNov 9, 2007
  12. Benoit SigoureNov 9, 2007
  13. Johannes SchindelinNov 9, 2007
  14. Andreas EricssonNov 9, 2007
  15. Steffen ProhaskaNov 9, 2007
  16. Johannes SchindelinNov 9, 2007
  17. Steffen ProhaskaNov 9, 2007

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.