From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Avery Pennarun <apenwarr@gmail.com>,
Tay Ray Chuan <rctay89@gmail.com>,
Andrey Borzenkov <arvidjaar@mail.ru>,
git@vger.kernel.org
Subject: Re: Host refs to push are chosen (documentation error)?
Date: Wed, 17 Feb 2010 21:10:10 -0500 [thread overview]
Message-ID: <20100218021010.GA21693@coredump.intra.peff.net> (raw)
In-Reply-To: <7vaav7wb8v.fsf@alter.siamese.dyndns.org>
On Wed, Feb 17, 2010 at 06:04:00PM -0800, Junio C Hamano wrote:
> This is not about "I have packed refs/heads/master and then a loose
> refs/heads/master also exists" case. After packing, update ref simply
> creates a new loose ref, and we read loose ones and give precedence to it
> over packed one. This is so that you once gc and most of the unchanging
> refs will stay in packed file, but some active branches can be quickly
> flipped without having to rewrite the whole packed refs file (or removing
> the ref from that file).
>
> But the statement is not about that. The statement is about this:
>
> "refs/tags/master" gets higher precedence over "refs/heads/master",
> and this order is indifferent to where these two refs come from,
> either packed refs or loose in the filesystem.
Exactly what I meant, but if somebody as clueful as Avery gets confused,
then probably I need to be a bit more clear in my note.
Maybe just this squashed into my previous patch?
---
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index 9ee006b..1a613aa 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -197,15 +197,15 @@ blobs contained in a commit.
. if `$GIT_DIR/<name>` exists, that is what you mean (this is usually
useful only for `HEAD`, `FETCH_HEAD`, `ORIG_HEAD` and `MERGE_HEAD`);
- . otherwise, `$GIT_DIR/refs/<name>` if exists;
+ . otherwise, `refs/<name>` if exists;
- . otherwise, `$GIT_DIR/refs/tags/<name>` if exists;
+ . otherwise, `refs/tags/<name>` if exists;
- . otherwise, `$GIT_DIR/refs/heads/<name>` if exists;
+ . otherwise, `refs/heads/<name>` if exists;
- . otherwise, `$GIT_DIR/refs/remotes/<name>` if exists;
+ . otherwise, `refs/remotes/<name>` if exists;
- . otherwise, `$GIT_DIR/refs/remotes/<name>/HEAD` if exists.
+ . otherwise, `refs/remotes/<name>/HEAD` if exists.
+
HEAD names the commit your changes in the working tree is based on.
FETCH_HEAD records the branch you fetched from a remote repository
@@ -217,10 +217,8 @@ them easily.
MERGE_HEAD records the commit(s) you are merging into your branch
when you run 'git merge'.
+
-For any of the `$GIT_DIR/refs` cases above, packed refs from
-`$GIT_DIR/packed-refs` may be substituted (e.g., a line with
-`refs/heads/master` in the packed-refs file would have the same
-precedence as the file `$GIT_DIR/refs/heads/master`).
+Note that any of the `refs/*` cases above may come either from
+the `$GIT_DIR/refs` directory or from the `$GIT_DIR/packed-refs` file.
* A ref followed by the suffix '@' with a date specification
enclosed in a brace
next prev parent reply other threads:[~2010-02-18 2:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-17 13:27 Host refs to push are chosen (documentation error)? Andrey Borzenkov
2010-02-17 13:39 ` Tay Ray Chuan
2010-02-17 17:39 ` Avery Pennarun
2010-02-18 1:16 ` Jeff King
2010-02-18 1:51 ` Avery Pennarun
2010-02-18 2:04 ` Junio C Hamano
2010-02-18 2:10 ` Jeff King [this message]
2010-02-18 4:06 ` Junio C Hamano
2010-02-18 4:43 ` Jeff King
2010-02-18 5:13 ` Junio C Hamano
2010-02-18 2:04 ` Jeff King
2010-02-18 7:19 ` Andrey Borzenkov
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=20100218021010.GA21693@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=apenwarr@gmail.com \
--cc=arvidjaar@mail.ru \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=rctay89@gmail.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).