MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / git_commit_at

Function git_commit_at

atomic-cli/tests/it/git_import_cb9b_test.rs:1066–1081  ·  view source on GitHub ↗

Commit with a controlled committer date (the first deterministic shim tie-break), for ordering-sensitive fixtures.

(root: &Path, date: &str, message: &str)

Source from the content-addressed store, hash-verified

1064/// Commit with a controlled committer date (the first deterministic shim
1065/// tie-break), for ordering-sensitive fixtures.
1066fn git_commit_at(root: &Path, date: &str, message: &str) -> String {
1067 git(root, &["add", "."]);
1068 git_env(
1069 root,
1070 &[
1071 ("GIT_COMMITTER_DATE", date),
1072 ("GIT_AUTHOR_DATE", date),
1073 ("GIT_AUTHOR_NAME", "CB-9B Tests"),
1074 ("GIT_AUTHOR_EMAIL", "cb9b@example.com"),
1075 ("GIT_COMMITTER_NAME", "CB-9B Tests"),
1076 ("GIT_COMMITTER_EMAIL", "cb9b@example.com"),
1077 ],
1078 &["commit", "-q", "-m", message],
1079 );
1080 git(root, &["rev-parse", "HEAD"])
1081}
1082
1083/// Find an imported change by Git sha in `view`.
1084fn change_of(

Callers 1

ordered_merge_fixtureFunction · 0.85

Calls 2

git_envFunction · 0.85
gitFunction · 0.70

Tested by

no test coverage detected