Re: git log alias with --all and --exclude

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

 



On Wed, Sep 04, 2024 at 01:45:50PM -0700, Junio C Hamano wrote:
> Jacob Keller <jacob.keller@xxxxxxxxx> writes:
> 
> >> > > 'gr = log --oneline --abbrev-commit --all --graph --decorate --color'
> >
> > You could implement this as a shell alias so that your options get
> > included before the --all. I'm not sure how trivial that would be to
> > do, but thats how I would go about implementing this alias.
> 
> True.  If I were doing this, I would at least do something like
> 
>     [alias]
> 	rg = "!sh -c 'git log --oneline --abbrev-commit --graph \
> 		--decorate --color ${1-\"--all\"} \"$@\"' -"
> 
> so that
> 
>  (1) "git rg" without any argument will default to "--all"
>  (2) "git rg --exclude 'wip*' --branches" would work as expected,
>      just like "git rg --first-parent master..seen" would.
> 
> Thanks.

Thanks for the ideas, I will adjust my alias.




[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