From: Linus Torvalds <torvalds@osdl.org>
To: Jerome Lovy <t2a2e9z8ncbs9qg@brefemail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: "stage files" vs "cached files"
Date: Thu, 19 Oct 2006 08:58:27 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0610190853180.3962@g5.osdl.org> (raw)
In-Reply-To: <eh7vl2$unr$1@sea.gmane.org>
On Thu, 19 Oct 2006, Jerome Lovy wrote:
>
> after having read tutorial1+2, I thought the following were more or less
> synonyms: index ~ directory cache ~ staging area
>
> But then I discover that --cache and --staged are two different things,
> notably when using ls-files.
>
> The documentation states indeed:
> "--cached Show cached files in the output"
> "--stage Show stage files in the output"
That is indeed confusing.
It shouldn't be "stage files". It should be "file stages".
The "stage" of a file is something that is meaningful on merges. Normally
all files are in "stage 0", which means that it's fully merged. So when
you do
git ls-files --stage
you'll see a listing of all the files, with their file modes, SHA1's,
"stage" and filename. And you'll basically always see "0" in the stage
column.
But if you have had a merge that didn't resolve automatically, you can see
the same filename listed up to three times, with stages 1, 2 and 3 (a zero
will never be combined with any other stage - you'll only see a zero
alone).
That just shows how that particular file came to be: a "stage 1" entry is
the base branch version (the "common ancestor"), while stages 2 and 3 are
the first and second branch respectively.
> I'm a bit confused. Is maybe a "stage file" entry missing in the glossary?
That term doesn't exist, so it shouldn't be in the glossary (or in any
man-pages). But the "merge stage" _of_ a file is a real concept.
Linus
next prev parent reply other threads:[~2006-10-19 15:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-19 13:45 "stage files" vs "cached files" Jerome Lovy
2006-10-19 15:58 ` Linus Torvalds [this message]
2006-10-19 15:58 ` Andy Whitcroft
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=Pine.LNX.4.64.0610190853180.3962@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=git@vger.kernel.org \
--cc=t2a2e9z8ncbs9qg@brefemail.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 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).