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
path: root/refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-08-18 03:02:40 +0300
committerJunio C Hamano <gitster@pobox.com>2020-08-18 03:02:41 +0300
commit5676db26129bf18e77bb821d832b44c022dc9f47 (patch)
tree08cf277bcd65b13d73a5ae08f99a75fc4e4da94c /refs.c
parent878e727637ec5815ccb3301eb994a54df95b21b8 (diff)
parent09b2aa30c916bd6facb47a06711755f043b6f37e (diff)
Merge branch 'ps/ref-transaction-hook'
The logic to find the ref transaction hook script attempted to cache the path to the found hook without realizing that it needed to keep a copied value, as the API it used returned a transitory buffer space. This has been corrected. * ps/ref-transaction-hook: t1416: avoid hard-coded sha1 ids refs: fix interleaving hook calls with reference-transaction hook
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs.c b/refs.c
index 9e28912f73..ac2772fbda 100644
--- a/refs.c
+++ b/refs.c
@@ -2044,7 +2044,7 @@ static int run_transaction_hook(struct ref_transaction *transaction,
if (hook == &hook_not_found)
return ret;
if (!hook)
- hook = find_hook("reference-transaction");
+ hook = xstrdup_or_null(find_hook("reference-transaction"));
if (!hook) {
hook = &hook_not_found;
return ret;