Re: Any way to make git-log to enumerate commits?

2018-12-06 Thread Junio C Hamano
Konstantin Khomoutov writes: >> I do not see why the "name each rev relative to HEAD" formatting >> option cannot produce HEAD^2~2 etc. >> ... > My reading was that the OP explicitly wanted to just glance at a single > integer number and use it right away in a subsequent rebase command. > > I

Re: Any way to make git-log to enumerate commits?

2018-12-06 Thread Konstantin Khomoutov
On Thu, Dec 06, 2018 at 09:31:36AM +0900, Junio C Hamano wrote: > >> It would be great if git-log has a formatting option to insert an > >> index of the current commit since HEAD. > >> > >> It would allow after quitting the git-log to immediately fire up "git > >> rebase -i HEAD~index" instead

Re: Any way to make git-log to enumerate commits?

2018-12-05 Thread Junio C Hamano
Konstantin Khomoutov writes: > On Wed, Dec 05, 2018 at 05:22:14PM +0300, Konstantin Kharlamov wrote: > >> It would be great if git-log has a formatting option to insert an >> index of the current commit since HEAD. >> >> It would allow after quitting the git-log to immediately fire up "git >>

Re: Any way to make git-log to enumerate commits?

2018-12-05 Thread Andreas Schwab
On Dez 05 2018, Elijah Newren wrote: > Or, just use name-rev so it works with non-linear histories too: > > git log | git name-rev --refs=$(git symbolic-ref HEAD) --stdin | less That wouldn't work for a detached HEAD, though, and you need to use --no-abbrev. Andreas. -- Andreas Schwab,

Re: Any way to make git-log to enumerate commits?

2018-12-05 Thread Elijah Newren
On Wed, Dec 5, 2018 at 6:56 AM Konstantin Khomoutov wrote: > > On Wed, Dec 05, 2018 at 05:22:14PM +0300, Konstantin Kharlamov wrote: > > > It would be great if git-log has a formatting option to insert an > > index of the current commit since HEAD. > > > > It would allow after quitting the

Re: Any way to make git-log to enumerate commits?

2018-12-05 Thread Konstantin Khomoutov
On Wed, Dec 05, 2018 at 05:22:14PM +0300, Konstantin Kharlamov wrote: > It would be great if git-log has a formatting option to insert an > index of the current commit since HEAD. > > It would allow after quitting the git-log to immediately fire up "git > rebase -i HEAD~index" instead of "git

Any way to make git-log to enumerate commits?

2018-12-05 Thread Konstantin Kharlamov
It would be great if git-log has a formatting option to insert an index of the current commit since HEAD. It would allow after quitting the git-log to immediately fire up "git rebase -i HEAD~index" instead of "git rebase -i go-copy-paste-this-long-number-id".