.gitignore problem #6

Closed
danillos opened this Issue Dec 12, 2012 · 3 comments

Comments

Projects
None yet
3 participants
@danillos

All files ignored by git is marked with +

@jisaacks

This comment has been minimized.

Show comment
Hide comment
@jisaacks

jisaacks Dec 13, 2012

Owner

This is a problem, I am not currently sure the best way to handle this though, but it is something I am thinking about.

The problem is, the file is not in your repo, so as far as the diff is concerned, all the lines are new.

A possible solution would be to parse the .gitignore to see if the current file matches any of the regex's, but this could be expensive especially for long .gitignore files.

Owner

jisaacks commented Dec 13, 2012

This is a problem, I am not currently sure the best way to handle this though, but it is something I am thinking about.

The problem is, the file is not in your repo, so as far as the diff is concerned, all the lines are new.

A possible solution would be to parse the .gitignore to see if the current file matches any of the regex's, but this could be expensive especially for long .gitignore files.

@genezys

This comment has been minimized.

Show comment
Hide comment
@genezys

genezys Dec 13, 2012

Contributor

How about doing a git status first to check the status of the file ?

Contributor

genezys commented Dec 13, 2012

How about doing a git status first to check the status of the file ?

@jisaacks

This comment has been minimized.

Show comment
Hide comment
@jisaacks

jisaacks Dec 13, 2012

Owner

@genezys That might work, I was also considering checking if lines-added == total-lines then don't process.

Owner

jisaacks commented Dec 13, 2012

@genezys That might work, I was also considering checking if lines-added == total-lines then don't process.

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