Skip to content

Commit 9a7b31d

Browse files
committed
OCD: Head > Index > WorkDir
1 parent da2a8d3 commit 9a7b31d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

LibGit2Sharp/Submodule.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ public class Submodule : IEquatable<Submodule>
1818
private readonly string name;
1919
private readonly string path;
2020
private readonly string url;
21-
private readonly ILazy<ObjectId> indexCommitId;
2221
private readonly ILazy<ObjectId> headCommitId;
22+
private readonly ILazy<ObjectId> indexCommitId;
2323
private readonly ILazy<ObjectId> workdirCommitId;
2424
private readonly ILazy<bool> fetchRecurseSubmodulesRule;
2525
private readonly ILazy<SubmoduleIgnore> ignoreRule;
@@ -39,8 +39,8 @@ internal Submodule(Repository repo, string name, string path, string url)
3939
this.url = url;
4040

4141
var commitIds = new SubmoduleLazyGroup(repo, name);
42-
indexCommitId = commitIds.AddLazy(Proxy.git_submodule_index_id);
4342
headCommitId = commitIds.AddLazy(Proxy.git_submodule_head_id);
43+
indexCommitId = commitIds.AddLazy(Proxy.git_submodule_index_id);
4444
workdirCommitId = commitIds.AddLazy(Proxy.git_submodule_wd_id);
4545

4646
var rules = new SubmoduleLazyGroup(repo, name);
@@ -65,14 +65,14 @@ internal Submodule(Repository repo, string name, string path, string url)
6565
public virtual string Url { get { return url; } }
6666

6767
/// <summary>
68-
/// The commit ID for this submodule in the index.
68+
/// The commit ID for this submodule in the current HEAD tree.
6969
/// </summary>
70-
public virtual ObjectId IndexCommitId { get { return indexCommitId.Value; } }
70+
public virtual ObjectId HeadCommitId { get { return headCommitId.Value; } }
7171

7272
/// <summary>
73-
/// The commit ID for this submodule in the current HEAD tree.
73+
/// The commit ID for this submodule in the index.
7474
/// </summary>
75-
public virtual ObjectId HeadCommitId { get { return headCommitId.Value; } }
75+
public virtual ObjectId IndexCommitId { get { return indexCommitId.Value; } }
7676

7777
/// <summary>
7878
/// The commit ID for this submodule in the current working directory.

0 commit comments

Comments
 (0)