From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <sbeller@google.com>
Cc: Jacob Keller <jacob.keller@gmail.com>,
Graeme Geldenhuys <graemeg@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: Git's inconsistent command line options
Date: Tue, 25 Aug 2015 16:43:38 -0700 [thread overview]
Message-ID: <xmqqa8tfvsr9.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAGZ79kZ6KK0qVtzrxmmsBQqmz-dgamC4f6W0zVTQLcuYi==0fw@mail.gmail.com> (Stefan Beller's message of "Tue, 25 Aug 2015 15:06:20 -0700")
Stefan Beller <sbeller@google.com> writes:
> $ git tag --delete master
> $ echo $?
> # 0 # actually works as of today!
>
> $ git tag delete master
> # Due to the planned switch to command words, this doesn't work.
> # For details see road map at `man git commandwords-roadmaps`
> $ echo $?
> # 128 maybe ?
This is way too aggressive behaviour and is unacceptable as the
first step. The first step of a transition that breaks backward
compatibility should warn loudly about a command line that would
behave differently in the endgame version (either the command line
that will not do anything or do a totally different thing), but
still perform the operation asked for the current version.
e.g. "git tag delete master" would create a tag named 'delete'
out of 'master', but tell the user that this will instead delete
'master' in future versions of Git. "git tag create master"
would create a tag named 'create' out of 'master', but tell the
user that this will instead create 'master' out of HEAD in
future versions of Git.
e.g. "git tag -d foo" would delete a tag named 'foo', but tell
the user that this will have to be spelled 'git tag delete foo'
in the future versions of Git.
One thing that I am not enthused about the transition plan is that
"git tag delete master" will *never* be an invalid operation during
the transition. When making an operation that used to mean one
thing to mean something else, a good transition plan should be to
* First warn but do the old thing, and tell users a new way to do
that in the new world order. At the same time, find the new way
that used to be an invalid operation in the old world order, and
implement it.
* Then stop supporting the old thing and support only the new
thing.
Then during the transition period, while transitioning to the new
way, people can gradually start using the new way with the new
system, and when they occasionally have to interact with an old
system, the new way will _error out_, because we make sure we find
the new way that "used to be an invalid operation" when planning the
whole transition plan, without causing any harm. And once people
retrain their finger after 2-3 years, nobody will be hurt if we
dropped the old way.
I do not see a good way to do such a safe transition with command
words approach, *unless* we are going to introduce new commands,
i.e. "git list-tag", "git create-tag", etc.
So don't hold your breath. What you two are discussing is way too
uncooked for 2.6 timeframe.
next prev parent reply other threads:[~2015-08-25 23:43 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-25 8:01 Git's inconsistent command line options Graeme Geldenhuys
2015-08-25 15:13 ` Junio C Hamano
2015-08-25 21:49 ` Jacob Keller
2015-08-25 22:06 ` Stefan Beller
2015-08-25 22:21 ` Jacob Keller
2015-08-25 23:43 ` Junio C Hamano [this message]
2015-08-26 1:30 ` Hilco Wijbenga
2015-08-26 17:56 ` Junio C Hamano
2015-08-26 18:10 ` Jacob Keller
2015-08-26 20:48 ` Junio C Hamano
2015-08-26 22:52 ` Philip Oakley
2015-08-26 23:02 ` Jacob Keller
2015-08-26 23:03 ` Jacob Keller
2015-08-26 4:09 ` Jacob Keller
2015-08-26 6:28 ` Andreas Schwab
2015-08-26 6:33 ` Jacob Keller
2015-08-31 10:10 ` Duy Nguyen
2015-08-31 14:25 ` Barry Warsaw
2015-09-01 9:28 ` David Aguilar
2015-09-01 14:19 ` Barry Warsaw
2015-09-01 16:42 ` Junio C Hamano
2015-09-01 17:50 ` Barry Warsaw
2015-09-01 17:56 ` Stefan Beller
2015-09-09 9:42 ` Michael J Gruber
2015-09-09 9:42 ` Michael J Gruber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqa8tfvsr9.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=graemeg@gmail.com \
--cc=jacob.keller@gmail.com \
--cc=sbeller@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.