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 support for symlinks #41

Merged
merged 1 commit into from
Sep 16, 2020

Conversation

AndreasBieber
Copy link
Contributor

This PR adds support for symlinks (e.g. having git submodules in the repo):

.
└── repo
    ├── another-repo # git submodule
    │   └── docs
    │       └── index.md
    ├── docs
    │   ├── index.md
    │   └── sub-topic -> /repo/another-repo/docs/
    └── mkdocs.yaml

@timvink
Copy link
Owner

timvink commented Sep 16, 2020

Thanks for your contribution! Nice work!

Elegant solution. I briefly thought there might be a performance hit by determining a repo for each file, but you solved that nicely by caching the directory of a file, so should be fine.

Just one question, is there any reason you choose to put this line in get_revision_date_for_file() instead of _get_repo() ?

@AndreasBieber
Copy link
Contributor Author

Yes, because the realpath is also needed when calling log. Otherwise git will complain that the path is outside of the repository.

@timvink timvink merged commit 71d3920 into timvink:master Sep 16, 2020
@timvink
Copy link
Owner

timvink commented Sep 16, 2020

Thanks @AndreasBieber 🎉

Will release a new version of this plugin tomorrow

@AndreasBieber AndreasBieber deleted the feat/support-symlinks branch September 16, 2020 14:36
@AndreasBieber
Copy link
Contributor Author

Thx for the fast response and merge!

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.

None yet

2 participants