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 filters are not applied on working file for plain text diff #529

Open
fcollonval opened this issue Jan 28, 2020 · 0 comments
Open

Git filters are not applied on working file for plain text diff #529

fcollonval opened this issue Jan 28, 2020 · 0 comments

Comments

@fcollonval
Copy link
Member

When requesting the content of a working file for the plain text diff, git filters that could apply to those files are ignored:

def get_content(self, filename, top_repo_path):
"""
Get the file content of filename.
"""
relative_repo = os.path.relpath(top_repo_path, self.root_dir)
model = self.contents_manager.get(path=os.path.join(relative_repo, filename))
return model['content']

We could take advantage of the following code in ndime:
https://github.com/jupyter/nbdime/blob/6259cd0936eecae3e0fbd4301ecc55f4a5e19bc2/nbdime/vcs/git/filter_integration.py

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

No branches or pull requests

1 participant