From: Junio C Hamano Date: Fri, 22 Feb 2008 20:30:32 GMT Subject: Re: [RFC PATCH] Implement vc-git-annotate-show-diff-revision-at-line for emacs vc-git Message-ID: <7voda891jr.fsf@gitster.siamese.dyndns.org> In-Reply-To: <1203706693.7552.56.camel@alexjb-desktop.transitives.com> Alex Bennee writes: > Whats the easiest command to show the parent commit of a given commit id > (the closest analogy I can think of)? I tried: > > git-show 486a974a --pretty="format:%P" * Have rev before option, like "git show --pretty=... 486a974" * Use -s to squelch diff output. You should check how the %P format shows parents for a merge and decide which parent you would want to follow.