From: qwx@sciops.net
To: 9front@9front.org
Subject: [9front] git/import: fix handling relative paths
Date: Sat, 24 Sep 2022 15:37:33 +0200 [thread overview]
Message-ID: <CE79A97255EB9305CEED92ECDF8709A7@wopr.sciops.net> (raw)
Hello,
This fixes git/import with relative file names not from the git root:
; bind -bc /dist/plan9front /
; cd /usr/seymour
; git/import butz
... tries to open /butz rather than /usr/seymour/butz.
Comments?
Thanks,
qwx
diff e81e1b80842b6d25eb5ab9dc8bc86f37ec2f5316 uncommitted
--- a/sys/src/cmd/git/import
+++ b/sys/src/cmd/git/import
@@ -110,7 +110,7 @@
patches=(/fd/0)
if(! ~ $#* 0)
- patches=$*
+ patches=`{cleanname -d $gitrel $*}
for(p in $patches){
# upas serves the decoded header and body separately,
# so we cat them together when applying a upas message.
next reply other threads:[~2022-09-24 13:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-24 13:37 qwx [this message]
2022-09-24 14:38 ` ori
2022-09-24 15:54 ` qwx
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CE79A97255EB9305CEED92ECDF8709A7@wopr.sciops.net \
--to=qwx@sciops.net \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).