From: Junio C Hamano <gitster@pobox.com>
To: Ed Avis <eda@waniasset.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-checkout.txt: Document "git checkout <pathspec>" better
Date: Wed, 10 Jun 2015 09:38:25 -0700 [thread overview]
Message-ID: <xmqq7frbmsce.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <loom.20150610T170737-586@post.gmane.org> (Ed Avis's message of "Wed, 10 Jun 2015 15:11:57 +0000 (UTC)")
Ed Avis <eda@waniasset.com> writes:
> 'restore' may be more consistent with git's internal terminology.
> But from an outsider's perspective, 'revert' rather than 'restore' is in my
> view much clearer and more consistent with other version control systems:
> for example 'svn revert' is what you use to revert files in the working copy.
The reason why I said "restore" is because it does *not* have any
"internal terminology" connotation.
On the other hand, "revert" that means "create a counter-effect
commit" is not "internal". "git revert" is a part of end-user
facing command.
The only people that will be helped by using "revert" there will be
the ones who haven't learned "git revert". And it will make it
harder for them to learn "git revert". It is unfortunate that other
systems use the word "revert" in a different way, and that is why we
should avoid using that word when describing "checkout".
> The original issue was that I naively expected that 'git checkout PATH' would
> indeed just 'restore' some files, that is, create them when they are missing.
> ...
> If 'revert' is not a suitable verb because of the existing git-revert, then
> I suggest that 'overwrite' or 'replace' might better convey the idea of what
> the command does.
Git is about "contents", not "files". You modify a file, and
restore its contents to its pristine state. It is not "restore the
file", as Git is not about "files".
I think "overwrite is better" is primarily coming from not thinking
in terms of "Git tracks contents, not files".
next prev parent reply other threads:[~2015-06-10 16:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-08 20:21 [PATCH] git-checkout.txt: Document "git checkout <pathspec>" better Torsten Bögershausen
2015-06-10 15:05 ` Junio C Hamano
2015-06-10 15:11 ` Ed Avis
2015-06-10 16:38 ` Junio C Hamano [this message]
2015-06-11 10:24 ` [PATCH] git-checkout.txt: Document Ed Avis
2015-06-10 18:27 ` [PATCH] git-checkout.txt: Document "git checkout <pathspec>" better Torsten Bögershausen
2015-06-11 14:47 ` Junio C Hamano
2015-06-11 14:52 ` Ed Avis
2015-06-11 18:23 ` Junio C Hamano
2015-06-12 4:49 ` Scott Schmit
2015-06-12 16:24 ` Junio C Hamano
2015-06-12 20:41 ` Torsten Bögershausen
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=xmqq7frbmsce.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=eda@waniasset.com \
--cc=git@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).