Merge branch 'js/maint-submodule-checkout' into maint
authorJunio C Hamano <gitster@pobox.com>
Sat, 18 Apr 2009 21:18:29 +0000 (14:18 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 18 Apr 2009 21:18:29 +0000 (14:18 -0700)
* js/maint-submodule-checkout:
Fix 'git checkout <submodule>' to update the index

1  2 
builtin-checkout.c
diff --combined builtin-checkout.c
index ed0f318c0ce8a1c70ff3e45605c760c8bbb173f2,c0abe1ca77b5a7a3120ec1b0e422950f8d151817..b121fe56de884867b31aeeb5bd704bdaf0310310
@@@ -53,9 -53,6 +53,6 @@@ static int update_some(const unsigned c
        int len;
        struct cache_entry *ce;
  
-       if (S_ISGITLINK(mode))
-               return 0;
        if (S_ISDIR(mode))
                return READ_TREE_RECURSIVE;
  
@@@ -501,10 -498,10 +498,10 @@@ static void update_refs_for_switch(stru
                create_symref("HEAD", new->path, msg.buf);
                if (!opts->quiet) {
                        if (old->path && !strcmp(new->path, old->path))
 -                              fprintf(stderr, "Already on \"%s\"\n",
 +                              fprintf(stderr, "Already on '%s'\n",
                                        new->name);
                        else
 -                              fprintf(stderr, "Switched to%s branch \"%s\"\n",
 +                              fprintf(stderr, "Switched to%s branch '%s'\n",
                                        opts->new_branch ? " a new" : "",
                                        new->name);
                }
                           REF_NODEREF, DIE_ON_ERR);
                if (!opts->quiet) {
                        if (old->path)
 -                              fprintf(stderr, "Note: moving to \"%s\" which isn't a local branch\nIf you want to create a new branch from this checkout, you may do so\n(now or later) by using -b with the checkout command again. Example:\n  git checkout -b <new_branch_name>\n", new->name);
 +                              fprintf(stderr, "Note: moving to '%s' which isn't a local branch\nIf you want to create a new branch from this checkout, you may do so\n(now or later) by using -b with the checkout command again. Example:\n  git checkout -b <new_branch_name>\n", new->name);
                        describe_detached_head("HEAD is now at", new->commit);
                }
        }