]> git.ipfire.org Git - thirdparty/git.git/commit - revision.c
revision: new rev^-n shorthand for rev^n..rev
authorVegard Nossum <vegard.nossum@oracle.com>
Tue, 27 Sep 2016 08:32:49 +0000 (10:32 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 27 Sep 2016 17:59:28 +0000 (10:59 -0700)
commit8779351dd7ee54c6ef2a7007670bad75a86edc75
tree2810d463c6e0baef7f93889678334720156b797c
parent7c0304af62fcb777faac6eebd8c242d3de4f605d
revision: new rev^-n shorthand for rev^n..rev

"git log rev^..rev" is commonly used to show all work done on and merged
from a side branch. This patch introduces a shorthand "rev^-" for this
and additionally allows "rev^-$n" to mean "reachable from rev, excluding
what is reachable from the nth parent of rev". For example, for a
two-parent merge, you can use rev^-2 to get the set of commits which were
made to the main branch while the topic branch was prepared.

Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/revisions.txt
builtin/rev-parse.c
revision.c
t/t6101-rev-parse-parents.sh