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
Junio C Hamano <gitster@pobox.com>
Date
Jun 2, 2015, 18:22 UTC
Message-ID
<xmqqoaky2co4.fsf@gitster.dls.corp.google.com>
In-Reply-To
<133653833.39653.1433262736640.JavaMail.zimbra@ensimag.grenoble-inp.fr>

Remi Galan Alfonso <remi.galan-alfonso@ensimag.grenoble-inp.fr> writes:

> 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.

Even though it is in POSIX, some implementation may lack it, so our code tend to avoid "sort -o". "echo $(sort)" is also ugly and inefficient. The obvious and old-fashioned would be sufficient here:

	sort -u "$todo".oldsha1 >"$todo".oldsha1+ &&
        mv "$todo".oldsha1+ "$todo".oldsha1
Previous: Remi Galan AlfonsoNext: Matthieu Moy
Message 5 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.