Re: [PATCH 1.8.0] add: make "add -u" update full tree without pathspec

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 1.8.0] add: make "add -u" update full tree without pathspec

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:50:40

Nguyen Thai Ngoc Duy [off-list ref] writes:
On Sun, Feb 27, 2011 at 5:46 PM, Junio C Hamano [off-list ref] wrote:
quoted
Perhaps in this order:

Step 1, as soon as possible:

 * Introduce "add.make_update_global" configuration variable, and toggle
  the above variable when it is explicitly given; also record the fact
  that you actually saw this variable in the config parser regardless of
  the value that is given;
Ermm.. compat.make_update_global, with the intent that the config will
be dropped in future (1.9.0 maybe)?
As you haven't yet proven that this "new feature" is even useful to help
new people nor existing users at this step, you cannot claim "we plan to
drop this in the future", hence naming it "compat.*" is a no-go.  During
this step, we can not even say "we plan to make this the default"; we
would confuse the users otherwise (it is fine to say "we might make this
the default some day").

Even if we indeed end up proceeding to step 2, I don't see a point in
planning to drop the support from the beginning.  We might end up doing
so, but we can decide when that becomes necessary, and that would be long
after the tree-wide default proves a reasonable one, and preferably after
seeing a new person or two raise "what's the point of making 'add -u'
restricted to cwd?  we have too many options and this can go" on the list.

Then we would start deprecating the config, giving a warning when people
who still rely on their "add.make_update_global = false" say "add -u"
without pathspec in a few cycles, and then finally drop it at a version
bump boundary.
There's a problem. I use git on many machines. Some will have this
config enabled, some will not (yet). Perhaps a third option, which
will print something when "git add -u" is issued as a reminder?
Such a warning would not help you on a machine that does not even have git
with Step 1 change.

What you conceive as a problem is just a reminder that any incompatible
change you plan to add will have pain involved.  On two machines, one with
a new feature and the other without the new feature, you would have to
work differently _or_ you would train yourself to use both versions in a
compatible way (e.g. when you mean tree-wide, you would cdup, and when you
mean cwd, you would explicitly say ".", from the command line).  That is
not limited to this particular feature but any incompatible change, no?

Re: [PATCH 1.8.0] add: make "add -u" update full tree without pathspec

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:50:40

On Mon, Feb 28, 2011 at 2:39 AM, Junio C Hamano [off-list ref] wrote:
Nguyen Thai Ngoc Duy [off-list ref] writes:
quoted
There's a problem. I use git on many machines. Some will have this
config enabled, some will not (yet). Perhaps a third option, which
will print something when "git add -u" is issued as a reminder?
Such a warning would not help you on a machine that does not even have git
with Step 1 change.

What you conceive as a problem is just a reminder that any incompatible
change you plan to add will have pain involved.  On two machines, one with
a new feature and the other without the new feature, you would have to
work differently _or_ you would train yourself to use both versions in a
compatible way (e.g. when you mean tree-wide, you would cdup, and when you
mean cwd, you would explicitly say ".", from the command line).  That is
not limited to this particular feature but any incompatible change, no?
No. But I hoped it would help me somehow, or at least remind me to
update git on the machines I touch.
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help