[RFD] On deprecating "git-foo" for builtins

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <users@...>, <git@...>
Date: Saturday, August 23, 2008 - 11:33 pm

People seems to have quite strong negative feelings on the removal of
dashed form "git-foo" commands from their $PATH.

We have deprecated the dashed form in early 2006, and announced that 1.6.0
will remove them from $PATH in the 1.5.4 release notes, with instructions
on how to update their scripts before 1.6.0 happens. Many people knew
about this transition, but they didn't do anything about it. Since 2005,
git has matured enough that majority of people are using it without
building one themselves, without a chance to even read Release Notes.

The pain was exacerbated partly because we tried to be too nice during the
"deprecation" period, not to annoy people and not to break people's
scripts.

But that niceness backfired. Many people seem to argue now that we should
have annoyed people by throwing loud deprecation notices to stderr when
they typed "git-foo", and we should have risked breaking their scripts iff
they relied on not seeing anything extra on the stderr.

I am 50% sympathetic to them, while the remainder of me think that they
can say that in retrospect only because they didn't actually got annoyed
with such extra messages and they did not have to fix their scripts before
the actual switch-over happened. If we did go the "annoy them early"
route, I am sure they would have complained as loudly.

That's all history now anyway. We should try to do better the next time,
which is much more important, and that is the topic of this message.

Now, we haven't set the timeframe yet, but the original plan, advocated by
Linus and others, was to eventually stop installing "git-foo" form on the
filesystem for builtin commands. If we were to do this, we should plan
how the deprecation period for this change should look like. I think the
sequence of events would look like this:

(1) Declare that the dashed form are deprecated even in scripts that use
"git --exec-path" the way 1.5.4 release notes suggested (it does not
make sense to say "deprecated only for builtins", as the distinction
between builtins and others are implementation details) and will be
removed in 1.7.0;

(2) Update git.c (the "git" wrapper) so that when the command is invoked
in "git-foo" form for a builtin, issue messages to the standard error
stream about the deprecation. Also, when the wrapper invokes an
external "git-foo" command, it exports an environment variable (say,
"GIT_WRAPPER_IS_RUNNING_YOU");

Update non-builtin commands and scripts to first check the
environment variable, and otherwise issue the same deprecation
message, and then unset the environment variable before continuing.

(3) At 1.7.0, stop installing the hardlinks to builtin commands.

There is one alternative, and one augmentation:

(A) We do not do anything.

(B) In addition to the main transition plan, outside git, prepare an
optional "git-old-style" package that installs many "git-foo"
wrappers in $PATH (i.e. /usr/bin). Each of them exec "git foo".
People who like the dashed form can keep typing "git-foo", even
though that will cost them two exec()s.

I personally do not mind seeing dozens of git-foo commands in /usr/bin,
did not have strong opinion on the transition we just did either way, but:

* Alternative (A) does not logically make much sense. Now with 1.6.0,
people are strongly encouraged to use "git foo" form already.

* Variant (B) feels quite backwards and I think it will have a negative
effect on our userbase in the longer term. People who train their
fingers to say "git-foo" on machines with the "git-old-style" package
will have hard time adjusting to working on machines without it.

--
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:
[RFD] On deprecating "git-foo" for builtins, Junio C Hamano, (Sat Aug 23, 11:33 pm)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., A Large Angry SCM, (Mon Aug 25, 10:58 pm)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., A Large Angry SCM, (Tue Aug 26, 7:12 am)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., Johannes Schindelin, (Mon Aug 25, 2:19 pm)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., Felipe Contreras, (Fri Aug 29, 10:12 am)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., Johannes Schindelin, (Thu Aug 28, 11:34 am)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., Johannes Schindelin, (Thu Aug 28, 3:18 pm)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., Johannes Schindelin, (Thu Aug 28, 11:32 am)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., A Large Angry SCM, (Tue Aug 26, 8:34 pm)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., Dominik Brodowski, (Tue Aug 26, 2:09 pm)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., Dominik Brodowski, (Tue Aug 26, 5:08 pm)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., Johannes Schindelin, (Thu Aug 28, 11:24 am)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., Johannes Schindelin, (Thu Aug 28, 11:21 am)
Re: [RFD] On deprecating "git-foo" for builtins, Jean Delvare, (Wed Aug 27, 3:42 am)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., Geert Uytterhoeven, (Wed Aug 27, 11:14 am)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., Matthias Kestenholz, (Tue Aug 26, 12:04 pm)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., Felipe Contreras, (Fri Aug 29, 12:11 pm)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., Felipe Contreras, (Fri Aug 29, 12:28 pm)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., Matthias Kestenholz, (Fri Aug 29, 4:27 am)
Re: git-* in test scripts, Junio C Hamano, (Thu Aug 28, 8:04 pm)
Re: git-* in test scripts, Jeff King, (Thu Aug 28, 8:10 pm)
[PATCH] bash completion: Hide more plumbing commands, Petr Baudis, (Tue Aug 26, 1:11 pm)
Re: [PATCH] bash completion: Hide more plumbing commands, Jakub Narebski, (Tue Aug 26, 1:38 pm)
Re: [PATCH] bash completion: Hide more plumbing commands, Junio C Hamano, (Thu Sep 4, 12:57 am)
Re: [PATCH] bash completion: Hide more plumbing commands, Shawn O. Pearce, (Tue Aug 26, 1:24 pm)
Re: [PATCH] bash completion: Hide more plumbing commands, Junio C Hamano, (Tue Aug 26, 2:25 pm)
Re: [PATCH] bash completion: Hide more plumbing commands, Daniel Barkalow, (Tue Aug 26, 3:04 pm)
Re: [PATCH] bash completion: Hide more plumbing commands, Shawn O. Pearce, (Tue Aug 26, 3:07 pm)
Re: [PATCH] bash completion: Hide more plumbing commands, Daniel Barkalow, (Tue Aug 26, 3:23 pm)
Re: [PATCH] bash completion: Hide more plumbing commands, Shawn O. Pearce, (Tue Aug 26, 2:27 pm)
Re: [PATCH] bash completion: Hide more plumbing commands, Jakub Narebski, (Tue Aug 26, 1:43 pm)
git-show vs git-log (or: git show vs git log), Dominik Brodowski, (Thu Aug 28, 3:46 am)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., Nguyen Thai Ngoc Duy, (Tue Aug 26, 1:47 pm)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., Felipe Contreras, (Mon Aug 25, 10:38 am)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., A Large Angry SCM, (Mon Aug 25, 11:00 pm)
Re: [kernel.org users] [RFD] On deprecating "git-foo" for bu..., Geert Uytterhoeven, (Mon Aug 25, 8:17 am)