All of lore.kernel.org
 help / color / mirror / Atom feed
From: Deborah Brouwer <deborah.brouwer@collabora.com>
To: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: linux-media@vger.kernel.org
Subject: Re: build scripts: branches with forward slashes in names
Date: Fri, 24 Nov 2023 10:00:40 -0800	[thread overview]
Message-ID: <ZWDkyCwzFAj8VRGj@mz550> (raw)
In-Reply-To: <4a41ef2f-99d4-4cf2-bf92-a53ec7c34335@xs4all.nl>

On Fri, Nov 24, 2023 at 10:37:59AM +0100, Hans Verkuil wrote:
> On 24/11/2023 08:23, Hans Verkuil wrote:
> > On 23/11/2023 23:22, Deborah Brouwer wrote:
> >> Hi Hans,
> >>
> >> Have you ever had a problem running the build scripts on branches with
> >> forward slashes in their names?
> >>
> >> So, for example, I add my repo to env.sh
> >> myrepo=https://gitlab.collabora.com/chipsnmedia/kernel
> >>
> >> I run ./build.sh setup and I can see it fetching my repo and including
> >> my branch "dbrouwer/KConfig_fix", but if try to run:
> >>
> >> ./build.sh -test all dbrouwer/KConfig_fix
> >>
> >> I get this error:
> >>
> >> "fatal: 'dbrouwer/KConfig_fix' is not a commit and a branch 'build-test' cannot be created from it"
> >>
> >> But then if I change the branch name to remove the forward slash "KConfig_fix" it works fine again.
> >>
> >> Have you noticed anything similar? Could it be easily fixed?
> >>
> >> Thanks,
> >> Deborah
> >>
> > 
> > From the README:
> > 
> > "If <branch> is absent, then it will default to media_stage/master. If it
> > contains a / character, then the branch name will be used as-is (e.g.
> > use <remote>/<branch> to build a branch on a specific remote), otherwise
> > the branch name will be prefixed by main/ (e.g. main/<branch>), which
> > uses the branch on your '$myrepo' repository."
> > 
> > I never use / in branch names (too confusing with / in pathnames), and since
> > I developed these scripts originally for myself, I just grepped for /.
> > 
> > Perhaps the build script should allow for 0-2 arguments at the end:
> > nothing means media_stage/master, 1 arg means main/<branch> and 2 args
> > means <remote>/<branch>.
> > 
> > Let me see what I can do.
> 
> I've done exactly that: after the <branch> argument you can now add an
> optional <remote> argument. So branch now supports / in the name.

Ah thanks for fixing this, I tested it and it works fine now:

"branch 'build-test' set up to track 'main/dbrouwer/KConfig_fix'."

> 
> Regards,
> 
> 	Hans
> 

      reply	other threads:[~2023-11-24 18:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-23 22:22 build scripts: branches with forward slashes in names Deborah Brouwer
2023-11-24  7:23 ` Hans Verkuil
2023-11-24  9:37   ` Hans Verkuil
2023-11-24 18:00     ` Deborah Brouwer [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:
  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=ZWDkyCwzFAj8VRGj@mz550 \
    --to=deborah.brouwer@collabora.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-media@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.