-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
contrib: use specific git log range. Avoid --all. #36
Conversation
099c18c
to
3238697
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay we are close! A few remaining todos:
I think I found a bug if we specify an end but not start:
$ citelang contrib --end 0.0.13
pip not installed on system, parsing will be done statically (less reliable)
This repository does not have any history.
And I think we probably need to derive the first commit (unless you know some git fu that doesn't require it!)
$ git rev-list --max-parents=0 HEAD
9e915bd2e1ae121a421b5430acda8adf361bd35d
$ git log 9e915bd2e1ae121a421b5430acda8adf361bd35d..0.0.13
# has result
I got that here: https://stackoverflow.com/questions/1006775/how-to-reference-the-initial-commit
And then we need:
- bump version up in citelang/version.py
- add entry to CHANGELOG.md to describe change.
and the other combos seem to work ok!
Gotcha - I think I've not really been getting the prior behavior of citelang into my head here, as I'm used to git tools where if a specific start point isn't specified it means 'current commit' rather than beginning of history.
Actually, this'll just be the |
Because `git log --all` effectively adds REFS in `refs/` to the `git log` call it will produce output listing commits from all the REFS in our local repo. Citelang was getting a list of `--all` commits, and then filtering between start and end points. Because of this, it could pick up commits that are not really in the section of history we are interested in - but come from a fork, or usptream with shared history earlier on. Call `git log` with a specific commit range so that it directly provides the correct list of commits we need to consider. As a bonus, you can now use other refs like branches or deltas as `--start` and `--end` points. Fixes vsoch#35
Sounds good, thanks @dtrudg ! Have a good weekend. |
This should do it now. Thanks for your patience with me :-)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woohoo! This looks great. Let's merge and release!
Because
git log --all
effectively adds REFS inrefs/
to thegit log
call it will produce output listing commits from all the REFS in our local repo.Citelang was getting a list of
--all
commits, and then filtering between start and end points. Because of this, it could pick up commits that are not really in the section of history we are interested in - but come from a fork, or usptream with shared history earlier on.Call
git log
with a specific commit range so that it directly provides the correct list of commits we need to consider.As a bonus, you can now use other refs like branches or deltas as
--start
and--end
points.Fixes #35