summaryrefslogtreecommitdiff
path: root/builtin-checkout.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2009-04-02 15:30:25 +0200
committerJunio C Hamano <gitster@pobox.com>2009-04-02 13:16:42 -0700
commitbef3894847118ab8c8668ddc90fa238ae9e05baa (patch)
treecc0f8e7e6a15179d61c83cfbaca53db380a35ad0 /builtin-checkout.c
parent763481787174adfcc247d6044bea330edcb2cc24 (diff)
downloadgit-bef3894847118ab8c8668ddc90fa238ae9e05baa.tar.gz
Fix 'git checkout <submodule>' to update the index
While 'git checkout <submodule>' should not update the submodule's working directory, it should update the index. This is in line with how submodules are handled in the rest of Git. While at it, test 'git reset [<commit>] <submodule>', too. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-checkout.c')
-rw-r--r--builtin-checkout.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/builtin-checkout.c b/builtin-checkout.c
index 20b34ce6e1..c0abe1ca77 100644
--- a/builtin-checkout.c
+++ b/builtin-checkout.c
@@ -53,9 +53,6 @@ static int update_some(const unsigned char *sha1, const char *base, int baselen,
int len;
struct cache_entry *ce;
- if (S_ISGITLINK(mode))
- return 0;
-
if (S_ISDIR(mode))
return READ_TREE_RECURSIVE;