Skip to content

(do not review) test to see if CI detects mtime issues#14367

Open
jonathantanmy2 wants to merge 1 commit into
masterfrom
jt/mtime
Open

(do not review) test to see if CI detects mtime issues#14367
jonathantanmy2 wants to merge 1 commit into
masterfrom
jt/mtime

Conversation

@jonathantanmy2

Copy link
Copy Markdown
Collaborator

test to see if CI detects mtime issues

Copilot AI review requested due to automatic review settings June 22, 2026 17:05
@github-actions github-actions Bot added rust Pull requests that update Rust code CLI The command-line program `but` labels Jun 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a regression test in the but CLI integration test suite intended to detect unintended file mtime changes caused by but commit, likely to validate CI behavior around mtime handling.

Changes:

  • Add a new test that attempts to assert but commit does not modify a working-tree file’s modification time.

Comment thread crates/but/tests/but/command/commit.rs Outdated
Comment on lines +1634 to +1643
let old_time = std::fs::metadata(env.projects_root().join("A"))?.modified()?;

env.file("A", "new content");
env.but("commit -m test").assert().success();

let new_time = std::fs::metadata(env.projects_root().join("A"))?.modified()?;
assert_eq!(
new_time, old_time,
"time should be the same, because file should not have been modified"
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLI The command-line program `but` rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants