Re: minimum commit id length when fixing a patch

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

 



Kevin Wilson <wkevils@xxxxxxxxx> writes:

> Thanks, Bjorn.
>
> I added in /root/.gitconfig
> ...
> [core]
>         abbrev = 12
> [pretty]
>         fixes = Fixes: %h (\"%s\")
> ...
>
> Still, "git log" shows more than 12 digits, like:
> commit 0a528ee9a52007984fa60b0c4ef1f39fdf5edf8d
> Author: Tariq Toukan <tariqt@xxxxxxxxxxxx>
> Date:   Wed Jun 7 16:26:15 2017 +0300
>
>     IB/mlx4: Bump driver version
>
> Does it work for you ?


See the section on "Commit Formatting" in git-log(1).  The config only
changes the abbreviated id, while the default log format use the full
id.  You can do "git log --abbrev-commit", or set "log.abbrevCommit" to
change this default.

Personally I prefer having the full id in the "normal" git log, but like
to use the abbreviated id in fixes tags and other one-line references to
commits.  This is done by using %h instead of %H in the format specifier.



Bjørn

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux