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

Re: [PATCH v2] git-rebase-interactive: do not squash commits on abort

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Sep 10, 2008, 09:53 UTC
Message-ID
<alpine.DEB.1.00.0809101150570.13830@pacific.mpi-cbg.de.mpi-cbg.de>
In-Reply-To
<20080909205036.GD28210@dpotapov.dyndns.org>
Hi,
On Wed, 10 Sep 2008, Dmitry Potapov wrote:
Show 18 quoted lines
> On Tue, Sep 09, 2008 at 04:17:36PM +0200, Johannes Schindelin wrote:
> >_
> > It might be safer to set the variable "amend" to empty before the "if".
> 
> OK. I have added it.
> 
>  git-rebase--interactive.sh |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
> index 929d681..aaca915 100755
> --- a/git-rebase--interactive.sh
> +++ b/git-rebase--interactive.sh
> @@ -427,14 +427,18 @@ do
>  		else
>  			. "$DOTEST"/author-script ||
>  				die "Cannot find the author identity"
> +			amend=""

Sorry, my mistake... I should have been more explicit. In most (if not all) shell scripts, we prefer to set to the empty string with the expression

			amend=

Sorry to be nitting here, but I think it might be desirable in the long run to have consistent code style, as it makes it a bigger pleasure to work with the code.

Ciao, Dscho

Previous: Dmitry PotapovNext: Junio C Hamano
Message 11 of 12 in “git-rebase-interactive: do not squash commits on abort”
  1. 1/2 git-rebase-interactive: do not squash commits on abortDmitry Potapov, Sep 8, 2008
  2. 2/2 git-rebase--interactive: auto amend only edited commitDmitry Potapov, Sep 8, 2008
  3. Junio C HamanoSep 9, 2008
  4. Dmitry PotapovSep 9, 2008
  5. git-rebase--interactive: auto amend only edited commitDmitry Potapov, Sep 9, 2008
  6. Johannes SixtSep 9, 2008
  7. Dmitry PotapovSep 9, 2008
  8. Junio C HamanoSep 9, 2008
  9. Johannes SchindelinSep 9, 2008
  10. git-rebase-interactive: do not squash commits on abortDmitry Potapov, Sep 9, 2008
  11. Johannes SchindelinSep 10, 2008
  12. Junio C HamanoSep 10, 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.