Details

      Description

      When setting up an opencit project to follow a remote branch other than master, the initial checkout works, but subsequent pulls fail:

      org.openengsb.domain.scm.ScmException: org.eclipse.jgit.api.errors.InvalidConfigurationException: No value for key branch.master.merge found in configuration
              at org.openengsb.connector.git.internal.GitServiceImpl.update(GitServiceImpl.java:164)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:616)
              at org.openengsb.core.common.util.DefaultOsgiUtilsService$ServiceTrackerInvocationHandler.invoke(DefaultOsgiUtilsService.java:92)
              at $Proxy138.update(Unknown Source)
              at org.openengsb.opencit.core.projectmanager.internal.PollTask.doRun(PollTask.java:78)
              at org.openengsb.opencit.core.projectmanager.internal.PollTask.run(PollTask.java:59)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
              at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
              at java.lang.Thread.run(Thread.java:679)
      Caused by: org.eclipse.jgit.api.errors.InvalidConfigurationException: No value for key branch.master.merge found in configuration
              at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:189)
              at org.openengsb.connector.git.internal.GitServiceImpl.update(GitServiceImpl.java:134)
              ... 16 more

      I don't know yet if the checkout sets the repository up in a wrong way or if the pull behaves incorrectly.

        Gliffy Diagrams

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

          Hide
          Stefan Dösinger added a comment -

          It looks like the initial setup creates an invalid git configuration:

          $ git pull
          You asked me to pull without telling me which branch you
          want to merge with, and 'branch.master.merge' in
          your configuration file does not tell me, either. Please
          specify which branch you want to use on the command line and
          try again (e.g. 'git pull <repository> <refspec>').
          See git-pull(1) for details.
           
          If you often merge with the same branch, you may want to
          use something like the following in your configuration file:
           
              [branch "master"]
              remote = <nickname>
              merge = <remote-ref>
           
              [remote "<nickname>"]
              url = <url>
              fetch = <refspec>
           
          See git-config(1) for details.

          Show
          Stefan Dösinger added a comment - It looks like the initial setup creates an invalid git configuration: $ git pull You asked me to pull without telling me which branch you want to merge with, and 'branch.master.merge' in your configuration file does not tell me, either. Please specify which branch you want to use on the command line and try again (e.g. 'git pull <repository> <refspec>'). See git-pull(1) for details.   If you often merge with the same branch, you may want to use something like the following in your configuration file:   [branch "master"] remote = <nickname> merge = <remote-ref>   [remote "<nickname>"] url = <url> fetch = <refspec>   See git-config(1) for details.
          Hide
          Andreas Pieber added a comment -

          oh, this one sounds pretty much like a typical pull-no-linked-problem. Easiest solution here is to do a fetch on the remote repository and a merge of the branches (git fetch origin; git merge branchname origin/branchname) manually...

          Show
          Andreas Pieber added a comment - oh, this one sounds pretty much like a typical pull-no-linked-problem. Easiest solution here is to do a fetch on the remote repository and a merge of the branches (git fetch origin; git merge branchname origin/branchname) manually...
          Hide
          Stefan Dösinger added a comment -

          The problem is that we create the branch config incorrectly. The local branch is always "master", no matter what name the remote branch has. I've a patch and will send a pull request when I am back at home.

          Show
          Stefan Dösinger added a comment - The problem is that we create the branch config incorrectly. The local branch is always "master", no matter what name the remote branch has. I've a patch and will send a pull request when I am back at home.
          Hide
          Stefan Dösinger added a comment -

          Stupid me, I already pushed this patch(it seemed simple enough). 73c2d9329d1e2cc3bb039c8c77b30696f97ffc3a fixes this on the master branch, and e429b05042b9268edfdd674d3c9f51d2393c0e33 on the openengsb-2.x one.

          Show
          Stefan Dösinger added a comment - Stupid me, I already pushed this patch(it seemed simple enough). 73c2d9329d1e2cc3bb039c8c77b30696f97ffc3a fixes this on the master branch, and e429b05042b9268edfdd674d3c9f51d2393c0e33 on the openengsb-2.x one.

            People

            • Assignee:
              Stefan Dösinger
              Reporter:
              Stefan Dösinger
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: