Merge branch 'fc/trivial'
authorJunio C Hamano <gitster@pobox.com>
Tue, 17 Sep 2013 18:42:34 +0000 (11:42 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 Sep 2013 18:42:34 +0000 (11:42 -0700)
* fc/trivial:
pull: use $curr_branch_short more
add: trivial style cleanup
reset: trivial style cleanup
branch: trivial style fix
reset: trivial refactoring

1  2 
builtin/add.c
builtin/reset.c
git-pull.sh
diff --cc builtin/add.c
Simple merge
diff --cc builtin/reset.c
index 5e4c551531896ebd993d2a2c2903e4b7d257ed31,7e65934a82c0212f176bb604c6f22cd5904c7198..088ccffba07a4227150290492f22dc3bbac56fdc
@@@ -330,11 -323,14 +330,14 @@@ int cmd_reset(int argc, const char **ar
                die_if_unmerged_cache(reset_type);
  
        if (reset_type != SOFT) {
-               struct lock_file *lock = xcalloc(1, sizeof(struct lock_file));
+               struct lock_file *lock = xcalloc(1, sizeof(*lock));
                int newfd = hold_locked_index(lock, 1);
                if (reset_type == MIXED) {
 -                      if (read_from_tree(pathspec, sha1))
+                       int flags = quiet ? REFRESH_QUIET : REFRESH_IN_PORCELAIN;
 +                      if (read_from_tree(&pathspec, sha1))
                                return 1;
+                       refresh_index(&the_index, flags, NULL, NULL,
+                                     _("Unstaged changes after reset:"));
                } else {
                        int err = reset_index(sha1, reset_type, quiet);
                        if (reset_type == KEEP && !err)
diff --cc git-pull.sh
Simple merge