TODOs JJ Style

26 points by Raicuparta 5 hours ago on lobsters | 7 comments

Even if it doesn't feel very groundbreaking, this is the kind of thing that you could just never think about coming from the "message last" way of git thinking.

I've been doing a lot more "WIP" commits with small ideas, but never took it to the point of an empty commit, will be adopting this.

I tried doing something like this, but after a while it just becomes messy(yes, it's a skill issue), so I reverted back to using TODO.md, but I keep that file in it's own separate commit, and add that commit to my currently worked on megamerge

jedahan | 4 hours ago

Seems smart - you are gonna write those descriptions anyway so saves a step.

kraxen72 | 3 hours ago

interesting. i don't use jj, but i can see the appeal. i usually make an obsidian note per project, ## todo and ## done headings, and use - [ ] markdown checkboxes, with sub-items being indented. once done, i move the relevant lines under ## done

kevinc | 2 hours ago

I like that the todo's position in the history would remind me of what I was doing when I thought to capture it.

gavinmorrow | 32 minutes ago

I do the private commit thing, and I also add the wip: prefix.

I think a tree like this is interesting especially for creating hierarchies of tasks but I would struggle keeping the empty commits organized.

In my default log template I made it so if a commit starts with "wip" and contains "todo:" then it shows the whole description. This way when I spam jj log in a repo I get hit with my todo list/message.

template-aliases."show_desc(desc)" = '''
if(
  desc.starts_with("wip") && desc.lower().contains("todo:"),
  label("todo", desc.lines().skip(1).join("\n")),
  ""
)
'''

which results in this:

○  yxlrqxpu me wip (empty) 31 seconds ago
│  todo:
~  - [ ] task 1
   - [ ] task 2