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

From: Junio C Hamano <[email-masked]>
Date: Tue, 02 Jun 2015 11:22:19 -0700

Remi Galan Alfonso <[email-masked]>
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