W dniu 25.09.2016 o 10:55, Vegard Nossum pisze: > I use rev^..rev daily, and I'm surely not the only one. To save typing > (or copy-pasting, if the rev is long -- like a full SHA-1 or branch name) > we can make rev^- a shorthand for that. > > The existing syntax rev^! seems like it should do the same, but it > doesn't really do the right thing for merge commits (it gives only the > merge itself). > > As a natural generalisation, we also accept rev^-n where n excludes the > nth parent of rev, although this is expected to be generally less useful. > > [v2: Use ^- instead of % as suggested by Junio Hamano and use some > common helper functions for parsing.] Minor sidenote: the above should go after the "---" line, as it should be not included in the final commit message. > > Signed-off-by: Vegard Nossum <vegard.nossum@xxxxxxxxxx> > --- > Documentation/revisions.txt | 14 +++++++ > builtin/rev-parse.c | 28 ++++++++++++++ > revision.c | 91 +++++++++++++++++++++++++++++++++++++++++++++ > revision.h | 1 + > 4 files changed, 134 insertions(+)