Re: [PATCH v9 9/9] cocci: allow padding with `strbuf_addf()`

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

 



On Tue, Jan 11, 2022 at 08:06:00PM +0100, René Scharfe wrote:
> Am 11.01.22 um 17:42 schrieb Taylor Blau:
> > I find it helpful to have an alias like:
> >
> >     $ git config alias.ll
> >     !git always --no-pager log -1 --pretty='tformat:%h (%s, %ad)' --date=short
> >
> > in my $HOME/.gitconfig so that I can easily format commits in the
> > standard way.
>
> You can shorten "--pretty='tformat:%h (%s, %ad)' --date=short" to
> "--pretty=reference" or "--format=reference".  For me that's easy enough
> to remember that I don't need an alias.

Ah, of course. Peff's copy likely predates `--pretty=reference`, and I
inherited the cruft from him. Your suggestion has the nice benefit of
colorizing the output when going to the terminal.

> Silly question, going further off-topic: What's "git always" doing?

Oops, I should have mentioned. It's another alias to ensure that the
following command is always run in a Git repository (either the current
one or a hand-picked default):

    $ git config alias.always
    !git rev-parse 2>/dev/null || cd ~/src/git; git

I often read mail out of my home directory, and the above works with my
`:Git` command in Vim (which passes its arguments to `git always` and
inserts the result back into my buffer). That way I don't have to first
`:cd ~/src/git` and then `:Git ll xyz`, I can just `:Git ll xyz` and it
does what I meant most of the time.

Thanks,
Taylor



[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