Re: Commit-ish shortcut for immediate parent range

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeff King
Date: Sunday, October 22, 2006 - 12:53 pm

On Sun, Oct 22, 2006 at 03:48:35PM +0100, Andy Parkins wrote:


I think a more general (but possibly harder to implement and use!) form
would be a commit-ish token for "refer to previous commit-ish." This
would not increase expressiveness, but could save a lot of typing. So if
'!' meant "the last sha1/ref parsed", your example range would be:

  3435fdb4c^..!

but you could also do more exotic things like:
  3435fdb4c~25..!~20

Obviously you could think of more interesting ways to refer to previous
THINGS. But I think in most cases in which you have repeated refs, you
really are just repeating one ref twice as a basis for a range.

The '!' character is probably a bad choice, since it's generally an
interactive shell metacharacter. I'm not sure what would be a better
choice; we're running low on punctuation.

At any rate, I'm not convinced this is a worthwhile optimization. It's
annoying to have to re-specify a long sha1, but in 99% of cases, you
really are looking for sha1^..sha1. As others have pointed out, that's
already handled through git-show.

-Peff
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Commit-ish shortcut for immediate parent range, Andy Parkins, (Sun Oct 22, 7:48 am)
Re: Commit-ish shortcut for immediate parent range, Linus Torvalds, (Sun Oct 22, 10:25 am)
Re: Commit-ish shortcut for immediate parent range, Linus Torvalds, (Sun Oct 22, 11:25 am)
Re: Commit-ish shortcut for immediate parent range, Jeff King, (Sun Oct 22, 12:53 pm)
Re: Commit-ish shortcut for immediate parent range, Andy Parkins, (Sun Oct 22, 1:17 pm)
Re: Commit-ish shortcut for immediate parent range, Johannes Schindelin, (Sun Oct 22, 1:55 pm)
Re: Commit-ish shortcut for immediate parent range, Linus Torvalds, (Sun Oct 22, 1:56 pm)