From 2031bd979dc9c27b303e0a53bc0cc9f4f0ef715a Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 28 Oct 2025 10:34:32 -0300 Subject: plumb: robust git commit directory handling --- lib/plumbing | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/plumbing b/lib/plumbing index 650f869..61b5426 100644 --- a/lib/plumbing +++ b/lib/plumbing @@ -1,7 +1,8 @@ editor = acme -include basic type is text data matches '[0-9a-f]*[a-f][0-9a-f]*' data matches '([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]+)' -plumb start rc -c 'cd '$wdir'; cd `{git rev-parse --show-toplevel} && [ -d .git ] && git show '$1' | plumb -i -d edit -a ''action=showdata filename=+git/'$1''' ' +plumb start rc -c 'ifs=''''; cd `{echo '$wdir' | perl -pe ''chomp if eof''}; cd `{git rev-parse --show-toplevel | perl -pe ''chomp if eof''} && git show '$1' | plumb -i -d edit -a ''action=showdata filename=+git/'$1''' ' + +include basic -- cgit 1.3.0-6-gf8a5