Include a magic /MERGE_LIST file for merge commits
The /MERGE_LIST file is generated by Gerrit and is automatically included in all changes for merge commits. It contains a list with the commits that are integrated by accepting the merge commit. When comparing against the auto-merge or a previous patch set it is assumed that the first parent is uninteresting, so that the file lists all commits which are reachable by the other parents, but not by the first parent. If a comparison against a selected parent is done, that parent is marked as uninteresting. This means the content of the file depends on the selection in 'Diff Against' drop-down box. By having the /MERGE_LIST file reviewers can immediately see which commits get integrated by this merge commit. This is important since for merge commits reviewers are supposed to review and approve these commits. Having a file for this allow reviewers to comment on the list and also see diffs between patch sets. In edit mode the /MERGE_LIST file is not editable. Change-Id: Iafcfe3f274ed334e9a40c13de5040a7509389e27 Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -22,6 +22,9 @@ public final class Patch {
|
||||
/** Magical file name which represents the commit message. */
|
||||
public static final String COMMIT_MSG = "/COMMIT_MSG";
|
||||
|
||||
/** Magical file name which represents the merge list of a merge commit. */
|
||||
public static final String MERGE_LIST = "/MERGE_LIST";
|
||||
|
||||
/**
|
||||
* Checks if the given path represents a magic file. A magic file is a
|
||||
* generated file that is automatically included into changes. It does not
|
||||
@@ -32,7 +35,7 @@ public final class Patch {
|
||||
* {@code false}.
|
||||
*/
|
||||
public static boolean isMagic(String path) {
|
||||
return COMMIT_MSG.equals(path);
|
||||
return COMMIT_MSG.equals(path) || MERGE_LIST.equals(path);
|
||||
}
|
||||
|
||||
public static class Key extends StringKey<PatchSet.Id> {
|
||||
|
||||
Reference in New Issue
Block a user