A file-based task manager
0
fork

Configure Feed

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

Include human id in namespace commit messages

assign_id and unassign_id now append `<ns>-<human>` to the commit
message they write, so `tsk log namespace` shows which task each entry
refers to (e.g. "assign-id tsk-5", "share alpha-3") instead of the
ambiguous bare verb.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

+4 -3
+2 -2
src/namespace.rs
··· 145 145 let human = ns.next; 146 146 ns.next += 1; 147 147 ns.mapping.insert(human, stable); 148 - write(repo, name, &ns, message)?; 148 + write(repo, name, &ns, &format!("{message} {name}-{human}"))?; 149 149 Ok(human) 150 150 } 151 151 ··· 153 153 pub fn unassign_id(repo: &Repository, name: &str, human: u32, message: &str) -> Result<()> { 154 154 let mut ns = read(repo, name)?; 155 155 if ns.mapping.remove(&human).is_some() { 156 - write(repo, name, &ns, message)?; 156 + write(repo, name, &ns, &format!("{message} {name}-{human}"))?; 157 157 } 158 158 Ok(()) 159 159 }
+2 -1
src/workspace.rs
··· 992 992 let log = ws.log_namespace("tsk").unwrap(); 993 993 // Two id-assignments. 994 994 assert!(log.len() >= 2, "got {}", log.len()); 995 - assert_eq!(log[0].summary, "assign-id"); 995 + assert_eq!(log[0].summary, "assign-id tsk-2"); 996 + assert_eq!(log[1].summary, "assign-id tsk-1"); 996 997 } 997 998 998 999 #[test]