summaryrefslogtreecommitdiff
path: root/refs.c
AgeCommit message (Collapse)AuthorFilesLines
2005-08-16[PATCH] Make do_each_ref() follow symlinks.Libravatar Matt Draisey1-1/+1
Because there is no reason not to, and this makes things a bit safer when running "git prune". [jc: I do not necessarily agree with the reasoning of the original author that it is a good way to keep "git prune" from stomping on objects to have a symlink that points at .git/refs of the repository A in the .git/refs of the repository B when repository A borrows object database from repository B. For one thing, the object database that everybody borrows objects from may not even have its own .git/refs hierarchy. Come to think of it, maybe we should disallow symlink inside .git/refs hierarchy; we update the files there by creat/rename pair, so having symlinks would not work anyway when you do anything that would update them.] Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-09[PATCH] -Werror fixesLibravatar Timo Sirainen1-3/+3
GCC's format __attribute__ is good for checking errors, especially with -Wformat=2 parameter. This fixes most of the reported problems against 2005-08-09 snapshot.
2005-07-08Make "for_each_ref()" always use the "canonical" refname.Libravatar Linus Torvalds1-8/+7
It always uses a git-relative pathname, ie "refs/heads/master" instead of ".git/refs/heads/master" or whatever your GIT_DIR might be. This way when we send refs back-and-forth between repositories, there's never any question about GIT_DIR on either side.
2005-07-05Fix silly thinko in "head_ref()"Libravatar Linus Torvalds1-2/+2
It did a "for_each_ref()" in addition to the HEAD case, which was a left-over from an early broken test.
2005-07-05Add "git_path()" and "head_ref()" helper functions.Libravatar Linus Torvalds1-0/+9
"git_path()" returns a static pathname pointer into the git directory using a printf-like format specifier. "head_ref()" works like "for_each_ref()", except for just the HEAD.
2005-07-04Clean up output of "for_each_ref()" when GIT_DIR is "."Libravatar Linus Torvalds1-0/+5
Remove the "./" at the head, it just looks much nicer.
2005-07-03Fix up "for_each_ref()" to be more usable, and use it in git-fsck-cacheLibravatar Linus Torvalds1-5/+5
It needed to take the GIT_DIR information into account, something that the original receive-pack usage just never cared about.
2005-07-02Generalize the "show each ref" code in receice-packLibravatar Linus Torvalds1-0/+65
This turns it into a generic "do xyz for each ref" library function.
2005-06-06[PATCH] Operations on refsLibravatar Daniel Barkalow1-0/+173
This patch adds code to read a hash out of a specified file under {GIT_DIR}/refs/, and to write such files atomically and optionally with an compare and lock. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>