just playing with tangled
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

cli version: Trim the commit id 16 characters

16 characters ought to be enough for anyone :)

+4 -4
+2 -2
cli/build.rs
··· 44 44 } 45 45 println!("cargo:rerun-if-env-changed=NIX_JJ_GIT_HASH"); 46 46 47 - // TODO: timestamp can be "nix" 48 - if let Some((git_hash, maybe_date)) = get_git_timestamp_and_hash() { 47 + if let Some((mut git_hash, maybe_date)) = get_git_timestamp_and_hash() { 48 + git_hash.truncate(16); 49 49 println!( 50 50 "cargo:rustc-env=JJ_VERSION={}-{}-{}", 51 51 version,
+2 -2
cli/tests/test_global_opts.rs
··· 48 48 let sanitized = stdout.replace(|c: char| c.is_ascii_hexdigit(), "?"); 49 49 let expected = [ 50 50 "jj ?.??.?\n", 51 - "jj ?.??.?-????????-????????????????????????????????????????\n", 51 + "jj ?.??.?-????????-????????????????\n", 52 52 // `dateunknown` turns into `??t?unknown` since d,a,e are hex digits. 53 - "jj ?.??.?-??t?unknown-????????????????????????????????????????\n", 53 + "jj ?.??.?-??t?unknown-????????????????\n", 54 54 ]; 55 55 assert!( 56 56 expected.contains(&sanitized.as_str()),