Skip to content

Commit 5a1b3d6

Browse files
committed
Improve documentation of a field that one can easily get wrong otherwise.
1 parent 0ba3147 commit 5a1b3d6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

gix-status/src/index_as_worktree_with_renames/types.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ pub enum Entry<'index, ContentChange, SubmoduleStatus> {
129129
/// [CollapsedEntriesEmissionMode::OnStatusMismatch](gix_dir::walk::CollapsedEntriesEmissionMode::OnStatusMismatch).
130130
/// It will also be `Some(dir_status)` if that option was [CollapsedEntriesEmissionMode::All](gix_dir::walk::CollapsedEntriesEmissionMode::All).
131131
dirwalk_entry_collapsed_directory_status: Option<gix_dir::entry::Status>,
132-
/// The object id after the rename, specifically hashed in order to determine equality.
132+
/// The object id as it would appear if the entry was written to the object database, specifically hashed in order to determine equality.
133+
/// Note that it doesn't (necessarily) exist in the object database, and may be [null](gix_hash::ObjectId::null) if no hashing
134+
/// was performed.
133135
dirwalk_entry_id: gix_hash::ObjectId,
134136
/// It's `None` if the 'source.id' is equal to `dirwalk_entry_id`, as identity made an actual diff computation unnecessary.
135137
/// Otherwise, and if enabled, it's `Some(stats)` to indicate how similar both entries were.

gix/src/status/index_worktree.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,9 @@ pub enum Item {
359359
/// [CollapsedEntriesEmissionMode::OnStatusMismatch](gix_dir::walk::CollapsedEntriesEmissionMode::OnStatusMismatch).
360360
/// It will also be `Some(dir_status)` if that option was [CollapsedEntriesEmissionMode::All](gix_dir::walk::CollapsedEntriesEmissionMode::All).
361361
dirwalk_entry_collapsed_directory_status: Option<gix_dir::entry::Status>,
362-
/// The object id after the rename, specifically hashed in order to determine equality.
362+
/// The object id as it would appear if the entry was written to the object database, specifically hashed in order to determine equality.
363+
/// Note that it doesn't (necessarily) exist in the object database, and may be [null](gix_hash::ObjectId::null) if no hashing
364+
/// was performed.
363365
dirwalk_entry_id: gix_hash::ObjectId,
364366
/// It's `None` if the 'source.id' is equal to `dirwalk_entry_id`, as identity made an actual diff computation unnecessary.
365367
/// Otherwise, and if enabled, it's `Some(stats)` to indicate how similar both entries were.

0 commit comments

Comments
 (0)