Re: [PATCH 2/4] add -u: get rid of "treewideupdate" configuration
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Apr 9, 2011, 04:58 UTC
- Message-ID
- <BANLkTimCbr+hnJNGWDBVbjZKEBDW1KR4=g@mail.gmail.com>
- In-Reply-To
- <7vaag01gdl.fsf@alter.siamese.dyndns.org>
On Sat, Apr 9, 2011 at 6:18 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Also make ':' without anything else to mean "there is no pathspec". This > would allow differences between "git log" and "git log ." run from the top > level of the working tree (the latter simplifies no-op commits away from > the history) to be expressed from a subdirectory by saying "git log :".
The intention is good, but reality may need more work. I assume that "git add -u :" is equivalent to "git add -u" (or "git add -u ." to be precise). Unfortunately, cmd_add() checks argc for no arguments to turn "add -u <nothing>" to "add -u .", not the result from get_pathspec(). It can be fixed. Just heads up as there can be similar traps elsewhere.
-- Duy