* gcc: Trouble setting up / using git area
@ 2024-02-19 13:05 Georg-Johann Lay
2024-02-19 13:36 ` Mark Wielaard
2024-02-19 13:39 ` Frank Ch. Eigler
0 siblings, 2 replies; 6+ messages in thread
From: Georg-Johann Lay @ 2024-02-19 13:05 UTC (permalink / raw)
To: overseers
Hi, I'm having trouble wrapping my head around the
git areas as described in
https://gcc.gnu.org/git.html "Repository Layout"
With that description I managed somehow to get
$ git ls-remote | grep gjl
From git+ssh://gjl@gcc.gnu.org/git/gcc.git
eafe83f2f20ef0c1e7703c361ba314b44574523c refs/users/gjl/heads/gcc-8
So I have my own branches in "users/gjl" according to the
branch naming convention.
But I cannot use it to push anything. I created a local branch
"gjl/gcc-8" from "releases/gcc-8" and want to push, e.g.
$ git push origin gjl/gcc-8:refs/users/gjl/heads/gcc-8
but I am getting errors from the server.
Creating a branch to track "users/gjl" does not work either:
$ git checkout -b gjl/gcc-8 --track refs/users/gjl/heads/gcc
I am just lost and trying around isn't any good. Would
you please help me on how to uuse it? The gcc Wiki on git
does not have any examples either.
My local repo is a git worktree in case that matters.
Thanks, Johann
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gcc: Trouble setting up / using git area
2024-02-19 13:05 gcc: Trouble setting up / using git area Georg-Johann Lay
@ 2024-02-19 13:36 ` Mark Wielaard
2024-02-19 14:24 ` Georg-Johann Lay
2024-02-19 13:39 ` Frank Ch. Eigler
1 sibling, 1 reply; 6+ messages in thread
From: Mark Wielaard @ 2024-02-19 13:36 UTC (permalink / raw)
To: Georg-Johann Lay via Overseers, overseers; +Cc: Georg-Johann Lay
Hi Johann,
On Mon, 2024-02-19 at 14:05 +0100, Georg-Johann Lay via Overseers
wrote:
> Hi, I'm having trouble wrapping my head around the
> git areas as described in
>
> https://gcc.gnu.org/git.html "Repository Layout"
>
> With that description I managed somehow to get
>
> $ git ls-remote | grep gjl
> From git+ssh://gjl@gcc.gnu.org/git/gcc.git
> eafe83f2f20ef0c1e7703c361ba314b44574523c refs/users/gjl/heads/gcc-8
>
> So I have my own branches in "users/gjl" according to the
> branch naming convention.
>
> But I cannot use it to push anything. I created a local branch
> "gjl/gcc-8" from "releases/gcc-8" and want to push, e.g.
>
> $ git push origin gjl/gcc-8:refs/users/gjl/heads/gcc-8
>
> but I am getting errors from the server.
>
> Creating a branch to track "users/gjl" does not work either:
>
> $ git checkout -b gjl/gcc-8 --track refs/users/gjl/heads/gcc
>
> I am just lost and trying around isn't any good. Would
> you please help me on how to uuse it? The gcc Wiki on git
> does not have any examples either.
Could you show us what the server errors are that you are getting?
Did you make sure git knows about the users refs you created?
You should do something like:
git config --add remote.origin.fetch "+refs/users/gjl/heads/*:refs/remotes/origin/users/gjl/*"
git config --add remote.origin.fetch "+refs/users/gjl/tags/*:refs/tags/users/gjl/*"
git fetch origin
Cheers,
Mark
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gcc: Trouble setting up / using git area
2024-02-19 13:05 gcc: Trouble setting up / using git area Georg-Johann Lay
2024-02-19 13:36 ` Mark Wielaard
@ 2024-02-19 13:39 ` Frank Ch. Eigler
1 sibling, 0 replies; 6+ messages in thread
From: Frank Ch. Eigler @ 2024-02-19 13:39 UTC (permalink / raw)
To: Overseers mailing list; +Cc: overseers, Georg-Johann Lay
Hi -
> https://gcc.gnu.org/git.html "Repository Layout"
> [...]
> So I have my own branches in "users/gjl" according to the
> branch naming convention.
> $ git push origin gjl/gcc-8:refs/users/gjl/heads/gcc-8
>
> but I am getting errors from the server.
GCC maintainers installed a suite of server-side hooks that enforce
various naming conventions and access controls. Suggest reaching out
to your gcc write-after-approval sponsor for details. For what it's
worth, I see branches named "devel/$TOPIC" and a few
"devel/$USER/topic" on the server.
- FChE
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gcc: Trouble setting up / using git area
2024-02-19 13:36 ` Mark Wielaard
@ 2024-02-19 14:24 ` Georg-Johann Lay
2024-02-19 14:53 ` Jonathan Wakely
2024-02-19 14:55 ` Georg-Johann Lay
0 siblings, 2 replies; 6+ messages in thread
From: Georg-Johann Lay @ 2024-02-19 14:24 UTC (permalink / raw)
To: Mark Wielaard, overseers; +Cc: avr
Am 19.02.24 um 14:36 schrieb Mark Wielaard:
> Hi Johann,
>
> On Mon, 2024-02-19 at 14:05 +0100, Georg-Johann Lay via Overseers
> wrote:
>> Hi, I'm having trouble wrapping my head around the
>> git areas as described in
>>
>> https://gcc.gnu.org/git.html "Repository Layout"
>>
>> With that description I managed somehow to get
>>
>> $ git ls-remote | grep gjl
>> From git+ssh://gjl@gcc.gnu.org/git/gcc.git
>> eafe83f2f20ef0c1e7703c361ba314b44574523c refs/users/gjl/heads/gcc-8
>>
>> So I have my own branches in "users/gjl" according to the
>> branch naming convention.
>>
>> But I cannot use it to push anything. I created a local branch
>> "gjl/gcc-8" from "releases/gcc-8" and want to push, e.g.
>>
>> $ git push origin gjl/gcc-8:refs/users/gjl/heads/gcc-8
>>
>> but I am getting errors from the server.
>>
>> Creating a branch to track "users/gjl" does not work either:
>>
>> $ git checkout -b gjl/gcc-8 --track refs/users/gjl/heads/gcc
>>
>> I am just lost and trying around isn't any good. Would
>> you please help me on how to uuse it? The gcc Wiki on git
>> does not have any examples either.
>
> Could you show us what the server errors are that you are getting?
>
> Did you make sure git knows about the users refs you created?
> You should do something like:
>
> git config --add remote.origin.fetch "+refs/users/gjl/heads/*:refs/remotes/origin/users/gjl/*"
> git config --add remote.origin.fetch "+refs/users/gjl/tags/*:refs/tags/users/gjl/*"
> git fetch origin
Hi Mark,
Yes, I did that according to the hint in "Repository Layout"
where I replaced "dead" by "users/gjl/
My .git/config reads:
[remote "origin"]
url = git+ssh://gjl@gcc.gnu.org/git/gcc.git
fetch = +refs/heads/master:refs/remotes/origin/master
fetch = +refs/users/gjl/heads/*:refs/remotes/origin/users/gjl/*
fetch = +refs/users/gjl/tags/*:refs/tags/users/gjl/*
[branch "master"]
remote = origin
merge = refs/heads/master
What I did in the worktree is:
$ git checkout -b gjl/gcc-8
$ git push --set-upstream origin gjl/gcc-8:refs/users/gjl/heads/gcc-8
which passes ok.
Then I add and commit changes to gjl/gcc-8:
$ git log
commit 900efd5c53f2738cfd136c70a32b26d182354f11 (HEAD -> gjl/gcc-8)
Author: Georg-Johann Lay <avr@gjlay.de>
Date: Mon Feb 19 13:31:08 2024 +0100
...
commit eafe83f2f20ef0c1e7703c361ba314b44574523c (tag:
releases/gcc-8.5.0, origin/users/gjl/gcc-8, releases/gcc-8)
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri May 14 08:22:23 2021 +0000
...
Then I want to push that:
$ git push origin HEAD
Enumerating objects: 16, done.
Counting objects: 100% (16/16), done.
Delta compression using up to 2 threads
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 1.79 KiB | 1.79 MiB/s, done.
Total 9 (delta 7), reused 0 (delta 0), pack-reused 0
remote: *** Update rejected by this repository's hooks.update-hook script
remote: *** (/git/gcc.git/hooks-bin/update_hook):
remote: *** Shared development branches should be named devel/*, and
should be documented in https://gcc.gnu.org/git.html .
remote: error: hook declined to update refs/heads/gjl/gcc-8
To git+ssh://gcc.gnu.org/git/gcc.git
! [remote rejected] HEAD -> gjl/gcc-8 (hook declined)
error: failed to push some refs to 'git+ssh://gcc.gnu.org/git/gcc.git'
As far as I can see, the naming convention for my "users/gjl" area fits
the ones of other users:
$ git ls-remote | grep users | grep -C2 gjl
From git+ssh://gjl@gcc.gnu.org/git/gcc.git
71fee3df121affc891ada03b09e74e96b2ee5e5b
refs/users/giulianob/heads/pfe_backport_clean
a97db5c54aa2998507a0436cb10d76ae5854a0a1
refs/users/giulianob/heads/pfe_backport_dirty
eafe83f2f20ef0c1e7703c361ba314b44574523c refs/users/gjl/heads/gcc-8
437c1c2d91cee27c8280542e7a56d98470fd47cd refs/users/glisse/heads/fenv
ce08a33145e1b5736595c4c5a600ea5443103d03
refs/users/guojiufu/heads/guojiufu-branch
But the error says: "hook declined to update refs/heads/gjl/gcc-8"
where the location should be refs/users/gjl/heads/gcc-8
Something with the tracking mapping appears to be not as expected;
the fetch entries in .git/config should do the trick, no?
Johann
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gcc: Trouble setting up / using git area
2024-02-19 14:24 ` Georg-Johann Lay
@ 2024-02-19 14:53 ` Jonathan Wakely
2024-02-19 14:55 ` Georg-Johann Lay
1 sibling, 0 replies; 6+ messages in thread
From: Jonathan Wakely @ 2024-02-19 14:53 UTC (permalink / raw)
To: Georg-Johann Lay; +Cc: Mark Wielaard, overseers
On 19/02/24 15:24 +0100, Georg-Johann Lay wrote:
>
>
>Am 19.02.24 um 14:36 schrieb Mark Wielaard:
>>Hi Johann,
>>
>>On Mon, 2024-02-19 at 14:05 +0100, Georg-Johann Lay via Overseers
>>wrote:
>>>Hi, I'm having trouble wrapping my head around the
>>>git areas as described in
>>>
>>>https://gcc.gnu.org/git.html "Repository Layout"
>>>
>>>With that description I managed somehow to get
>>>
>>>$ git ls-remote | grep gjl
>>> From git+ssh://gjl@gcc.gnu.org/git/gcc.git
>>>eafe83f2f20ef0c1e7703c361ba314b44574523c refs/users/gjl/heads/gcc-8
>>>
>>>So I have my own branches in "users/gjl" according to the
>>>branch naming convention.
>>>
>>>But I cannot use it to push anything. I created a local branch
>>>"gjl/gcc-8" from "releases/gcc-8" and want to push, e.g.
>>>
>>>$ git push origin gjl/gcc-8:refs/users/gjl/heads/gcc-8
>>>
>>>but I am getting errors from the server.
>>>
>>>Creating a branch to track "users/gjl" does not work either:
>>>
>>>$ git checkout -b gjl/gcc-8 --track refs/users/gjl/heads/gcc
>>>
>>>I am just lost and trying around isn't any good. Would
>>>you please help me on how to uuse it? The gcc Wiki on git
>>>does not have any examples either.
>>
>>Could you show us what the server errors are that you are getting?
>>
>>Did you make sure git knows about the users refs you created?
>>You should do something like:
>>
>> git config --add remote.origin.fetch "+refs/users/gjl/heads/*:refs/remotes/origin/users/gjl/*"
>> git config --add remote.origin.fetch "+refs/users/gjl/tags/*:refs/tags/users/gjl/*"
>> git fetch origin
>
>Hi Mark,
>
>Yes, I did that according to the hint in "Repository Layout"
>where I replaced "dead" by "users/gjl/
>
>My .git/config reads:
>
>[remote "origin"]
> url = git+ssh://gjl@gcc.gnu.org/git/gcc.git
> fetch = +refs/heads/master:refs/remotes/origin/master
> fetch = +refs/users/gjl/heads/*:refs/remotes/origin/users/gjl/*
> fetch = +refs/users/gjl/tags/*:refs/tags/users/gjl/*
>[branch "master"]
> remote = origin
> merge = refs/heads/master
>
>
>What I did in the worktree is:
>
>$ git checkout -b gjl/gcc-8
>$ git push --set-upstream origin gjl/gcc-8:refs/users/gjl/heads/gcc-8
>
>which passes ok.
>
>Then I add and commit changes to gjl/gcc-8:
>
>$ git log
>
>commit 900efd5c53f2738cfd136c70a32b26d182354f11 (HEAD -> gjl/gcc-8)
>Author: Georg-Johann Lay <avr@gjlay.de>
>Date: Mon Feb 19 13:31:08 2024 +0100
>...
>
>commit eafe83f2f20ef0c1e7703c361ba314b44574523c (tag:
>releases/gcc-8.5.0, origin/users/gjl/gcc-8, releases/gcc-8)
>Author: Jakub Jelinek <jakub@redhat.com>
>Date: Fri May 14 08:22:23 2021 +0000
>...
>
>Then I want to push that:
>
>$ git push origin HEAD
>Enumerating objects: 16, done.
>Counting objects: 100% (16/16), done.
>Delta compression using up to 2 threads
>Compressing objects: 100% (9/9), done.
>Writing objects: 100% (9/9), 1.79 KiB | 1.79 MiB/s, done.
>Total 9 (delta 7), reused 0 (delta 0), pack-reused 0
>remote: *** Update rejected by this repository's hooks.update-hook script
>remote: *** (/git/gcc.git/hooks-bin/update_hook):
>remote: *** Shared development branches should be named devel/*, and
>should be documented in https://gcc.gnu.org/git.html .
>remote: error: hook declined to update refs/heads/gjl/gcc-8
>To git+ssh://gcc.gnu.org/git/gcc.git
> ! [remote rejected] HEAD -> gjl/gcc-8 (hook declined)
>error: failed to push some refs to 'git+ssh://gcc.gnu.org/git/gcc.git'
>
>As far as I can see, the naming convention for my "users/gjl" area fits
>the ones of other users:
>
>$ git ls-remote | grep users | grep -C2 gjl
>From git+ssh://gjl@gcc.gnu.org/git/gcc.git
>71fee3df121affc891ada03b09e74e96b2ee5e5b
>refs/users/giulianob/heads/pfe_backport_clean
>a97db5c54aa2998507a0436cb10d76ae5854a0a1
>refs/users/giulianob/heads/pfe_backport_dirty
>eafe83f2f20ef0c1e7703c361ba314b44574523c refs/users/gjl/heads/gcc-8
>437c1c2d91cee27c8280542e7a56d98470fd47cd refs/users/glisse/heads/fenv
>ce08a33145e1b5736595c4c5a600ea5443103d03
>refs/users/guojiufu/heads/guojiufu-branch
>
>But the error says: "hook declined to update refs/heads/gjl/gcc-8"
>where the location should be refs/users/gjl/heads/gcc-8
>
>Something with the tracking mapping appears to be not as expected;
>the fetch entries in .git/config should do the trick, no?
No, because they are fetch entries, they don't tell Git how to push,
only to fetch. The clue is in the name.
The simplest solution is to use the contrib/gcc-git-customization.sh
script which sets up the config correctly. This is documented at
https://gcc.gnu.org/gitwrite.html#vendor
If you insist on doing it manually, you want a separate remote that
you use for pushing to your user branch. Something like:
[remote "users/me"]
url = git+ssh://gcc.gnu.org/git/gcc.git
fetch = +refs/users/gjl/heads/*:refs/remotes/users/me/*
fetch = +refs/users/gjl/tags/*:refs/tags/users/me/*
push = refs/heads/me/*:refs/users/gjl/heads/*
Then you can do: git push users/me gjl/gcc-8:gcc-8
This really belongs on the GCC list, since this has nothing to do with
overseers. It's entirely related to GCC's Git repo structure, not
admin of the server.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gcc: Trouble setting up / using git area
2024-02-19 14:24 ` Georg-Johann Lay
2024-02-19 14:53 ` Jonathan Wakely
@ 2024-02-19 14:55 ` Georg-Johann Lay
1 sibling, 0 replies; 6+ messages in thread
From: Georg-Johann Lay @ 2024-02-19 14:55 UTC (permalink / raw)
To: Mark Wielaard, overseers; +Cc: avr
Am 19.02.24 um 15:24 schrieb Georg-Johann Lay:
>
>
> Am 19.02.24 um 14:36 schrieb Mark Wielaard:
>> Hi Johann,
>>
>> On Mon, 2024-02-19 at 14:05 +0100, Georg-Johann Lay via Overseers
>> wrote:
>>> Hi, I'm having trouble wrapping my head around the
>>> git areas as described in
>>>
>>> https://gcc.gnu.org/git.html "Repository Layout"
>>>
>>> With that description I managed somehow to get
>>>
>>> $ git ls-remote | grep gjl
>>> From git+ssh://gjl@gcc.gnu.org/git/gcc.git
>>> eafe83f2f20ef0c1e7703c361ba314b44574523c refs/users/gjl/heads/gcc-8
>>>
>>> So I have my own branches in "users/gjl" according to the
>>> branch naming convention.
>>>
>>> But I cannot use it to push anything. I created a local branch
>>> "gjl/gcc-8" from "releases/gcc-8" and want to push, e.g.
>>>
>>> $ git push origin gjl/gcc-8:refs/users/gjl/heads/gcc-8
>>>
>>> but I am getting errors from the server.
>>>
>>> Creating a branch to track "users/gjl" does not work either:
>>>
>>> $ git checkout -b gjl/gcc-8 --track refs/users/gjl/heads/gcc
>>>
>>> I am just lost and trying around isn't any good. Would
>>> you please help me on how to uuse it? The gcc Wiki on git
>>> does not have any examples either.
>>
>> Could you show us what the server errors are that you are getting?
>>
>> Did you make sure git knows about the users refs you created?
>> You should do something like:
>>
>> git config --add remote.origin.fetch
>> "+refs/users/gjl/heads/*:refs/remotes/origin/users/gjl/*"
>> git config --add remote.origin.fetch
>> "+refs/users/gjl/tags/*:refs/tags/users/gjl/*"
>> git fetch origin
>
> Hi Mark,
>
> Yes, I did that according to the hint in "Repository Layout"
> where I replaced "dead" by "users/gjl/
>
> My .git/config reads:
>
> [remote "origin"]
> url = git+ssh://gjl@gcc.gnu.org/git/gcc.git
> fetch = +refs/heads/master:refs/remotes/origin/master
> fetch = +refs/users/gjl/heads/*:refs/remotes/origin/users/gjl/*
> fetch = +refs/users/gjl/tags/*:refs/tags/users/gjl/*
> [branch "master"]
> remote = origin
> merge = refs/heads/master
>
>
> What I did in the worktree is:
>
> $ git checkout -b gjl/gcc-8
> $ git push --set-upstream origin gjl/gcc-8:refs/users/gjl/heads/gcc-8
>
> which passes ok.
>
> Then I add and commit changes to gjl/gcc-8:
>
> $ git log
>
> commit 900efd5c53f2738cfd136c70a32b26d182354f11 (HEAD -> gjl/gcc-8)
> Author: Georg-Johann Lay <avr@gjlay.de>
> Date: Mon Feb 19 13:31:08 2024 +0100
> ...
>
> commit eafe83f2f20ef0c1e7703c361ba314b44574523c (tag:
> releases/gcc-8.5.0, origin/users/gjl/gcc-8, releases/gcc-8)
> Author: Jakub Jelinek <jakub@redhat.com>
> Date: Fri May 14 08:22:23 2021 +0000
> ...
>
> Then I want to push that:
>
> $ git push origin HEAD
> Enumerating objects: 16, done.
> Counting objects: 100% (16/16), done.
> Delta compression using up to 2 threads
> Compressing objects: 100% (9/9), done.
> Writing objects: 100% (9/9), 1.79 KiB | 1.79 MiB/s, done.
> Total 9 (delta 7), reused 0 (delta 0), pack-reused 0
> remote: *** Update rejected by this repository's hooks.update-hook script
> remote: *** (/git/gcc.git/hooks-bin/update_hook):
> remote: *** Shared development branches should be named devel/*, and
> should be documented in https://gcc.gnu.org/git.html .
> remote: error: hook declined to update refs/heads/gjl/gcc-8
> To git+ssh://gcc.gnu.org/git/gcc.git
> ! [remote rejected] HEAD -> gjl/gcc-8 (hook declined)
> error: failed to push some refs to 'git+ssh://gcc.gnu.org/git/gcc.git'
>
> As far as I can see, the naming convention for my "users/gjl" area fits
> the ones of other users:
>
> $ git ls-remote | grep users | grep -C2 gjl
> From git+ssh://gjl@gcc.gnu.org/git/gcc.git
> 71fee3df121affc891ada03b09e74e96b2ee5e5b
> refs/users/giulianob/heads/pfe_backport_clean
> a97db5c54aa2998507a0436cb10d76ae5854a0a1
> refs/users/giulianob/heads/pfe_backport_dirty
> eafe83f2f20ef0c1e7703c361ba314b44574523c refs/users/gjl/heads/gcc-8
> 437c1c2d91cee27c8280542e7a56d98470fd47cd refs/users/glisse/heads/fenv
> ce08a33145e1b5736595c4c5a600ea5443103d03
> refs/users/guojiufu/heads/guojiufu-branch
>
> But the error says: "hook declined to update refs/heads/gjl/gcc-8"
> where the location should be refs/users/gjl/heads/gcc-8
>
> Something with the tracking mapping appears to be not as expected;
> the fetch entries in .git/config should do the trick, no?
>
> Johann
Hi, just by pure trial and error, I found that the following works:
$ git push origin users/gjl/gcc-8:refs/users/gjl/heads/gcc-8
So maybe there is a rule for "push" missing, similar to the rules for
"fetch"?
Johann
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-02-19 14:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-19 13:05 gcc: Trouble setting up / using git area Georg-Johann Lay
2024-02-19 13:36 ` Mark Wielaard
2024-02-19 14:24 ` Georg-Johann Lay
2024-02-19 14:53 ` Jonathan Wakely
2024-02-19 14:55 ` Georg-Johann Lay
2024-02-19 13:39 ` Frank Ch. Eigler
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 read-only IMAP folder(s) and NNTP newsgroup(s).