On Fri, Jul 9, 2010 at 7:19 AM, Stefan Sayer
<[email protected]> wrote:
> Hi,
>
> now I don't understand this:
>
> I created local branch 1.2 to track 1.2 branch with
> $ git branch  --track 1.2 origin/1.2
> and checked it out with
> $ git checkout 1.2

Btw, you can do the same with git checkout -b 1.2 origin/1.2

> then I cherry-picked some things from master and added some commit, and
> wanted to do
> $ git push
> which failed:
>
> ----
> Counting objects: 45, done.
> Delta compression using up to 2 threads.
> Compressing objects: 100% (32/32), done.
> Writing objects: 100% (41/41), 5.63 KiB, done.
> Total 41 (delta 30), reused 9 (delta 9)
> error: hooks/update exited with error code 1
> error: hook declined to update refs/heads/1.2
> To ssh://[email protected]/sems
>  ! [remote rejected] 1.2 -> 1.2 (hook declined)
> error: failed to push some refs to 'ssh://[email protected]/sems'
> ----

Access to individual branches is controlled with the file
info/allowed-users in the git repository. I just checked the file and
only the root had access to the 1.2. I changed that, could you try
again?

> even though I think everything is set up correctly here:
>
> $ git remote show origin
> * remote origin
>  URL: ssh://[email protected]/sems
>  HEAD branch: master
>  Remote branches:
>    0.10                       tracked
>    1.0                        tracked
>    1.0.0                      tracked
>    1.0.0_rc1                  tracked
>    1.1                        tracked
>    1.2                        tracked
> ...
>  Local branches configured for 'git pull':
>    1.2    rebases onto remote 1.2
>    master rebases onto remote master
>  Local refs configured for 'git push':
>    1.2    pushes to 1.2    (fast forwardable)
>    master pushes to master (up to date)
>
> in git.sip-router.org:/sems/refs/heads I don't see any 1.2, but I seem to
> have write access there.
>
> Now, it seems that all those branches don't exist neither in
> /sems/refs/heads nor in /sems/refs/tags (there is files only for master and
> the branches that we newly created). Probably the import from svn did not do
> that. Should I just create the files there (containing the correct hashes)?

No, do not create them. The way it is setup now is correct. The
original branches are in the packs. In additio to the files in
/sems/refs/heads, git also consults /sems/packed-refs. As long as the
branches are present in packed-refs, there's no need to have
individual files in /sems/refs/heads.

-Jan
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to