* [9front] git/import: fix handling relative paths
@ 2022-09-24 13:37 qwx
2022-09-24 14:38 ` ori
0 siblings, 1 reply; 3+ messages in thread
From: qwx @ 2022-09-24 13:37 UTC (permalink / raw)
To: 9front
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [9front] git/import: fix handling relative paths
2022-09-24 13:37 [9front] git/import: fix handling relative paths qwx
@ 2022-09-24 14:38 ` ori
2022-09-24 15:54 ` qwx
0 siblings, 1 reply; 3+ messages in thread
From: ori @ 2022-09-24 14:38 UTC (permalink / raw)
To: 9front
Quoth qwx@sciops.net:
> 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?
>
Yes, go for it.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [9front] git/import: fix handling relative paths
2022-09-24 14:38 ` ori
@ 2022-09-24 15:54 ` qwx
0 siblings, 0 replies; 3+ messages in thread
From: qwx @ 2022-09-24 15:54 UTC (permalink / raw)
To: 9front
On Sat Sep 24 16:38:53 +0200 2022, ori@eigenstate.org wrote:
> Quoth qwx@sciops.net:
> > 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?
> >
>
> Yes, go for it.
Thanks, pushed.
Cheers,
qwx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-24 15:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-24 13:37 [9front] git/import: fix handling relative paths qwx
2022-09-24 14:38 ` ori
2022-09-24 15:54 ` qwx
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).