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

Add a --git flag to force git interpretation #215

Merged
merged 1 commit into from
Aug 25, 2017

Conversation

SeanCurtis-TRI
Copy link
Contributor

@SeanCurtis-TRI SeanCurtis-TRI commented Aug 23, 2017

Detecting a git hash uses a regular expression to detect a hex sha for a fixed set of {master, HEAD}. This precludes using tags, branch names, relative paths (e.g., HEAD~N, etc.). Rather than
trying to make a hash detection scheme that is bullet proof, this introduces a flag, that the user sets, that forces cloc to interpret all values in a diff as git hashes allowing for all valid git hash mechanisms.

There's a distinct possibility that the documentation should be cleaned up. Should it only apply to diff? SHould it apply more broadly?


This change is Reviewable

Detecting a git hash uses a regular expression to detect a hex
sha or a fixed set of {master, HEAD}. This precludes using tags,
branch names, relative paths (e.g., HEAD~N, etc.). Rather than
trying to make a hash detection scheme that is bullet proof,
this introduces a flag, that the user sets, that forces cloc
to interpret *all* values in a diff as git hashes allowing for
all valid git hash mechanisms.
@AlDanial AlDanial merged commit b276f3a into AlDanial:master Aug 25, 2017
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

Successfully merging this pull request may close these issues.

2 participants