Re: [PATCH 2/3] rebase: accept -<number> as another way of saying HEAD~<number>
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Mar 2, 2014, 08:45 UTC
- Message-ID
- <CACsJy8DCpisoq698infq3X7Z1o8L_+zd1ai4-NCBXUpThvGcTQ@mail.gmail.com>
- In-Reply-To
- <CAPig+cTj1hBOFDLA5LecXwrVN4FG6pAzSDTAyLchHQbOkoEnEA@mail.gmail.com>
On Sun, Mar 2, 2014 at 3:37 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 20 quoted lines
> On Sat, Mar 1, 2014 at 9:53 PM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote: >> This is "rev-list style", where people can do "git rev-list -3" in >> addition to "git rev-list HEAD~3". A lot of commands are driven by the >> revision machinery and also accept this form. This addition to rebase >> is just for convenience. >> >> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> >> --- >> diff --git a/git-rebase.sh b/git-rebase.sh >> index 5f6732b..33face1 100755 >> --- a/git-rebase.sh >> +++ b/git-rebase.sh >> @@ -342,6 +346,11 @@ do >> esac >> shift >> done >> +if [ -n "$NUM" ] > > With the exception of one errant "if [...]", git-rebase.sh uniformly > uses "if test ...".
Besides that and three more "if [...]" in git-rebase--interactive.sh, git-rebase*.sh uses "if test..." only. Will reroll with a cleanup patch to make them all "if test.."
-- Duy