| Summary: | FetchCommand with duplicate refspec results in "Duplicate ref" error | ||
|---|---|---|---|
| Product: | [Technology] JGit | Reporter: | Marc Strapetz <marc.strapetz> |
| Component: | JGit | Assignee: | Project Inbox <jgit.core-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | matthias.sohn, michal.barano, twolf |
| Version: | 4.9 | ||
| Target Milestone: | 4.9.4 | ||
| Hardware: | PC | ||
| OS: | All | ||
| See Also: |
https://git.eclipse.org/r/114823 https://bugs.eclipse.org/bugs/show_bug.cgi?id=529400 https://git.eclipse.org/r/127669 https://git.eclipse.org/c/jgit/jgit.git/commit/?id=65a0cfc82a75146113b9e138cb9fdd5f04c018d0 |
||
| Whiteboard: | |||
New Gerrit change created: https://git.eclipse.org/r/114823 Hi, When we can expect the bug to be fixed? New Gerrit change created: https://git.eclipse.org/r/127669 Gerrit change https://git.eclipse.org/r/127669 was merged to [stable-4.9]. Commit: http://git.eclipse.org/c/jgit/jgit.git/commit/?id=65a0cfc82a75146113b9e138cb9fdd5f04c018d0 Was fixed on stable-4.9, now needs merging up. Set Target milestone to 4.9.3. Fixed on stable-4.9, so it would be in 4.9.4, 4.10.1, 4.11.2, 5.0.3, and it is in 5.1 (current master), which is available from the EGit nightly update site at http://download.eclipse.org/egit/updates-nightly/ . |
When having a duplicate duplicate refspec in the .git/config file, like: [remote "test"] fetch = +refs/heads/*:refs/remotes/origin/* fetch = refs/heads/*:refs/remotes/origin/* Invoking FetchCommand will fail when trying to delete a stale ref: Caused by: java.io.IOException: Duplicate ref: refs/remotes/origin/branch at org.eclipse.jgit.internal.storage.file.PackedBatchRefUpdate.lockLooseRefs(PackedBatchRefUpdate.java:347) at org.eclipse.jgit.internal.storage.file.PackedBatchRefUpdate.execute(PackedBatchRefUpdate.java:192) at org.eclipse.jgit.lib.BatchRefUpdate.execute(BatchRefUpdate.java:633) at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:225) ... 28 more