Re: [DRAFT] Branching and merging with git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



linux@xxxxxxxxxxx wrote:

> Either way, they're just a 41-byte file that contains a 40-byte hex
> object ID, plus a newline.  Tags are stored in .git/refs/tags, and heads
> are stored in .git/refs/heads.  Creating a new branch is literally just
> picking a file name and writing the ID of an existing commit into it.

This is an implementation detail, and is not true in repository with
packed refs. Although usually (by default) only tags are packed.

But it remains true that ref (be it branch or tag) is just name and ID.

> The git programs enforce the immutability of tags, but that's a safety
> feature, not something fundamental.  You can rename a tag to the heads
> directory and go wild.

You can have only refs to commit objects in heads directory (and I hope
this is verified by fsck-objects), you can have refs to tag objects
(heavyweight tags), to commits (lightweight tags), to blobs (for example
public PGP key used for signing tags), to trees (I guess unused).

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]