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

Re: [PATCH] rebase -i: commit when continuing after "edit"

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Sep 25, 2007, 15:16 UTC
Message-ID
<Pine.LNX.4.64.0709251615220.28395@racer.site>
In-Reply-To
<46F922E0.80504@viscovery.net>
Hi,
On Tue, 25 Sep 2007, Johannes Sixt wrote:
Show 43 quoted lines
> Johannes Schindelin schrieb:
> 
> > On Tue, 25 Sep 2007, Johannes Sixt wrote:
> > 
> > > Johannes Schindelin schrieb:
> > > 
> > > > On Tue, 25 Sep 2007, Johannes Sixt wrote:
> > > > > How about:
> > > > > 
> > > > > 	eval "$author_script"
> > > > > 	GIT_AUTHOR_NAME="$GIT_AUTHOR_NAME" \
> > > > > 	GIT_AUTHOR_EMAIL="$GIT_AUTHOR_EMAIL" \
> > > > > 	GIT_AUTHOR_DATE="$GIT_AUTHOR_DATE" \
> > > > > 	$USE_OUTPUT git commit -F "$MSG" $EDIT_COMMIT
> > > > > 
> > > > > and if you dislike that, put the two questionable lines in 
> > > > > parenthesis.
> > > >
> > > > That looks ugly.  I'd rather have something like
> > > > 
> > > > 	eval "$USE_OUTPUT $author_script git commit -F \"$MSG\" $EDIT_COMMIT"
> > > > 
> > > > but I'm not quite certain if that is enough, what with the funny 
> > > > characters people put into path names these days ($MSG points to 
> > > > "$DOTEST"/message).
> > >
> > > I, too, find it ugly, but I think it's the most readable way to do 
> > > it. Your version is certainly underquoted.
> > > 
> > > I poked around a bit, but one major obstacle is that the assignments 
> > > in $author_script are on separate lines, which you would have to 
> > > splice into a single line before you can insert them in the eval.
> > 
> > But is your version not underquoted, too?  For example, if the author 
> > name is, say 'Johannes "Dscho" Schindelin', would your version still 
> > get the \" in the name?
> 
> No, it's not underquoted; yes, it would still get the \" in the name. 
> The shell parses the assignments
> 
> 	GIT_AUTHOR_NAME="$GIT_AUTHOR_NAME"
> 
> only once; it does not parse it again after the dq'd string was expanded.
Ah, okay.  I'll go with your version then.

Ciao, Dscho

Previous: Johannes SixtNext: David Kastrup
Message 12 of 15 in “git-rebase--interactive needs a better message”
  1. Dmitry PotapovSep 23, 2007
  2. Johannes SchindelinSep 23, 2007
  3. rebase -i: commit when continuing after "edit"Johannes Schindelin, Sep 24, 2007
  4. Dmitry PotapovSep 24, 2007
  5. Junio C HamanoSep 25, 2007
  6. Johannes SchindelinSep 25, 2007
  7. Johannes SixtSep 25, 2007
  8. Johannes SchindelinSep 25, 2007
  9. Johannes SixtSep 25, 2007
  10. Johannes SchindelinSep 25, 2007
  11. Johannes SixtSep 25, 2007
  12. Johannes SchindelinSep 25, 2007
  13. David KastrupSep 25, 2007
  14. Johannes SixtSep 25, 2007
  15. David KastrupSep 25, 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.