From b107d856d100317f1d9a5e13ebdf02af01a750f8 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 18 Oct 2019 07:54:25 +0000 Subject: [PATCH] examples/grok-pull.post_update_hook: fix config detection We need to account for both the old ("mainrepo") and new ("inboxdir") names. But "dir" was just a search+replace error and we don't use that outside of "coderepo.dir". --- examples/grok-pull.post_update_hook.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/grok-pull.post_update_hook.sh b/examples/grok-pull.post_update_hook.sh index ab4e54e7..d003448e 100755 --- a/examples/grok-pull.post_update_hook.sh +++ b/examples/grok-pull.post_update_hook.sh @@ -26,7 +26,13 @@ else fi # run public-inbox-init iff unconfigured -cfg_dir=$(git config -f "$PI_CONFIG" publicinbox."$inbox_name".dir) +cfg_dir=$(git config -f "$PI_CONFIG" publicinbox."$inbox_name".inboxdir) + +# check legacy name for "inboxdir" +case $cfg_dir in +'') cfg_dir=$(git config -f "$PI_CONFIG" publicinbox."$inbox_name".mainrepo) ;; +esac + case $cfg_dir in '') remote_git_url=$(git --git-dir="$full_git_dir" config remote.origin.url) -- 2.44.0