From nobody Mon Jan 09 06:31:31 2023 X-Original-To: freebsd-git@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nr3xj08l0z2r8lh for ; Mon, 9 Jan 2023 06:31:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nr3xh6sbsz4Hxg for ; Mon, 9 Jan 2023 06:31:36 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x634.google.com with SMTP id ss4so10309883ejb.11 for ; Sun, 08 Jan 2023 22:31:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=2ns/c2bdBUMeM6D5cf0TN82QccaB/zypvH+u7nwe/xI=; b=S7Jaf3jz7GQaxTWc8qME2VgGvHHPLTkrSC27M9dPciRw8tEO9CBUYLctVt+z9Fl22d BlCUF9j2FNxwMkpJJqFQVVRxEIPxg3QrD+8H1xVIqZF3/sO52Qtglble/9QFIGbLCjcO 6AZkyK9Olv9d+qG75PIdzC+ZOe6vm+7EJ+yLQbRdAHWi45gtKi5OChArpxJq0G49F+Kw WfYypkPyUmO00nPQ39z0UYg+qLvjFL8GrWYKqktwtpSqmW/troLef3aK4kAWvE8m3Hcm jFp5ubyUcrchTVrpdT46LXOh+E8FqEDEfw3TP6YBS+gSY5CfW5Rdef5uTJdkA6X3hix/ kkEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2ns/c2bdBUMeM6D5cf0TN82QccaB/zypvH+u7nwe/xI=; b=6Lb85OXK6C/DiK11Uos14ZLNutuK4pRrk2X+7Kx0vHs6KB4f2gditSmZWA3cpYYGai 5yxtDkNGKGHA3tLJaDiM2vfeiBP2IJJJ3vz9jxhfgBOSTmJgsUDt1j0Z2USpbhsCMfa/ StvFgs4L4mrPc8Vog1V4RpyfmePjPElkVze2DxOeaNeHbxoQ9xSjPmGof/qXG81t84Lh kGXumEcCs29EUvo26LYDVERYnTQOnnHSa2hWgA1VcfrBOgxAgbHIcnAdodKHHf/FFJzE sfO2hCPE5eC1oMJ9jMwdrjJkEQTSNDLlhn4R+rdlMa3GyPOVfSOi9OcsahN65PW/PLy3 ns3w== X-Gm-Message-State: AFqh2kpsudhEKv4B+0Xs6hnRt62G983MIXiPxcm4/Kr1a4/fMOlu8hFB g3xZwfX4F9SR5VQTMBhMOL4m0SYcYak2xWi2s+wEF4w6oDkf3hRF X-Google-Smtp-Source: AMrXdXtXxgJZVAPbuStjV+z763bFzsZ2+Q19t9kdcVruYWKoZThqXOGc6DyS54l9us5NQfhPgUbalbAWN8hJsiAoDqQ= X-Received: by 2002:a17:906:140e:b0:7c0:e0db:f136 with SMTP id p14-20020a170906140e00b007c0e0dbf136mr4842987ejc.333.1673245895912; Sun, 08 Jan 2023 22:31:35 -0800 (PST) List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 References: <20230109023126.kjjynari5b6jpqxo@thornystick.local> In-Reply-To: From: Warner Losh Date: Sun, 8 Jan 2023 23:31:31 -0700 Message-ID: Subject: Re: Vendor import push failed: src refspec ... does not match any To: Philip Paeps Cc: Gregory Shapiro , freebsd-git@freebsd.org Content-Type: multipart/alternative; boundary="0000000000003f80eb05f1ceeb30" X-Rspamd-Queue-Id: 4Nr3xh6sbsz4Hxg X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --0000000000003f80eb05f1ceeb30 Content-Type: text/plain; charset="UTF-8" On Sun, Jan 8, 2023 at 11:17 PM Philip Paeps wrote: > On 2023-01-09 10:31:26 (+0800), Gregory Shapiro wrote: > > > I'm doing my first vendor import since the move to git. Following the > > instructions in section 5.4 of committers-guide/#git-primer, I hit a > > roadblock trying to push the new version to the vendor branch. My > > actions are below, including the failure to push at the end. What > > should have I have done differently? > > > > > >> cd src/freebsd/main > >> git remote -v > > freebsd https://git.freebsd.org/src.git (fetch) > > freebsd git@gitrepo.freebsd.org:src.git (push) > >> git pull > > Already up to date. > >> git status > > On branch main > > Your branch is up to date with 'freebsd/main'. > > > > nothing to commit, working tree clean > >> git worktree add ../vendor/sendmail freebsd/vendor/sendmail > You needed to add '-b vendor/sendmail' here for it to create a branch in your local name space (not in the freebsd/* upstream namespace). > > Preparing worktree (detached HEAD 0694dcb04b81) > > HEAD is now at 0694dcb04b81 Bring in fix from upstream that allows > > libsm to compile against FreeBSD 13 > >> cd ../vendor/sendmail > >> rsync --archive --delete --exclude=.git ~/Work/fb/sendmail-8.17.1/ ./ > >> git add -A > >> > > ... > > (checked git status, git diff, all looked good at first, though after > > the error, I see that git status reports, "Not currently on any > > branch.") > Yea, the -b was missing above, I think. > > ... > >> git commit -m "Vendor import of sendmail 8.17.1" > > [detached HEAD e2db8b1cc34e] Vendor import of sendmail 8.17.1 > > 188 files changed, 13741 insertions(+), 8635 deletions(-) > > create mode 100644 cf/feature/check_other.m4 > > create mode 100644 cf/feature/sts.m4 > > mode change 100644 => 100755 contrib/doublebounce.pl > > mode change 100644 => 100755 contrib/link_hash.sh > > mode change 100644 => 100755 contrib/re-mqueue.pl > > create mode 100644 devtools/OS/Darwin.19.x > > create mode 100644 devtools/OS/Darwin.20.x > > create mode 100644 include/sm/ixlen.h > > create mode 100644 libsm/ilenx.c > > create mode 100644 libsm/lowercase.c > > create mode 100644 libsm/strcaseeq.c > > create mode 100644 libsm/t-ixlen.c > > create mode 100755 libsm/t-ixlen.sh > > create mode 100644 libsm/t-str2prt.c > > create mode 100644 libsm/t-streq.c > > create mode 100755 libsm/t-streq.sh > > create mode 100644 libsm/utf8_valid.c > > create mode 100644 libsm/uxtext_unquote.c > > create mode 100644 libsm/xleni.c > > create mode 100755 libsmutil/t-lockfile-0.sh > > create mode 100644 libsmutil/t-lockfile.c > > create mode 100755 libsmutil/t-maplock-0.sh > >> git tag -a -m "Tag sendmail 8.17.1" vendor/sendmail/8.17.1 > >> git push --dry-run --follow-tags freebsd vendor/sendmail > > error: src refspec vendor/sendmail does not match any > > error: failed to push some refs to 'gitrepo.freebsd.org:src.git' > Yes. You've not created a vendor/sendmail branch yet, so there's no 'ref' to push. This message really is git saying 'I'm not sure I know what vendor/sendmail is', since it uses that to know what to push upstream. This is where having the upstream set correctly just might matter. If you look in your config file, you should see something like: > > > > Note that the output to git commit above starts with "[detached HEAD > > ...]" which, along with the git status issue described above, looks > > suspicious. > > You should create a branch in your worktree. This will probably do what > you want: > > git checkout -b vendor/sendmail > It's better done with the above -b command so that the 'upstream' is set right (though this might not be one of the times that matters). > I believe this will put the HEAD of that branch on the commit you made, > but this is untested. > I think it will, but it won't have the upstream as freebsd/vendor/sendfile which would be a problem if anybody else ever committed to that vendor branch (or he did on a different machine). [branch "vendor/sendmail"] remote = freebsd merge = refs/heads/vendor/sendmail in the .git/config file from the repo (I hacked that together off a machine I think has the right entries) git reset e2db8b1cc34e > > If that doesn't work, simply do the rsync; git add; git commit again. > It's not worth fighting with git over. :) > Yea, git makes it stupidly easy to throw away work that's somehow done incorrectly the first time... --0000000000003f80eb05f1ceeb30 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sun, Jan 8, 2023 at 11:17 PM Phili= p Paeps <philip@freebsd.org>= ; wrote:
On 2023= -01-09 10:31:26 (+0800), Gregory Shapiro wrote:

> I'm doing my first vendor import since the move to git.=C2=A0 Foll= owing the
> instructions in section 5.4 of committers-guide/#git-primer, I hit a > roadblock trying to push the new version to the vendor branch.=C2=A0 M= y
> actions are below, including the failure to push at the end.=C2=A0 Wha= t
> should have I have done differently?
>
>
>> cd src/freebsd/main
>> git remote -v
> freebsd https://git.freebsd.org/src.git (fetch)
> freebsd git@gitrepo.freebsd.org:src.git (push)
>> git pull
> Already up to date.
>> git status
> On branch main
> Your branch is up to date with 'freebsd/main'.
>
> nothing to commit, working tree clean
>> git worktree add ../vendor/sendmail freebsd/vendor/sendmail

You needed to add '-b vendor/sendmail'= ; here for it to create a branch in your local name space (not in the freeb= sd/* upstream namespace).
=C2=A0
> Preparing worktree (detached HEAD 0694dcb04b81)
> HEAD is now at 0694dcb04b81 Bring in fix from upstream that allows > libsm to compile against FreeBSD 13
>> cd ../vendor/sendmail
>> rsync --archive --delete --exclude=3D.git ~/Work/fb/sendmail-8.17.= 1/ ./
>> git add -A
>>
> ...
> (checked git status, git diff, all looked good at first, though after<= br> >=C2=A0 the error, I see that git status reports, "Not currently on= any
>=C2=A0 branch.")

Yea, the -b w= as missing above, I think.
=C2=A0
> ...
>> git commit -m "Vendor import of sendmail 8.17.1"
> [detached HEAD e2db8b1cc34e] Vendor import of sendmail 8.17.1
>=C2=A0 188 files changed, 13741 insertions(+), 8635 deletions(-)
>=C2=A0 create mode 100644 cf/feature/check_other.m4
>=C2=A0 create mode 100644 cf/feature/sts.m4
>=C2=A0 mode change 100644 =3D> 100755 contrib/doublebounce.pl
>=C2=A0 mode change 100644 =3D> 100755 contrib/link_hash.sh
>=C2=A0 mode change 100644 =3D> 100755 contrib/re-mqueue.pl
>=C2=A0 create mode 100644 devtools/OS/Darwin.19.x
>=C2=A0 create mode 100644 devtools/OS/Darwin.20.x
>=C2=A0 create mode 100644 include/sm/ixlen.h
>=C2=A0 create mode 100644 libsm/ilenx.c
>=C2=A0 create mode 100644 libsm/lowercase.c
>=C2=A0 create mode 100644 libsm/strcaseeq.c
>=C2=A0 create mode 100644 libsm/t-ixlen.c
>=C2=A0 create mode 100755 libsm/t-ixlen.sh
>=C2=A0 create mode 100644 libsm/t-str2prt.c
>=C2=A0 create mode 100644 libsm/t-streq.c
>=C2=A0 create mode 100755 libsm/t-streq.sh
>=C2=A0 create mode 100644 libsm/utf8_valid.c
>=C2=A0 create mode 100644 libsm/uxtext_unquote.c
>=C2=A0 create mode 100644 libsm/xleni.c
>=C2=A0 create mode 100755 libsmutil/t-lockfile-0.sh
>=C2=A0 create mode 100644 libsmutil/t-lockfile.c
>=C2=A0 create mode 100755 libsmutil/t-maplock-0.sh
>> git tag -a -m "Tag sendmail 8.17.1" vendor/sendmail/8.17= .1
>> git push --dry-run --follow-tags freebsd vendor/sendmail
> error: src refspec vendor/sendmail does not match any
> error: failed to push some refs to 'gitrepo.freebsd.org:src.git= 9;

Yes. You've not created a vendor= /sendmail branch yet, so there's no 'ref' to push. This message= really is git saying 'I'm not sure I know what vendor/sendmail is&= #39;, since it uses that to know what to push upstream. This is where havin= g the upstream set correctly just might matter.

If= you look in your config file, you should see something like:
=C2=A0
>
> Note that the output to git commit above starts with "[detached H= EAD
> ...]" which, along with the git status issue described above, loo= ks
> suspicious.

You should create a branch in your worktree.=C2=A0 This will probably do wh= at
you want:

git checkout -b vendor/sendmail

It'= s better done with the above -b command so that the 'upstream' is s= et right (though this might not be one of the times that matters).
=C2=A0
I believe this will put the HEAD of that branch on the commit you made, but this is untested.

I think it will, = but it won't have the upstream as freebsd/vendor/sendfile which would b= e a problem if anybody else ever committed to that vendor branch (or he did= on a different machine).

[branch "vendor/sen= dmail"]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 remote =3D freebsd
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 merge =3D refs/heads/vendor/sendmail

in the .git/config file from the repo (I hacked that together off a= machine I think has the right entries)

git reset e2db8b1cc34e

If that doesn't work, simply do the rsync; git add; git commit again.= =C2=A0
It's not worth fighting with git over. :)

Yea, git makes it stupidly easy to throw away work that's someho= w done incorrectly the first time...=C2=A0
--0000000000003f80eb05f1ceeb30--