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

[CLI] Only display part of git history #81

Closed
kamicloud opened this issue Feb 13, 2019 · 8 comments
Closed

[CLI] Only display part of git history #81

kamicloud opened this issue Feb 13, 2019 · 8 comments

Comments

@kamicloud
Copy link

image
Above is real git history displayed by tortoise.
When I use

git-file-history Application/DataService/Logic/RefundLogic.class.php

can only display 2 commit records in 2016
image

@pomber
Copy link
Owner

pomber commented Feb 13, 2019

Do you have more info?
This is using the CLI, right?
Anything strange with the missing commits?
Is it just one file or everyone?

@kamicloud
Copy link
Author

kamicloud commented Feb 14, 2019

Do you have more info?
This is using the CLI, right?
Anything strange with the missing commits?
Is it just one file or everyone?

I'm using CLI, and tried use

git log --follow --reverse --date=iso FILE

only display 2 records

git log --follow --date=iso FILE

can view all commit logs by press ↑ and ↓

Maybe it is a git issue, but I dont know how to solve it

@kamicloud
Copy link
Author

kamicloud commented Feb 14, 2019

Do you have more info?
This is using the CLI, right?
Anything strange with the missing commits?
Is it just one file or everyone?

Finally I found it caused by --follow option, sometimes --follow not in a good performance.

git --no-pager log --reverse --date=iso FILE

It can display all commit logs.

Shall we make --follow as optional which can controlled by user? I can help to do that

@twslade
Copy link

twslade commented Feb 14, 2019

I am seeing missing commits for moved files, but I believe this is caused by a known bug when utilizing --follow and --reverse

@pomber
Copy link
Owner

pomber commented Feb 14, 2019

I think we'll drop --follow for now

@pomber pomber changed the title Only display part of git history [CLI] Only display part of git history Feb 14, 2019
@pomber
Copy link
Owner

pomber commented Feb 14, 2019

Could you try with the new version? npx git-file-history@0.0.4 your/file

@twslade
Copy link

twslade commented Feb 14, 2019

Works for me, but not for showing renamed file in history.

Is there a possibility for adding something like the following for showing renamed files? I think that could be very useful with an older codebase. Maybe its an edge case.

git log --name-only --pretty="format:"  --follow <filename> | sort -u | xargs git log --reverse --

Credit for command

@kamicloud
Copy link
Author

kamicloud commented Feb 15, 2019

Could you try with the new version? npx git-file-history@0.0.4 your/file

It works, and I think --follow be controlled would by user better.

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

3 participants