9front - general discussion about 9front
 help / color / mirror / Atom feed
From: igor@9lab.org
To: 9front@9front.org
Cc: igor@9lab.org, ori@eigenstate.org
Subject: Re: [9front] [PATCH] git/merge: fix merge if directory of merged file does not exist
Date: Tue, 19 Apr 2022 15:58:23 +0200	[thread overview]
Message-ID: <22A0BF0B084D30FF74396E5F3D0D07FD@9lab.org> (raw)
In-Reply-To: <395F6014FC64E259F1D1574BDA898664@eigenstate.org>

Quoth ori@eigenstate.org:
> Quoth igor@9lab.org:
> > When merging from branch `front` to `test` the following test case
> > fails:
> > 
> > <snip>
> >
> > A solution is to check if the folder exists and create it via `mkdir -p`
> > in case it doesn't.
> > 
> > Can someone have a look and confirm this is the right solution and not
> > a hack. If this is Ok plz let me know and I can push the fix.
> > 
> I've got that added in my patch queue, slightly differently;
> because mkdir -p always succeeds, there's no need for the if.

Excellent, then I will wait for you to push that one ☺

There is one more instance of mkdir -p in gitup, you probably have that
one converted as well to remove the test (see highlighted part):

fn gitup{
	gitroot=`{git/conf -r >[2]/dev/null}
	if(~ $#gitroot 0)
		die 'not a git repository'
	gitrel=`{pwd | drop $gitroot | sed 's@^/@@'}
	if(~ $#gitrel 0)
	cd $gitroot
	if(! test -d $gitfs)
		mkdir -p $gitfs
	if(! test -e $gitfs/ctl)
	if(! grep -s '^repo '$gitroot'$' $gitfs/ctl >[2]/dev/null)
	if(~ $#startfs 1)
	if not

      reply	other threads:[~2022-04-19 14:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19 11:27 igor
2022-04-19 13:51 ` ori
2022-04-19 13:58   ` igor [this message]

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22A0BF0B084D30FF74396E5F3D0D07FD@9lab.org \
    --to=igor@9lab.org \
    --cc=9front@9front.org \
    --cc=ori@eigenstate.org \
    --subject='Re: [9front] [PATCH] git/merge: fix merge if directory of merged file does not exist' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).