List for cgit developers and users
 help / color / mirror / Atom feed
* showing branches not in refs/heads/
@ 2011-11-18 23:42 wink
  2011-11-19 21:26 ` jamie.couture
  0 siblings, 1 reply; 3+ messages in thread
From: wink @ 2011-11-18 23:42 UTC (permalink / raw)


Hi List,

I've been googling quite a bit and i can't seem to find it nor 'fix' it myself. I've setup personal branches for gitolite for users (in a group) using the 

RW+    development/USER/ = @userlist

syntax. The pushes do not reside in refs/heads but in refs/development/username/branchname and maybe that's why they don't show in the overview? Is it possible to show the branches from 'personal user branches' with cgit using the gitolite setup?

Looking forward to a reply,

WINK







^ permalink raw reply	[flat|nested] 3+ messages in thread

* showing branches not in refs/heads/
  2011-11-18 23:42 showing branches not in refs/heads/ wink
@ 2011-11-19 21:26 ` jamie.couture
  2011-11-19 22:32   ` wink
  0 siblings, 1 reply; 3+ messages in thread
From: jamie.couture @ 2011-11-19 21:26 UTC (permalink / raw)


I'm no wiz at configuring gitolite; however, trying my own settings:

conf/gitolite.conf
----
@staff = bob alice
repo    proja
        RW+     =   couture
        RW+ dev/USER/     =   @staff
        proja "DESC" = "Jamie couture <jamie.couture at gmail.com>"
----

bob and alice may only push to refs/heads/dev/<user>/whatever
for example bob creates a branch:

$ bob@~: git checkout -b myidea master
... do some work
... commit
and now bob is ready to push:
$ bob@~: git push origin myidea:dev/bob/myidea

will end up in refs/heads, and I'll still be able to see it in gitolite.

However, I'm not aware of a configuration to change where in refs you push,
but trying it, trivially, on my own machine yields fine results and
gitolite manages the rules for me.  alice, for example, cannot push her
refs to bob. Even if alice were to checkout bob's refs, merge her changes
on top of his, and push his refs to origin, OR if she were to create a
branch and try to push her refs where bob's are, gitolite will reject them.

Having said that, all this occurred under refs/heads; I didn't set anything
extra to do this.

What did you type when you pushed your refs, that is, to have them going to
refs/development? I'm not aware that's possible, though please correct me
if I'm wrong.  Even if i were to try on a local repo, I get the following:

$ git checkout -b development
Switched to a new branch 'development'
$ git push origin development:refs/development
Total 0 (delta 0), reused 0 (delta 0)
remote: error: refusing to create funny ref 'refs/development' remotely

if I were to do it properly, they end up in the same place, refs/heads:
$ git push origin development
OR
$ git push origin development:refs/heads/development

anyway, tl;dr: all my refs to go refs/heads where cgit expects them and
will show it in summary.

On Fri, Nov 18, 2011 at 6:42 PM, Rob <wink at connectedserver.com> wrote:

> Hi List,
>
> I've been googling quite a bit and i can't seem to find it nor 'fix' it
> myself. I've setup personal branches for gitolite for users (in a group)
> using the
>
> RW+    development/USER/ = @userlist
>
> syntax. The pushes do not reside in refs/heads but in
> refs/development/username/branchname and maybe that's why they don't show
> in the overview? Is it possible to show the branches from 'personal user
> branches' with cgit using the gitolite setup?
>
> Looking forward to a reply,
>
> WINK
>
>
>
>
> _______________________________________________
> cgit mailing list
> cgit at hjemli.net
> http://hjemli.net/mailman/listinfo/cgit
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* showing branches not in refs/heads/
  2011-11-19 21:26 ` jamie.couture
@ 2011-11-19 22:32   ` wink
  0 siblings, 0 replies; 3+ messages in thread
From: wink @ 2011-11-19 22:32 UTC (permalink / raw)


HI Jamie,

Thanks for your reply, and reading it i wondered why i did not think of/see this before. I got this error,

error: unable to resolve reference refs/heads/development/user/myidea: Not a directory

When i tried to push in similar fashion as you describe. But i did not think of the branch development i already had pushed :) I've changed the personal branch path now from development/USER/ to dev/USER/ like you have and it works flawlessly.

Thanks for kicking my brain awake :)

Rob

On Nov 19, 2011, at 10:26 PM, Jamie Couture wrote:

> I'm no wiz at configuring gitolite; however, trying my own settings:
> 
> conf/gitolite.conf
> ----
> @staff = bob alice
> repo    proja
>         RW+     =   couture
>         RW+ dev/USER/     =   @staff
>         proja "DESC" = "Jamie couture <jamie.couture at gmail.com>"
> ----
> 
> bob and alice may only push to refs/heads/dev/<user>/whatever
> for example bob creates a branch:
> 
> $ bob@~: git checkout -b myidea master
> ... do some work
> ... commit
> and now bob is ready to push:
> $ bob@~: git push origin myidea:dev/bob/myidea
> 
> will end up in refs/heads, and I'll still be able to see it in gitolite.
> 
> However, I'm not aware of a configuration to change where in refs you push, but trying it, trivially, on my own machine yields fine results and gitolite manages the rules for me.  alice, for example, cannot push her refs to bob. Even if alice were to checkout bob's refs, merge her changes on top of his, and push his refs to origin, OR if she were to create a branch and try to push her refs where bob's are, gitolite will reject them.
> 
> Having said that, all this occurred under refs/heads; I didn't set anything extra to do this.
> 
> What did you type when you pushed your refs, that is, to have them going to refs/development? I'm not aware that's possible, though please correct me if I'm wrong.  Even if i were to try on a local repo, I get the following:
> 
> $ git checkout -b development
> Switched to a new branch 'development'
> $ git push origin development:refs/development
> Total 0 (delta 0), reused 0 (delta 0)
> remote: error: refusing to create funny ref 'refs/development' remotely
> 
> if I were to do it properly, they end up in the same place, refs/heads:
> $ git push origin development
> OR
> $ git push origin development:refs/heads/development
> 
> anyway, tl;dr: all my refs to go refs/heads where cgit expects them and will show it in summary.
> 
> On Fri, Nov 18, 2011 at 6:42 PM, Rob <wink at connectedserver.com> wrote:
> Hi List,
> 
> I've been googling quite a bit and i can't seem to find it nor 'fix' it myself. I've setup personal branches for gitolite for users (in a group) using the
> 
> RW+    development/USER/ = @userlist
> 
> syntax. The pushes do not reside in refs/heads but in refs/development/username/branchname and maybe that's why they don't show in the overview? Is it possible to show the branches from 'personal user branches' with cgit using the gitolite setup?
> 
> Looking forward to a reply,
> 
> WINK
> 
> 
> 
> 
> _______________________________________________
> cgit mailing list
> cgit at hjemli.net
> http://hjemli.net/mailman/listinfo/cgit
> 

Rob
wink at connectedserver.com






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-19 22:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-18 23:42 showing branches not in refs/heads/ wink
2011-11-19 21:26 ` jamie.couture
2011-11-19 22:32   ` wink

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