Re: [PATCH v9 9/9] cocci: allow padding with `strbuf_addf()`
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Jan 11, 2022, 20:11 UTC
- Message-ID
- <Yd3kZv4Oym1h7zap@nand.local>
- In-Reply-To
- <78aa8c28-d78b-7dee-6616-7708c363a244@web.de>
On Tue, Jan 11, 2022 at 08:06:00PM +0100, René Scharfe wrote:
Show 12 quoted lines
> 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; gitI 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