today
today copied to clipboard
It's just work for HEAD branch only.
I have worked with multiple branches. But when I generate a report, it just show me a report for current branch only.
:wave: Thanks for filing an issue.
The current intention is very much that the tool looks at HEAD, as this is where you are currently placed within your working tree and seems that a vast majority of the time you would be looking at your past X hours work for where you are.
If I understand correctly, is your intention that you should be able to do something along the lines of :point_down: ?
today --branches=feat/new-app,chore/cleanup DIRECTORIES
And the tool would show commits from HEAD, feat/new-app, and chore/cleanup in the directories where those branches exist, skipping those where it doesn't?
An issue that I could foresee, is that in order to check for commits in other branches, multiple git.PlainOpen (or equivalent) must be called, this has the potential to cause problems with your current working tree as those new branch references need to be opened in order to find the commits over a specified time range.
https://github.com/jdockerty/today/blob/a61e6fc3189be7a1dc7abdb2c4fc61d6aa389cac/today.go#L70-L81
I haven't looked at this for some time, but I believe this would be a problem if you have uncommitted changes, as the different branch could cause conflicts.
I'd be happy to take a look over a proposal on a feature though if it's something you think could really work :rocket: