summaryrefslogtreecommitdiff
path: root/builtin/checkout.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2014-03-28 13:51:11 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-03-28 13:51:11 -0700
commit9abf65d23ce8700c290fa4f7d834a10ec5b3e327 (patch)
tree8a378ca3c195c00c4f43a30ea89f3c12d844bf38 /builtin/checkout.c
parentMerge branch 'ah/doc-gitk-config' (diff)
parentrun-command: mark run_hook_with_custom_index as deprecated (diff)
downloadtgif-9abf65d23ce8700c290fa4f7d834a10ec5b3e327.tar.xz
Merge branch 'bp/commit-p-editor'
When it is not necessary to edit a commit log message (e.g. "git commit -m" is given a message without specifying "-e"), we used to disable the spawning of the editor by overriding GIT_EDITOR, but this means all the uses of the editor, other than to edit the commit log message, are also affected. * bp/commit-p-editor: run-command: mark run_hook_with_custom_index as deprecated merge hook tests: fix and update tests merge: fix GIT_EDITOR override for commit hook commit: fix patch hunk editing with "commit -p -m" test patch hunk editing with "commit -p -m" merge hook tests: use 'test_must_fail' instead of '!' merge hook tests: fix missing '&&' in test
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r--builtin/checkout.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index ada51fa70f..1b86d9c868 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -53,10 +53,10 @@ struct checkout_opts {
static int post_checkout_hook(struct commit *old, struct commit *new,
int changed)
{
- return run_hook(NULL, "post-checkout",
- sha1_to_hex(old ? old->object.sha1 : null_sha1),
- sha1_to_hex(new ? new->object.sha1 : null_sha1),
- changed ? "1" : "0", NULL);
+ return run_hook_le(NULL, "post-checkout",
+ sha1_to_hex(old ? old->object.sha1 : null_sha1),
+ sha1_to_hex(new ? new->object.sha1 : null_sha1),
+ changed ? "1" : "0", NULL);
/* "new" can be NULL when checking out from the index before
a commit exists. */