[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Branching to replace XSL-FO
From: |
Greg Chicares |
Subject: |
Re: [lmi] Branching to replace XSL-FO |
Date: |
Fri, 3 Nov 2017 13:53:14 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 2017-10-28 00:56, Vadim Zeitlin wrote:
> On Sat, 28 Oct 2017 00:27:32 +0000 Greg Chicares <address@hidden> wrote:
>
> just do, when you're on your branch:
>
> $ git checkout vz-no-xslfo '*.mst'
> $ git commit -m 'Create template files'
[...]
> GC> I can check out your branch:
> GC> git checkout vz-no-xslfo
AFAICT, git-checkout does starkly different things in different contexts:
$git checkout gwc-no-xslfo
This switches from one branch to another, without changing any contents.
$git checkout vz-no-xslfo '*.mst'
This takes some files from the named branch and puts them in the current
branch, without switching branches.
There are two concepts here that are utterly distinct in my mind:
(1) switching among branches--i.e., just moving the asterisk here:
$git branch
gwc-no-xslfo
* master
vz-no-xslfo
(2) copying files across branches
and it pains me terribly to think that a single command serves both
purposes depending on whether or not I add an extra argument. Please
tell me I'm worrying over nothing.
Maybe this make sense if we think of git-checkout as fundamentally
meaning "change the working copy":
(a) git checkout X.txt
Replace working copy of named file with last commit.
(b) git checkout X.branch
Replace entire working copy with the set of files a branch contains.
(c) git checkout X.branch X.txt
Replace working copy of named file with the version last committed on
named branch.
Apparently it has multiple meanings, by deliberate design...
https://git-scm.com/docs/git-checkout
"Switch branches or restore working tree files"
....and, as with C++'s 'static' keyword, we must simply accept a
conflation of orthogonal concepts.
- Re: [lmi] Branching to replace XSL-FO,
Greg Chicares <=