Allow to push a tag that points to a non-commit object
This was fixed in 2.11.1 with change I013c75db9 but was then inadvertently reverted by change If4a2375db which was included in 2.11.2 and 2.11.3. Redo the original fix. Bug: Issue 3328 Change-Id: I85e5e1afc65b1408acd0754f6adbdb6742928aaf
This commit is contained in:
@@ -2382,7 +2382,11 @@ public class ReceiveCommits {
|
|||||||
walk.sort(RevSort.NONE);
|
walk.sort(RevSort.NONE);
|
||||||
try {
|
try {
|
||||||
Set<ObjectId> existing = Sets.newHashSet();
|
Set<ObjectId> existing = Sets.newHashSet();
|
||||||
walk.markStart(walk.parseCommit(cmd.getNewId()));
|
RevObject parsedObject = walk.parseAny(cmd.getNewId());
|
||||||
|
if (!(parsedObject instanceof RevCommit)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
walk.markStart((RevCommit)parsedObject);
|
||||||
markHeadsAsUninteresting(walk, existing, cmd.getRefName());
|
markHeadsAsUninteresting(walk, existing, cmd.getRefName());
|
||||||
|
|
||||||
RevCommit c;
|
RevCommit c;
|
||||||
|
|||||||
Reference in New Issue
Block a user