From: Junio C Hamano Date: Tue, 17 Sep 2013 18:42:34 +0000 (-0700) Subject: Merge branch 'fc/trivial' X-Git-Tag: v1.8.5-rc0~126 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c8ccfc9cdf3381525cce718c846bc62fd86767f7 Merge branch 'fc/trivial' * fc/trivial: pull: use $curr_branch_short more add: trivial style cleanup reset: trivial style cleanup branch: trivial style fix reset: trivial refactoring --- c8ccfc9cdf3381525cce718c846bc62fd86767f7 diff --cc builtin/reset.c index 5e4c551531,7e65934a82..088ccffba0 --- a/builtin/reset.c +++ b/builtin/reset.c @@@ -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) { + int flags = quiet ? REFRESH_QUIET : REFRESH_IN_PORCELAIN; - if (read_from_tree(pathspec, sha1)) + 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)