Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

Feat: Set SOURCE_DATE_EPOCH for consistent age display

Maximilian Roos6acf8906418b
diff --git a/tests/common/mod.rs b/tests/common/mod.rs
index 1326408c2..f5b83eee7 100644
--- a/tests/common/mod.rs
+++ b/tests/common/mod.rs
@@ -95,6 +95,9 @@ pub fn configure_cli_command(cmd: &mut Command) {
// Tests that need config should use TestRepo::clean_cli_env() which overrides this
cmd.env("WORKTRUNK_CONFIG_PATH", "/nonexistent/test/config.toml");
cmd.env("CLICOLOR_FORCE", "1");
+ // Oct 28, 2025 - exactly 300 days (10 months) after default commit date (2025-01-01)
+ // for deterministic relative time display in Age column
+ cmd.env("SOURCE_DATE_EPOCH", "1761609600");
if std::env::var("COLUMNS").is_err() {
cmd.env("COLUMNS", "150");
}
diff --git a/tests/snapshots/integration__integration_tests__list__list_with_c_flag.snap b/tests/snapshots/integration__integration_tests__list__list_with_c_flag.snap
index e2b1e03bc..3f0042d64 100644
--- a/tests/snapshots/integration__integration_tests__list__list_with_c_flag.snap
+++ b/tests/snapshots/integration__integration_tests__list__list_with_c_flag.snap
@@ -10,6 +10,7 @@ info:
CLICOLOR_FORCE: "1"
COLUMNS: "150"
GIT_EDITOR: ""
+ SOURCE_DATE_EPOCH: "1761609600"
WORKTRUNK_BIN: ""
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
---
@@ -19,8 +20,8 @@ exit_code: 0
----- stderr -----
Branch Status HEAD± main↕ Path Remote⇅ Commit Age Message
-@ main ^ ./repo b834638e 11mo Initial commit
-+ feature-a _ ./repo.feature-a b834638e 11mo Initial commit
-+ feature-b _ ./repo.feature-b b834638e 11mo Initial commit
+@ main ^ ./repo b834638e 10mo Initial commit
++ feature-a _ ./repo.feature-a b834638e 10mo Initial commit
++ feature-b _ ./repo.feature-b b834638e 10mo Initial commit
⚪ Showing 3 worktrees