summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/git/PatchsetCommand.java
diff options
context:
space:
mode:
authorFlorian Zschocke <f.zschocke+git@gmail.com>2022-12-07 20:33:38 +0100
committerFlorian Zschocke <f.zschocke+git@gmail.com>2022-12-07 20:33:38 +0100
commit4baed92559bc38f421fb8ea3dd6e177db886d780 (patch)
treec7424c477bcffbecbff46ee33ceb24b3a0831efb /src/main/java/com/gitblit/git/PatchsetCommand.java
parent60a0434ac329af040ba11ec7dedafe581a9b588e (diff)
downloadgitblit-4baed92559bc38f421fb8ea3dd6e177db886d780.tar.gz
gitblit-4baed92559bc38f421fb8ea3dd6e177db886d780.zip
fix: Fix broken pushes to tickets
The update of JGit broke pushes to tickets. The ReceiveCommand now requires all three arguments, oldId, newId and name, to be not null. The ticket code handling pushes to tickets left name and old id as null in certain cases. This is fixed by always providing values.
Diffstat (limited to 'src/main/java/com/gitblit/git/PatchsetCommand.java')
-rw-r--r--src/main/java/com/gitblit/git/PatchsetCommand.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/git/PatchsetCommand.java b/src/main/java/com/gitblit/git/PatchsetCommand.java
index 21d2ac45..829ece1d 100644
--- a/src/main/java/com/gitblit/git/PatchsetCommand.java
+++ b/src/main/java/com/gitblit/git/PatchsetCommand.java
@@ -106,7 +106,7 @@ public class PatchsetCommand extends ReceiveCommand {
public PatchsetCommand(String username, Patchset patchset) {
super(patchset.isFF() ? ObjectId.fromString(patchset.parent) : ObjectId.zeroId(),
- ObjectId.fromString(patchset.tip), null);
+ ObjectId.fromString(patchset.tip), getPatchsetBranch(patchset.ticketId, patchset.number));
this.change = new Change(username);
this.change.patchset = patchset;
}