diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2007-04-12 12:29:40 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-04-12 15:09:25 -0700 |
commit | e011054b0fdcd1e29d85cdde7ffa5d5c125bd753 (patch) | |
tree | aee845f25f0f7464636bf87a0fcfc6268dcd26e1 /builtin-show-ref.c | |
parent | Teach directory traversal about subprojects (diff) | |
download | tgif-e011054b0fdcd1e29d85cdde7ffa5d5c125bd753.tar.xz |
Teach git-update-index about gitlinks
I finally got around to looking at Alex' patch to teach update-index about
gitlinks too, so that "git commit -a" along with any other explicit
update-index scripts can work.
I don't think there was anything wrong with Alex' patch, but the code he
patched I felt was just so ugly that the added cases just pushed it over
the edge. Especially as I don't think that patch necessarily did the right
thing for a gitlink entry that already existed in the index, but that
wasn't actually a real git repository in the working tree (just an empty
subdirectory or a non-git snapshot because it hadn't wanted to track that
particular subproject).
So I ended up deciding to clean up the git-update-index handling the same
way I tackled the directory traversal used by git-add earlier: by
splitting the different cases up into multiple smaller functions, and just
making the code easier to read (and adding more comments about the
different cases).
So this replaces the old "process_file()" with a new "process_path()"
function that then just calls out to different helper functions depending
on what kind of path it is. Processing a nondirectory ends up being just
one of the simpler cases.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-show-ref.c')
0 files changed, 0 insertions, 0 deletions