[PATCH 0/1] log: make the --oneline option work with -L

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

 



Hey folks,

This is a small patch to fix an issue I've experienced with git-log(1)
when certain combinations of flags are provided. This is also my very
first patch submission, so I've tried to limit the blast radius as much
as possible. I'm also unsure if this is the best place to implement the
change, so any feedback is welcome!

I'd like to ideally add a test as well, but I'm unsure where this should
slot in.

git-log accepts the --oneline option to display the short commit SHA and
title only. This is a convenient option when searching through Git
history, as it gives a rough idea of the changes introduced in each
commit. git-log also accepts the -L flag, which lets us provide a line
range for a given file. This is handy for limiting the search to a given
area of interest.

However, when --oneline is used in combination with -L, Git actually
outputs the single line commit information _as well_ as the full diff.
For example:

        git log --oneline -L 660:Documentation/MyFirstObjectWalk.txt

will incorrectly display the diffs too.

This patch aims to fix this behaviour by respecting the --oneline option
when used in conjunction with -L.

James Liu (1):
  log: ensure diffs are omitted with --oneline

 builtin/log.c | 4 ++++
 1 file changed, 4 insertions(+)

-- 
2.43.2





[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