Re: [PATCH v3] add: warn when -u or -A is used without filepattern

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> We should probably update the documentation/help for "git add", but
> that is entirely a separate topic.

The documentation update in 0fa2eb530fb7 (add: warn when -u or -A is
used without pathspec, 2013-01-28) says:

    If no <pathspec> is given, the current version of Git defaults to
    "."; in other words, update all tracked files in the current directory
    and its subdirectories. This default will change in a future version
    of Git, hence the form without <filepattern> should not be used.

(oops, I just spotted a stray <filepattern> here, which came from a
semantic mismerge---I'll fix it locally).

The above text says that we currently add what you have in your
current directory and below, before it says this default will
change.  That makes it easier to connect "the default will change"
and "form without pathspec should not be used" in readers' mind.  It
does not take that much imagination and intelligence to infer "it
will change and will not limit to my current directory, so in the
future I will have to be explicit when I want to do what I just told
git to do".

But the warning text does not sound quite right.  This is what I get:

    warning: The behavior of 'git add --update (or -u)' with no path argument from a
    subdirectory of the tree will change in Git 2.0 and should not be used anymore.

There is a logic gap between "will change" and "should not be used"
that is not filled like the text in the manual page does.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]