Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'reset.c')
-rw-r--r--reset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/reset.c b/reset.c
index 3e7b9e2e13..3537de91f6 100644
--- a/reset.c
+++ b/reset.c
@@ -126,7 +126,7 @@ reset_head_refs:
ret = create_symref("HEAD", switch_to_branch,
reflog_head);
}
- if (run_hook)
+ if (!ret && run_hook)
run_hook_le(NULL, "post-checkout",
oid_to_hex(head ? head : null_oid()),
oid_to_hex(oid), "1", NULL);