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: Support git filters when showing diffs #24883

Closed
tillahoffmann opened this issue Apr 17, 2017 · 6 comments
Closed

Git: Support git filters when showing diffs #24883

tillahoffmann opened this issue Apr 17, 2017 · 6 comments
Assignees
Labels
feature-request Request for new features or functionality git GIT issues insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@tillahoffmann
Copy link

git clean filters are a great way to customize the changes that are staged. VSCode does not seem to respect these filters at the moment such that the diff shown in VSCode does not match up with the diff obtained by running git diff <my_filename> from the command line.

Is it possible to support git clean filters or am I doing something wrong?

@joaomoreno
Copy link
Member

Not yet supported.

@joaomoreno joaomoreno added this to the Backlog milestone Apr 18, 2017
@joaomoreno joaomoreno added feature-request Request for new features or functionality git GIT issues labels Apr 18, 2017
@joaomoreno joaomoreno assigned alexdima and unassigned joaomoreno Apr 25, 2017
@joaomoreno joaomoreno added diff-editor Diff editor issues and removed git GIT issues labels Apr 25, 2017
@joaomoreno
Copy link
Member

Actually this appears to be a feature request on the diff algorithm.

@alexdima
Copy link
Member

@joaomoreno Isn't this super git specific and isn't the idea that the clean filter is a transformation applied to the working tree file right before it gets staged to the index?

i.e. on disk fileA ---> git clean filter ----> fileA*
I believe the desire here is that clicking on a diff in the git viewlet should compare fileA in the index with fileA* (after being run through the clean filter).

Please note that it appears the clean filter can be any executable that is able to take stdin and spit stdout. I understand it similar to a pre commit hook, but it is somehow a pre-stage hook. I'm not sure how a diff algorithm running in a web worker should take on knowledge about git clean filters and executables.

@alexdima alexdima assigned joaomoreno and unassigned alexdima Apr 27, 2017
@joaomoreno
Copy link
Member

I got the feature description totally wrong. Sorry @alexandrudima

@joaomoreno joaomoreno added git GIT issues and removed diff-editor Diff editor issues labels Apr 27, 2017
@mbalsera
Copy link

Facing this issue trying to keep jupyter notebooks under version control.
I have a git clean filter configured so that cell output is not staged. It works great under command line git diff, but VSCode ignores filter settings and shows notebooks always dirty after a recalc.

@joaomoreno joaomoreno removed their assignment Jun 19, 2017
@joaomoreno joaomoreno changed the title Feature request: Support git clean filter when showing diffs SCM: Support git clean filter when showing diffs Sep 18, 2018
@joaomoreno joaomoreno added the help wanted Issues identified as good community contribution opportunities label Sep 18, 2018
@joaomoreno joaomoreno changed the title SCM: Support git clean filter when showing diffs Git: Support git clean filter when showing diffs Sep 18, 2018
@joaomoreno joaomoreno self-assigned this Oct 9, 2019
@joaomoreno joaomoreno changed the title Git: Support git clean filter when showing diffs Git: Support git filters when showing diffs Oct 25, 2019
@richard-fairthorne
Copy link

richard-fairthorne commented Dec 27, 2019

This is very important to me.

I have encrypted configuration files. The encryption is managed through .gitattributes. When I make changes, I can not visually compare the old to the new to make sure I haven't upset the file format. I have to use command line git diff.

This was referenced Jun 10, 2020
@joaomoreno joaomoreno modified the milestones: Backlog, May 2020 Jun 11, 2020
@joaomoreno joaomoreno removed the help wanted Issues identified as good community contribution opportunities label Jun 11, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 26, 2020
@rzhao271 rzhao271 added the verification-needed Verification of issue is requested label Aug 2, 2021
@rebornix rebornix added the verified Verification succeeded label Aug 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality git GIT issues insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

8 participants
@joaomoreno @rebornix @tillahoffmann @richard-fairthorne @alexdima @rzhao271 @mbalsera and others