Re: [PATCH/RFC] Add [] as an alias for a reference to the empty tree

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeff King
Date: Friday, May 7, 2010 - 9:53 pm

On Fri, May 07, 2010 at 06:37:27PM +0200, Peter Kjellerstedt wrote:


FWIW, I like the idea of a special namespace that indicates "this is not
a regular ref, but you can resolve it to some object". It seems to come
up once in a while, but I don't recall anybody ever actually making a
patch.


I am a little iffy on brackets, as they can invoke shell wildcarding
behavior. But the fact that they don't cause a syntactic conflict does
make them appealing.

Based on past discussions, I suspect other people would be interested
in:

  $ git diff [index] HEAD
  $ git diff HEAD [index]
  $ git diff [working-tree] [index]

etc. I don't think I would want to type those all the time, but they
conceptually are quite clear about what is happening, so they may be
nice for showing new users what is happening with each diff invocation
(as opposed to, say, "git diff --cached" versus "git diff", which is
somewhat unintuitive, even though it is more handy in practice).

-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:
[PATCH/RFC] Add [] as an alias for a reference to the empt ..., Peter Kjellerstedt, (Fri May 7, 9:37 am)
Re: [PATCH/RFC] Add [] as an alias for a reference to the ..., Jeff King, (Fri May 7, 9:53 pm)
RE: [PATCH/RFC] Add [] as an alias for a reference to the ..., Peter Kjellerstedt, (Mon May 10, 1:14 am)
Re: [PATCH/RFC] Add [] as an alias for a reference to the ..., Sverre Rabbelier, (Mon May 10, 2:51 am)
Re: [PATCH/RFC] Add [] as an alias for a reference to the ..., Sverre Rabbelier, (Mon May 10, 4:00 am)