-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring #84
Comments
Actually, we could just drop most features (eventough they seem nice, are they really needed? @n etc..) You certainly almost always know from where to where you genereate the log. :-) |
Why I come with this: there is no way to generate the log from HEAD to lastTag (without the Tag!)... |
This seems to make sense. But it does have some scenarios, eg. generating the changelog of the last two versions from HEAD, |
It should work without any tags. We can add a test case to fix it. try run command: whatchanged --project=https://github.com/release-lab/test-first-commit.git --preset=full HEAD~ |
Sorry I was not clear: because closed ranges are used, this is trouble some. Therefore (and in many other languages, its better to use open ranges.) |
Ok it seams that just works, by not giving any arguments. |
Ok, strange things happen when some tag is somewhere else (not seen from HEAD) The behavior you certainly want is to replace your current parsing with
Then collecting all SHA commits, and then hand them over to In that way the user has more possibilities and the result is also more correct. |
Ok, hm... its not that easy I guess.
So I guess the syntax
With Tags:
With Commits:It gets tricky, dont use the
Options invocationThen there is more difficulties with invocation:
All splices in group 1 are outputted first (note |
It might be nice, if the revision range just supports Git syntax "SHA..SHA".
The parsers seems a bit complicated.
Actually the whole thing could be made much easier:
git rev-parse A..B
is extremely powerfull and could be used once, to get the list of commits.
Then another for loop just parses everything.
Thats gonna result in a 5% of the code in 0_parser.go
And I really suggest to use open ranges https://github.com/gabyx/Githooks/blob/06b29e49f6bf62b58bee38431eb3603e45bb85f2/githooks/git/gitcommon.go#L313
with a maybe flag
--include-last
.Do you think that might work?
The text was updated successfully, but these errors were encountered: