git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: Commit-ish shortcut for immediate parent range
Date: Sun, 22 Oct 2006 17:11:00 +0200	[thread overview]
Message-ID: <ehg1li$mn6$1@sea.gmane.org> (raw)
In-Reply-To: 200610221548.42048.andyparkins@gmail.com

Andy Parkins wrote:

> Git's commit-ish is very powerful.  I was wondering however, if there was a 
> shortcut for (for example)?
> 
>  git-diff 3435fdb4c^..3435fdb4c

Thats "git-diff 3435fdb4c^ 3435fdb4c" - diff need pair of things
(one or more might be implied/default), not DAG.

> That is - the short range of a particular commit's parent to that commit; like
> 
>  git-diff 3435fdb4c!
> 
> Or similar.

Or similar. You have to use git-diff-tree, not git-diff as git-diff
uses working tree as second tree if second argument is not given 
(and index as first tree if first argument is not given).

$ git diff-tree -p 3435fdb4c

(-p to show patch instead of "whatchanged" output) shows diff to parent
of commit 3435fdb4c (if commit is merge commit, show nothing; use -m
or -c or --cc then).


By the way 3435fdb4c.. means 3435fdb4c..HEAD, and ..3435fdb4c means
HEAD..3435fdb4c (where HEAD means current branch).
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

  reply	other threads:[~2006-10-22 15:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-22 14:48 Commit-ish shortcut for immediate parent range Andy Parkins
2006-10-22 15:11 ` Jakub Narebski [this message]
2006-10-22 17:25 ` Linus Torvalds
2006-10-22 18:25   ` Linus Torvalds
2006-10-22 20:17   ` Andy Parkins
2006-10-22 20:56     ` Linus Torvalds
2006-10-22 21:41       ` Jakub Narebski
2006-10-22 22:09         ` Johannes Schindelin
2006-10-22 22:33           ` Jakub Narebski
2006-10-22 23:36             ` Junio C Hamano
2006-10-23  3:33         ` Linus Torvalds
2006-10-22 20:55   ` Johannes Schindelin
2006-10-22 19:53 ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='ehg1li$mn6$1@sea.gmane.org' \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).