fix(git): add offset_minutes to reflog entry for timezone-correct timestamps
CommitReflogEntry now includes offset_minutes field, populated from sig.when().offset_minutes() — matches git's internal timezone offset representation. Used by git_tools for accurate reflog timestamps.
This commit is contained in:
parent
99bc4eeb80
commit
76de013a60
@ -121,6 +121,7 @@ impl GitDomain {
|
|||||||
committer_name: sig.name().unwrap_or("").to_string(),
|
committer_name: sig.name().unwrap_or("").to_string(),
|
||||||
committer_email: sig.email().unwrap_or("").to_string(),
|
committer_email: sig.email().unwrap_or("").to_string(),
|
||||||
time_secs: sig.when().seconds(),
|
time_secs: sig.when().seconds(),
|
||||||
|
offset_minutes: sig.when().offset_minutes(),
|
||||||
message: entry.message().map(String::from),
|
message: entry.message().map(String::from),
|
||||||
ref_name: refname.clone(),
|
ref_name: refname.clone(),
|
||||||
});
|
});
|
||||||
@ -207,6 +208,7 @@ impl GitDomain {
|
|||||||
committer_name: sig.name().unwrap_or("").to_string(),
|
committer_name: sig.name().unwrap_or("").to_string(),
|
||||||
committer_email: sig.email().unwrap_or("").to_string(),
|
committer_email: sig.email().unwrap_or("").to_string(),
|
||||||
time_secs: sig.when().seconds(),
|
time_secs: sig.when().seconds(),
|
||||||
|
offset_minutes: sig.when().offset_minutes(),
|
||||||
message: entry.message().map(String::from),
|
message: entry.message().map(String::from),
|
||||||
ref_name: refname.clone(),
|
ref_name: refname.clone(),
|
||||||
});
|
});
|
||||||
|
|||||||
@ -145,6 +145,7 @@ pub struct CommitReflogEntry {
|
|||||||
pub committer_name: String,
|
pub committer_name: String,
|
||||||
pub committer_email: String,
|
pub committer_email: String,
|
||||||
pub time_secs: i64,
|
pub time_secs: i64,
|
||||||
|
pub offset_minutes: i32,
|
||||||
pub message: Option<String>,
|
pub message: Option<String>,
|
||||||
pub ref_name: String,
|
pub ref_name: String,
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user