blob: 06b21a6bb14012c484e50f667e551137cd8dcd80 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
/*
* Copyright (C) 2011, GitHub Inc. and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0 which is available at
* https://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
package org.eclipse.jgit.submodule;
import org.eclipse.jgit.lib.ObjectId;
/**
* Status class containing the type, path, and commit id of the submodule.
*/
public class SubmoduleStatus {
private final SubmoduleStatusType type;
private final String path;
private final ObjectId indexId;
private final ObjectId headId;
/**
* Create submodule status
*
* @param type
* a {@link org.eclipse.jgit.submodule.SubmoduleStatusType}
* object.
* @param path
* submodule path
* @param indexId
* an {@link org.eclipse.jgit.lib.ObjectId} object.
*/
public SubmoduleStatus(final SubmoduleStatusType type, final String path,
final ObjectId indexId) {
this(type, path, indexId, null);
}
/**
* Create submodule status
*
* @param type
* a {@link org.eclipse.jgit.submodule.SubmoduleStatusType}
* object.
* @param path
* submodule path
* @param indexId
* index id
* @param headId
* head id
*/
public SubmoduleStatus(final SubmoduleStatusType type, final String path,
final ObjectId indexId, final ObjectId headId) {
this.type = type;
this.path = path;
this.indexId = indexId;
this.headId = headId;
}
/**
* Get type
*
* @return type
*/
public SubmoduleStatusType getType() {
return type;
}
/**
* Get submodule path
*
* @return path submodule path
*/
public String getPath() {
return path;
}
/**
* Get index object id
*
* @return index object id
*/
public ObjectId getIndexId() {
return indexId;
}
/**
* Get HEAD object id
*
* @return HEAD object id
*/
public ObjectId getHeadId() {
return headId;
}
}
|