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

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

 



Nguyán ThÃi Ngác Duy  <pclouds@xxxxxxxxx> writes:

> Migration plan:
>
> I'm bad at this. Can we start with a patch that warns users to do "git
> add -u ." when they do "git add -u"? Hopefully they would have their
> fingers retraied by the time the behavior is changed in 1.8.0.

Perhaps in this order:

Step 1, as soon as possible:

 * Introduce "static int make_update_global;" file scope static to
   builtin/add.c and default to 0;

 * 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;

 * Document the configuration variable as a new feature, without
   indicating that that will be the new default in the future, but
   strongly recommending that existing scripts should be updated and new
   scripts should be written the variable in mind---namely, their use of
   "add -u" should use "." if they are relying on the current "limit to
   cwd" behaviour.

 * Ship this as 1.7.X and see how well the new feature is accepted in the
   wider user community.  If the feature is not widely used, there is no
   point in proceeding further.

Step 2, two cycles (i.e. 6-8 months) before 1.8.0, provided if the
previous step is proven positive:

 * When "git add -u" is run without any pathspec, and when the user does
   not have the configuration variable, warn loudly that the default
   behaviour will change in 1.8.0, and tell the users that the current
   behaviour is still available by setting the configuration variable.

Step 3, at 1.8.0 and probably one or two more cycles:

 * When "git add -u" is run without any pathspec, and when the user does
   not have the configuration variable, warn loudly that the default
   behaviour _has_ changed in 1.8.0, to help people who migrated from
   early 1.7.X before Step 2 directly to 1.8.X series.

Step 4, 3 cycles after 1.8.0:

 * Drop the warning.

> PS. What about -A?

I personally think it should change exactly the same way as "-u" for
consistency, but I had the impression that the list concensus was to keep
the current behaviour.

Has anybody been keeping tallies on the discussion around

  http://thread.gmane.org/gmane.comp.version-control.git/166135/focus=166457

We seem to have lost track.  All I recall was that I changed my mind and
migrated from the third camp (the command defaults to whichever somebody
thought would be more convenient, lacking consistency across command set)
to "it would be more convenient to default to full-tree when there is no
pathspec, as limiting to cwd with '.' is easier" camp myself, but the
discussion is not about my personal preference but about seeing if we have
an overwhelming majority consensus, so...

--
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]