1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-10-31 22:37:54 +01:00
Commit graph

7 commits

Author SHA1 Message Date
Linus Torvalds
99a0a6e09f Make "for_each_ref()" always use the "canonical" refname.
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-08 13:56:05 -07:00
Linus Torvalds
2f34ba32dd Fix silly thinko in "head_ref()"
It did a "for_each_ref()" in addition to the HEAD case, which was a
left-over from an early broken test.
2005-07-05 15:45:00 -07:00
Linus Torvalds
723c31fea2 Add "git_path()" and "head_ref()" helper functions.
"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-05 11:31:32 -07:00
Linus Torvalds
6cada6a98d Clean up output of "for_each_ref()" when GIT_DIR is "."
Remove the "./" at the head, it just looks much nicer.
2005-07-04 15:28:19 -07:00
Linus Torvalds
944d858969 Fix up "for_each_ref()" to be more usable, and use it in git-fsck-cache
It needed to take the GIT_DIR information into account, something that
the original receive-pack usage just never cared about.
2005-07-03 10:01:38 -07:00
Linus Torvalds
8a65ff7666 Generalize the "show each ref" code in receice-pack
This turns it into a generic "do xyz for each ref" library function.
2005-07-02 20:23:36 -07:00
Daniel Barkalow
95fc75129a [PATCH] Operations on refs
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>
2005-06-06 17:09:45 -07:00