Re: [PATCh] jit-trackdown

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCh] jit-trackdown

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:41:55

quoted
quoted
quoted
quoted
"DG" == David Greaves [off-list ref] writes:
DG> Should really be cg-trackdown

Thanks for your kind words and the patch.

     head="$1"
    +if [ $head == "HEAD" ]; then
    +  head=$(cat .git/HEAD)
    +elif [ -f .git/refs/tags/$head ]; then
    +  head=$(cat .git/refs/tags/$head)
    +elif [ -f .git/refs/heads/$head ]; then
    +  head=$(cat .git/refs/heads/$head)
    +fi
    +

I have been primarily looking at the plumbing side and not the
toilet side, and I still have not grokked cg-* yet.  That's why
I did not do the right thing with these .git/refs/* stuff.  If
this were to become part of cg-* suite, I would recommend just
using $(commit-id) there, which should be the only one that
needs to know the .git/* structure convention.

Have toilet side gitters reached a concensus (or semi-concensus)
on how things under .git/ should be organized?  Is there a
summary somewhere, something along the following lines?

    In subdirectories under $GIT_PROJECT_TOP/.git, you have
    files that have some special meaning to the Cogito layer.
    These files are all 41-byte long, which stores a 40-byte
    SHA1 with terminating newline.  What is stored in each
    location is as follows:

    .git/HEAD           	Head commit object of the
                                current tree. 

    .git/refs/heads/$ext	Head commit object of the
                                external tree $ext.  [*Q1*]

    .git/refs/tags/$tag		Named Tag object. [*Q2*]

    *Q1* What is the syntax and semantics rule for $ext, like
         "$ext matches '^[-A-Za-z0-9_]$' and is one of the
         entries in .git/remotes"?

    *Q2* What is the syntax and semantics rule for $tag, like
         "$tag matches '^[-A-Za-z0-9_]$' and can be anything not
         just commit"?

Re: [PATCh] jit-trackdown

From: Daniel Barkalow <hidden>
Date: 2016-06-15 22:41:55

On Fri, 29 Apr 2005, Junio C Hamano wrote:
Have toilet side gitters reached a concensus (or semi-concensus)
on how things under .git/ should be organized?  Is there a
summary somewhere, something along the following lines?
I've made a proposal like the following:

.git/
  objects/    (traditional)
  refs/       Directories of hex SHA1 + newline files
    heads/    Commits which are heads of various sorts
    tags/     Tags, by the tag name (or some local renaming of it)
  info/       Other shared information
    remotes
  ...         Everything else isn't shared
  HEAD        Symlink to refs/heads/<something>

The plumbing doesn't care what you name heads or tags, but expects things
to be in heads to be commit objects and tags to be tag objects (which can
tag whatever).

AFAICT, there is general concensus that this is how things should be, but
I haven't convinced Linus that the plumbing should know about anything
other than objects/.

	-Daniel
*This .sig left intentionally blank*
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help