Re: How to display "HEAD~*" in "git log"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 7/5/22 17:30, Konstantin Khomoutov wrote:
On Tue, Jul 05, 2022 at 12:25:14PM +0300, Konstantin Khomoutov wrote:

[...]
This is admittedly not convenient so it makes sense to turn into an alias:

  [alias]
    relog = "!relog() { git log --oneline \"$@\" | { n=0; while read line; do printf 'HEAD~%d\t%s\n' $n \"$line\"; n=$((n+1)); done; }; }; relog"
[...]

An alternative to an alias it creating a specially named script file which
must be executable and located in a directorly listed in the environment
variable PATH.
For instance, if you have ~/bin listed in your PATH, you can create a file
named "git-relog" containing the encantation from my first mail in this
thread, then call

   $ git relog

and that script will be found and executed.
Thanks for your reply, it does solve my problems.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux