aboutsummaryrefslogtreecommitdiff
path: root/interpolate.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2007-04-12 12:29:40 -0700
committerJunio C Hamano <junkio@cox.net>2007-04-12 15:09:25 -0700
commite011054b0fdcd1e29d85cdde7ffa5d5c125bd753 (patch)
treeaee845f25f0f7464636bf87a0fcfc6268dcd26e1 /interpolate.c
parent095952585c2a955f45deac69df17a702d7584c80 (diff)
downloadgit-e011054b0fdcd1e29d85cdde7ffa5d5c125bd753.tar.gz
git-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 'interpolate.c')
0 files changed, 0 insertions, 0 deletions