Merge branch 'stable-2.6' into 'stable-2.7'
* stable-2.6: Skip non-commits when verifying access for 'add branch' operation Fix gerrit-extension-api-X.Y-all-sources.jar Change-Id: I937e595e6fef942763dd5dd4e1436212d8b6ae3b
This commit is contained in:
@@ -51,6 +51,19 @@ limitations under the License.
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>bundle-sources</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
|
@@ -40,6 +40,7 @@ import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import com.google.inject.assistedinject.Assisted;
|
||||
|
||||
import org.eclipse.jgit.errors.IncorrectObjectTypeException;
|
||||
import org.eclipse.jgit.lib.Ref;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import org.eclipse.jgit.revwalk.RevCommit;
|
||||
@@ -468,7 +469,12 @@ public class ProjectControl {
|
||||
Repository repo = repoManager.openRepository(projName);
|
||||
try {
|
||||
for (Entry<String, Ref> entry : repo.getAllRefs().entrySet()) {
|
||||
RevCommit tip = rw.parseCommit(entry.getValue().getObjectId());
|
||||
RevCommit tip;
|
||||
try {
|
||||
tip = rw.parseCommit(entry.getValue().getObjectId());
|
||||
} catch (IncorrectObjectTypeException e) {
|
||||
continue;
|
||||
}
|
||||
if (rw.isMergedInto(commit, tip)
|
||||
&& controlForRef(entry.getKey()).canPerform(Permission.READ)) {
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user