diff options
| author | (quasar) nebula <qznebula@protonmail.com> | 2025-10-28 10:34:32 -0300 |
|---|---|---|
| committer | (quasar) nebula <qznebula@protonmail.com> | 2025-10-28 10:34:32 -0300 |
| commit | 2031bd979dc9c27b303e0a53bc0cc9f4f0ef715a (patch) | |
| tree | 099abf2b1ad1c6edcae30ff5ad1c32435d88e891 | |
| parent | 889dfe622abea16049e4d0743c865331c13bdab1 (diff) | |
plumb: robust git commit directory handling
| -rw-r--r-- | lib/plumbing | 5 |
1 files changed, 3 insertions, 2 deletions
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 |