On Thu, Apr 16, 2009 at 09:51:33AM +0200, Jan Pazdziora wrote:
> 
> Since there were no objections, I assume people have tested the code
> and are OK with it. I'm about to drop an email to
> fedora-infrastructure -- please shout now if you do not want to see
> that commit hook on Spacewalk upstream repository.

For your information -- the hook was activated on Spacewalk git
repository at ssh://git.fedorahosted.org/git/spacewalk.git/ now.

If you try to push a commit which is a merge and has a commit
message which looks like an automatic merge, you will get an error
like this:

$ git push
Counting objects: 12, done.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 763 bytes, done.
Total 7 (delta 5), reused 0 (delta 0)
Commit [22709bf42f9effdc4dcc3acc31eb95c2952e3386] looks like automatic merge 
when you did not rebase after pull.
To ssh://git.fedorahosted.org/git/spacewalk.git/
 ! [remote rejected] master -> master (pre-receive hook declined)
error: hooks/pre-receive exited with error code 1
error: failed to push some refs to 
'ssh://git.fedorahosted.org/git/spacewalk.git/'

In other words: if you see this error, it's because you are try to
to push merge without rebase.

The fix is to rebase:

$ git rebase origin/master
First, rewinding head to replay your work on top of it...
Applying: spacewalk-selinux: amend %changelog.

... review the result with

$ gitk --all &

... and if you are happy with the result, push:

$ git push
Counting objects: 9, done.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 481 bytes, done.
Total 5 (delta 4), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/spacewalk.git/
   15122b3..81ee3ac  master -> master
$

-- 
Jan Pazdziora
Senior Software Engineer, Satellite Engineering, Red Hat

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to