Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion builtin/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
int flags = quiet ? REFRESH_QUIET : REFRESH_IN_PORCELAIN;
if (read_from_tree(&pathspec, &oid, intent_to_add))
return 1;
the_index.updated_skipworktree = 1;
if (!quiet && get_git_work_tree()) {
uint64_t t_begin, t_delta_in_ms;

Expand All @@ -470,7 +471,6 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
"use '--quiet' to avoid this. Set the config setting reset.quiet to true\n"
"to make this the default.\n"), t_delta_in_ms / 1000.0);
}
the_index.updated_skipworktree = 1;
}
} else {
int err = reset_index(&oid, reset_type, quiet);
Expand Down
2 changes: 1 addition & 1 deletion t/t7113-post-index-changed-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ test_expect_success 'test reset --mixed and update-index triggers the hook' '
EOF
: force index to be dirty &&
test-tool chmtime +60 dir1/file1.txt &&
git reset --mixed HEAD~1 &&
git reset --mixed --quiet HEAD~1 &&
test_path_is_file testsuccess && rm -f testsuccess &&
test_path_is_missing testfailure &&
git hash-object -w --stdin <dir1/file2.txt >expect &&
Expand Down