summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2006-09-14 10:14:47 -0700
committerJunio C Hamano <junkio@cox.net>2006-09-17 19:09:12 -0700
commit434cd0cd30d17bc703397a76480fdd129cecc064 (patch)
tree47a7cd0542594eb72c347fc13cd8a63375a85ae2 /refs.h
parented378ec7e85fd2c5cfcc7bd64b454236357fdd97 (diff)
downloadgit-434cd0cd30d17bc703397a76480fdd129cecc064.tar.gz
Enable the packed refs file format
This actually "turns on" the packed ref file format, now that the infrastructure to do so sanely exists (ie notably the change to make the reference reading logic take refnames rather than pathnames to the loose objects that no longer necessarily even exist). In particular, when the ref lookup hits a refname that has no loose file associated with it, it falls back on the packed-ref information. Also, the ref-locking code, while still using a loose file for the locking itself (and _creating_ a loose file for the new ref) no longer requires that the old ref be in such an unpacked state. Finally, this does a minimal hack to git-checkout.sh to rather than check the ref-file directly, do a "git-rev-parse" on the "heads/$refname". That's not really wonderful - we should rather really have a special routine to verify the names as proper branch head names, but it is a workable solution for now. With this, I can literally do something like git pack-refs find .git/refs -type f -print0 | xargs -0 rm -f -- and the end result is a largely working repository (ie I've done two commits - which creates _one_ unpacked ref file - done things like run "gitk" and "git log" etc, and it all looks ok). There are probably things missing, but I'm hoping that the missing things are now of the "small and obvious" kind, and that somebody else might want to start looking at this too. Hint hint ;) Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs.h b/refs.h
index 553155c04a..af347e6b19 100644
--- a/refs.h
+++ b/refs.h
@@ -2,7 +2,7 @@
#define REFS_H
struct ref_lock {
- char *ref_file;
+ char *ref_name;
char *log_file;
struct lock_file *lk;
unsigned char old_sha1[20];