dshipper / Tigger

a beautifully simple, command-line based task management system that lives inside your git repo.
http://tiggerlovesdevs.com
Other
41 stars 6 forks source link

Bug with Tasks Containing other Tasks as Substring #12

Open theonewolf opened 13 years ago

theonewolf commented 13 years ago

Just found this, maybe there's a typo in my commit message and I'm being stupid:

git commit -am 'finished print file paths, print file paths with SHA1, create file crawler for SHA1 hashes' Running tigger.... Matching tasks and commit messages. Completed task: create file crawler for SHA1 hashes. Completed task: print file paths. [master e6a09eb] finished print file paths, print file paths with SHA1, create file crawler for SHA1 hashes

I think though that the Ruby is only matching on one of them, the first it hits.

I expected this to also happen:

Completed task: print file paths with SHA1

But it didn't seem to hit that one.

Task list before:

Task 1: create file crawler for SHA1 hashes Task 2: [removed] Task 3: print file paths Task 4: print file paths with SHA1 Task 5: convert to JSON output

I don't think I have a typo?

dshipper commented 13 years ago

Hmm I'm not sure why that would happen. So basically the ruby code says something like: for every task for every commit message if the commit message contains the task string mark off the task Maybe we should be reversing the for loops to go: for every commit for every task But I'm not sure if that would make any difference at all. Have you been able to replicate this with other commits?

dshipper commented 13 years ago

Ok so because of the other issue with multiple commits and tasks this loop is changed. I'm going to try to replicate the issue over here, but if you can let me know if this fixes it on your end.

dshipper commented 13 years ago

I've replicated the issue over here. It seems to me that the middle task seems to not get checked off. I did: dan-shippers-macbook-pro:Tigger dshipper$ git commit -am "Testing bug fix: fix multiple task per commit not getting marked off, fix 1, fix 2" Running tigger.... Matching tasks and commit messages. Completed task: fix multiple task per commit not getting marked off. Completed task: fix 2.

And then when I did the same commit again I got: dan-shippers-macbook-pro:Tigger dshipper$ git commit -am "Testing bug fix: fix multiple task per commit not getting marked off, fix 1, fix 2" Running tigger.... Matching tasks and commit messages. Completed task: fix 1. Completed task: fix 1.

I have no idea why this isn't working....

theonewolf commented 13 years ago

Cool, replication and figuring out that it's the middle guy, at least I'm not crazy or having typos.

Maybe something is greedily matching too much? I'm not sure, but somehow it's getting skipped.

Working on my other project rather than tigger right now :p, otherwise I'd also directly investigate.

I've replicated the issue over here. It seems to me that the middle task

seems to not get checked off. I did: dan-shippers-macbook-pro:Tigger dshipper$ git commit -am "Testing bug fix: fix multiple task per commit not getting marked off, fix 1, fix 2" Running tigger.... Matching tasks and commit messages. Completed task: fix multiple task per commit not getting marked off. Completed task: fix 2.

And then when I did the same commit again I got: dan-shippers-macbook-pro:Tigger dshipper$ git commit -am "Testing bug fix: fix multiple task per commit not getting marked off, fix 1, fix 2" Running tigger.... Matching tasks and commit messages. Completed task: fix 1. Completed task: fix 1.

I have no idea why this isn't working....

dshipper commented 13 years ago

Ok I'll keep working on it, and no worries :) I would love to see your other project if/when it's ready for other eyes