devhub-tud / Java-Gitolite-Manager

The java-gitolite-manager is a simple and compact Java library which enables developers to manage their gitolite configuration from Java. The aim is to give developers an easy to understand interface to manage repositories, groups and users in gitolite.
Apache License 2.0
11 stars 5 forks source link

Changes are not pushed to gitolite-admin if merge conflicts between head and remote #20

Closed jwgmeligmeyling closed 9 years ago

jwgmeligmeyling commented 9 years ago

Changes are not pushed to gitolite-admin if merge conflicts between head and remote

michaeldejong commented 9 years ago

Since resolving merge conflicts is probably too hard, we should discard all changes from our repo (either hard resetting, or dropping the repo and re-cloning it even), and then re-run all the actions on the queue.

Should be a nice one to fix :smile:

jwgmeligmeyling commented 9 years ago

What is really strange here is that JGit push should throw an exception if its behind the remote and can't push (at least thats what I expect). This exception is never thrown, so the config finishes to apply and both the gitolite manager and the git server think the changes are applied properly.

So first we should find out why the push didnt throw, maybe this was a bug in an older Jgit version, or does the command return a special return value if the push failed.

From there it would indeed be nice to fetch the new config and applying the changes on that commit. Or maybe it's enough to perform a git pull before applying the changes?