Skip to content
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

git changelog outputs all commits in only one repo #504

Open
jankatins opened this issue Jan 19, 2016 · 4 comments
Open

git changelog outputs all commits in only one repo #504

jankatins opened this issue Jan 19, 2016 · 4 comments

Comments

@jankatins
Copy link
Contributor

When I use git changelog -x in my old clone of the pandas repo (https://github.com/pydata/pandas), it shows all commits, not as usual the commits since the last tag.

I cannot reproduce it with a newly cloned repo, only with the one I already have.

Another interesting fact (in that broken? repo) is, that git changelog takes the last tag as outputted by git tag and shows everything from that until today (e.g. no 0.4 shown):

v0.10.0
v0.10.0b1
v0.10.1
v0.11.0
v0.11.0rc1
v0.12.0
v0.12.0rc1
v0.13.0
v0.13.0_ahl1
v0.13.0_ahl2
v0.13.0rc1
v0.13.1
v0.14.0
v0.14.0rc1
v0.14.1
v0.15.0
v0.15.0rc1
v0.15.1
v0.15.2
v0.15.2pre
v0.15pre
v0.16.0
v0.16.0rc1
v0.16.1
v0.16.2
v0.17.0
v0.17.0rc1
v0.17.0rc2
v0.17.1
v0.4.0
v0.4.1
v0.4.2
v0.4.3
v0.5.0
v0.6.0
v0.6.1
v0.7.0
v0.7.0rc1
v0.7.1
v0.7.2
v0.7.3
v0.8.0
v0.8.0b1
v0.8.0b2
v0.8.0rc1
v0.8.0rc2
v0.8.1
v0.9.0
v0.9.0rc1
v0.9.0rc2
v0.9.1
v0.9.1rc1

The last tag in the output is v0.9.1rc1 but there is also a master / 2013-02-17 line, one which names my branch (API_additions / 2013-10-15) and three n.n.n / 2016-01-19...

@jankatins
Copy link
Contributor Author

What I also find interesting is that the docs in git-changelog all tell that if no start tag is given, all commits are shown but on my system only the commits since the most recent tag are shown.

@spacewander spacewander mentioned this issue Jan 20, 2016
@spacewander
Copy link
Collaborator

The docs said:

if tags exist, then only the most-recent commits are output up to the last identified tag

So only commits since the last tag is shown unless the -a option given.

Sometimes it is confusing because git changelog will append its new output to existed History.md and make it look like all commits is shown... Even if you specify option -x, it just print the content of appended changelog to stdout.

@spacewander
Copy link
Collaborator

Did you run git changelog on your branch or on master?
Have you made any tags on your branch?

I found something interesting may be in charge of the result.

@jankatins
Copy link
Contributor Author

Ok, its what you describe above: my problem was that per default git changelog -x will append the content of history.md and if one run git changelog without -x, it wil be filled. After deleting the file in both checkouts, it's ok again...

IMO that's a bad default: git changelog -x should NOT append anything which is on the disk.

Another problem is that a repeated git changelog will prepend the same commits again, so if you don't clean them up manually they are inserted twice... :-/ Maybe check if the tag which is used for the first entry (n.n.n) or the 1-3 oldest commit(s) of the first entry are already in file and issue a warning?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants