From: Linus Torvalds <torvalds@linux-foundation.org>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: Theodore Tso <tytso@mit.edu>, Elijah Newren <newren@gmail.com>,
Scott Chacon <schacon@gmail.com>, git list <git@vger.kernel.org>
Subject: Re: EasyGit Integration
Date: Wed, 10 Jun 2009 16:04:49 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.2.01.0906101555590.6847@localhost.localdomain> (raw)
In-Reply-To: <94a0d4530906101531ja6f1deeob703f546d62e7599@mail.gmail.com>
On Thu, 11 Jun 2009, Felipe Contreras wrote:
> On Wed, Jun 10, 2009 at 7:03 AM, Linus
> Torvalds<torvalds@linux-foundation.org> wrote:
> >
> >
> > On Tue, 9 Jun 2009, Theodore Tso wrote:
> >>
> >> My personal opinion is this kind of overloading is actually more
> >> confusing than simply adding a new name, such as "git revert-file".
> >
> > I'd agree, except I think it actually worked pretty well in "git
> > checkout".
> >
> > The alternative was to add yet another command for that, or to teach
> > people about the internal commands we did have. Adding the capability for
> > checkout to check out individual files - in addition to commits and
> > branches - I think worked pretty well.
>
> Why? What makes 'git checkout <commit>' and 'git checkout <commit> --
> <path>' similar at all? I would expect 'git checkout <commit>' to be
> the same as 'git checkout <commit> -- .'
You don't understand.
"git checkout" would be similar to "git revert", if we did that change.
IOW, both would be "if you give it a commit, it acts at a commit level",
and "if you give it pathnames, it acts on a pathname level".
That is totally obvious, and not in the least confusing. They are two
different things, but at the same time, there is no question about which
is which.
> In my mind these are 2 completely different commands.
They are two different things, but they both make sense within the
_context_.
Only earthworms and FOX news have no concept of "in context". So it does
make sense to say "git checkout filename" (and expect it to check out that
_filename_ - surprise surprise), and also say "git checkout branch" (and
expect it to check out that branch - again, big surprise).
Humans are generally _very_ good at seeing the same word in two different
contexts, and not being confused at all. There is no confusion when I talk
about SCM's in the context of git, even though "SCM" could also mean a
Sceme interpreter, or "Saskatchewan College of Midwives".
In fact, it is often *much* better to accept context-awareness, than to
try too hard to be "uniquely identifying" even without context.
Of course, you do want things to also be unambiguous. But that's why we
have things like that "--" thing, when we want to specify pathspecs
explicitly and don't want to accept any kind of ambiguity. Most humans
tend to leave them out, and that "--" thing shows up mostly in git
scripts.
Linus
next prev parent reply other threads:[~2009-06-10 23:06 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-09 18:59 EasyGit Integration Scott Chacon
2009-06-09 19:43 ` Nicolas Pitre
2009-06-09 19:52 ` Avery Pennarun
2009-06-09 20:37 ` Björn Steinbrink
2009-06-09 20:42 ` Avery Pennarun
2009-06-10 12:13 ` Björn Steinbrink
2009-06-09 20:49 ` Elijah Newren
2009-06-10 1:09 ` Miles Bader
2009-06-09 20:12 ` Björn Steinbrink
2009-06-09 20:40 ` Elijah Newren
2009-06-09 21:18 ` Björn Steinbrink
2009-06-09 21:27 ` Björn Steinbrink
2009-06-09 21:36 ` Junio C Hamano
2009-06-09 21:48 ` Elijah Newren
2009-06-09 22:00 ` Elijah Newren
2009-06-10 12:52 ` Matthieu Moy
2009-06-09 22:14 ` Linus Torvalds
2009-06-09 22:30 ` Elijah Newren
2009-06-09 22:40 ` Linus Torvalds
2009-06-10 0:40 ` Mark Lodato
2009-06-10 3:11 ` Miles Bader
2009-06-10 3:32 ` Theodore Tso
2009-06-10 4:03 ` Linus Torvalds
2009-06-10 22:31 ` Felipe Contreras
2009-06-10 23:04 ` Linus Torvalds [this message]
2009-06-10 23:57 ` Scott Chacon
2009-06-11 0:15 ` Jakub Narebski
2009-06-11 0:30 ` Felipe Contreras
2009-06-11 0:42 ` Jakub Narebski
2009-06-12 20:57 ` Felipe Contreras
2009-06-12 21:21 ` Jakub Narebski
2009-06-12 21:48 ` Felipe Contreras
2009-06-12 22:05 ` Jakub Narebski
2009-06-12 22:30 ` Felipe Contreras
2009-06-13 1:24 ` Björn Steinbrink
2009-06-11 0:18 ` Felipe Contreras
2009-06-10 4:20 ` Elijah Newren
2009-06-10 14:40 ` Matthieu Moy
2009-06-10 1:25 ` Sam Vilain
2009-06-10 1:59 ` Linus Torvalds
2009-06-10 2:18 ` Junio C Hamano
2009-06-10 2:52 ` Sam Vilain
2009-06-10 6:43 ` Jakub Narebski
2009-06-10 3:27 ` Nicolas Pitre
2009-06-10 20:47 ` Junio C Hamano
2009-06-10 22:28 ` Elijah Newren
2009-06-10 16:48 ` Scott Chacon
2009-06-10 22:15 ` Felipe Contreras
2009-06-10 22:04 ` Felipe Contreras
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=alpine.LFD.2.01.0906101555590.6847@localhost.localdomain \
--to=torvalds@linux-foundation.org \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=newren@gmail.com \
--cc=schacon@gmail.com \
--cc=tytso@mit.edu \
/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).