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

adds possibility for extra cli params #197

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hedefalk
Copy link

fixes #196

This made it possible to use git-blame to track down changes over renames with -C -Cthat just showed the move commit otherwise.

@alexcorre
Copy link
Owner

thanks for the PR. I like the feature, though allowing people to add their own command line args could lead to errors due to invalid args. I dont currently have the best error handling + display so this could be an opportunity to clean that up. Would like to catch this properly and display to the user with a tip to check their command line options if its set.

Also this is not consistent with the current config ignoreWhiteSpaceDiffs which optionally adds the -w option for you.

Before merging this I'd like to make all command line args in a consistent way as well as add proper error handling.

Does that make sense?

@hedefalk
Copy link
Author

hedefalk commented Jul 7, 2017

@alexcorre Yes, makes sense. I just needed this like right now so just added it as quickly as I could. I totally understand if it needs more work before it can be supported in a reliable way. I'm not going to have time to do that in any reasonable time however so please see this more as a feature request PR then :)

@Aminelahlou
Copy link

@hedefalk Are you thinking about git blame --reverse for example cause I would love to use ctrl+shift+b to toggle git blame in a reverse mode : it is very convenient when you need to know who is the guy who knows the logic behind a line of code.

The last one who modified can just be someone who refactored the code whereas the first one who wrote it usually know what he did and why.

just my two cents

@hedefalk
Copy link
Author

hedefalk commented Oct 6, 2017

@Aminelahlou Had to look that up, haven't used it, but seems like a very valid use case too:

 --reverse <rev>..<rev>
           Walk history forward instead of backward. Instead of showing the revision in which a line appeared, this shows the last revision in which a line has existed. This requires a
           range of revision like START..END where the path to blame exists in START.  git blame --reverse START is taken as git blame --reverse START..HEAD for convenience.

But no, the thing I needed was -C for moves:

-C[<num>]
           In addition to -M, detect lines moved or copied from other files that were modified in the same commit. This is useful when you reorganize your program and move code around
           across files. When this option is given twice, the command additionally looks for copies from other files in the commit that creates the file. When this option is given three
           times, the command additionally looks for copies from other files in any commit.

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

Successfully merging this pull request may close these issues.

Doesn't support renames/copys with -C -C -C…?
3 participants