]> git.ipfire.org Git - thirdparty/git.git/commit
Teach "git-read-tree -u" to check out submodules as a directory
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 13 Apr 2007 04:08:52 +0000 (21:08 -0700)
committerJunio C Hamano <junkio@cox.net>
Fri, 13 Apr 2007 04:24:34 +0000 (21:24 -0700)
commit9129e056fb021df45d98c9472b6029456941a508
treef083f0a884293b0babecb800a048bb63eddad8d9
parentea376fa7f2c209593bcc63008a2831fe013d4e39
Teach "git-read-tree -u" to check out submodules as a directory

This actually allows us to check out a supermodule after cloning, although
the submodules will obviously not be checked out, and will just be an
empty subdirectory.

[ Side note: this also shows that we currently don't correctly handle
  such subprojects that aren't checked out correctly yet.  They should
  always show up as not being modified, but failing to resolve the
  gitlink HEAD does not properly trigger the "not modified" logic in all
  places it needs to..

  So more work to be done, but that's a separate issue, unrelated to
  the action of checking out the superproject. ]

The bulk of this patch is simply because we need to check the type of the
index entry *before* we try to read the object it points to, and that
meant that the code needed some re-organization. So I moved some of the
code in common to both symlinks and files to be a trivial helper function.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
entry.c