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

Re: [PATCH/RFCv3 2/2] git rebase -i: warn about removed commits

From
Remi Galan Alfonso <remi.galan-alfonso@ensimag.grenoble-inp.fr>
Date
Jun 2, 2015, 16:32 UTC
Message-ID
<133653833.39653.1433262736640.JavaMail.zimbra@ensimag.grenoble-inp.fr>
In-Reply-To
<vpqzj4ignwe.fsf@anie.imag.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 8 quoted lines
> > Galan Rémi <remi.galan-alfonso@ensimag.grenoble-inp.fr> writes:
> > +                # Sort the SHA-1 and compare them
> > +                echo "$(sort -u "$todo".oldsha1)" >"$todo".oldsha1
> > +                echo "$(sort -u "$todo".newsha1)" >"$todo".newsha1
> 
> Useless uses of echo.
> 
> echo $(foo) -> foo

In this case it is not true, because of the infile and outfile being identical. However sort does have a -o (-output) that I missed that allows avoiding using echo or writing in another file; I'm correcting with this.

Show 7 quoted lines
> You should test also that
> 
> git rebase --edit-todo # playing with $EDITOR to restore the original lines.
> git rebase --continue
> 
> actually continues. You did have problems with this in early
> implementations, so it's not straightforward, so it deserves a test.

In this patch, the error is dealt with a die_abort and not die, thus there is no rebase --edit-todo or rebase --continue possible afterward.

> You should check the output of git rebase -i too.

Checking that the warning was correctly displayed like in the test for "warn" if I understood correctly. About that, is checking that the first line is "Warning: some commits may have been dropped accidentally." (like in the test for "warn") enough, or should I check that the commit displayed as removed is the correct one?

The other points have been corrected, or their correction is in progress.

Thanks,
Rémi
Previous: Matthieu MoyNext: Junio C Hamano
Message 4 of 10 in “git-rebase -i: add command "drop" to remove a commit”
  1. 1/2 git-rebase -i: add command "drop" to remove a commitGalan Rémi, Jun 2, 2015
  2. 2/2 git rebase -i: warn about removed commitsGalan Rémi, Jun 2, 2015
  3. Matthieu MoyJun 2, 2015
  4. Remi Galan AlfonsoJun 2, 2015
  5. Junio C HamanoJun 2, 2015
  6. Matthieu MoyJun 3, 2015
  7. Remi Galan AlfonsoJun 3, 2015
  8. Remi Galan AlfonsoJun 3, 2015
  9. Matthieu MoyJun 2, 2015
  10. Remi Galan AlfonsoJun 2, 2015

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.