-
Notifications
You must be signed in to change notification settings - Fork 2.1k
git-lfs: add support for board documentation files #9818
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
Conversation
Murdock should fail if it tries to run |
I set the 'Waiting' label. I don't know how applicable it is, but at least it lets people know it depends on something else. |
That's right, thanks! |
Non-binary files as well? Can we filter on extension? |
Oh, it passed... does Murdock run |
Yes, wildcards and basic regex patterns are accepted |
In my machine:
But the check script runs "fine":
The reason is that |
I see. I will patch that |
@jia200x I already patched it! |
This PR has the "waiting for other PR" label set. What is it waiting for? |
@PeterKietzmann it was waiting for #9819. If LFS was not available, the build would fail silently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It needs a couple of small makefile fixes, and then it's in.
RED=\033[0;31m | ||
NC=\033[0m | ||
|
||
git-lfs: git-lfs-check git-lfs-install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make these things phony.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, install should depend on check. With the current definitions there is no guarantee that install won't try to run before check.
ping @jia200x |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still like this approach and would love to see it resumed.
@@ -5,3 +5,4 @@ | |||
# when the heading is exactly 7 characters long. | |||
*.md conflict-marker-size=100 | |||
*.txt conflict-marker-size=100 | |||
boards/*/doc/* filter=lfs diff=lfs merge=lfs -text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe that should say *.jpg *.png
immaterial of the precise location?
Contribution description
This PR adds support for using git-lfs for board documentation images (and related files). It's IMO a good trade-off between having files closer to the code and not bloating the repository.
This PR tracks all files undes board/<board_name>/doc folder as git-lfs files.
git-lfs in a nutshell
Assuming the git-lfs extension is installed (
apt-get install git-lfs
), simply install git-lfs in the RIOT repo:Then, work with the github repo as you normally do. When pushing to
origin
or another remote, git-lfs will push a symlink-like file in the repo and upload the real file to another repo. This way the original repo doesn't bloat and only contains symlinks pointing to the actual file.Github handles LFS files natively, as seen here (there is a
Stored with Git LFS
message).So if git-lfs is installed, is exactly the same as using standard git. Both from the local computer and from the github.com file viewer.
FAQ
RIOT.git/info/lfs
make doc
will fail wih aPlease install git-lfs
message. The newmake doc
target not only checks if git-lfs is installed but also executesgit lfs install --local
as a dependency.Possible improvements
Testing procedure
Try running
make doc
with and without git-lfs.Note this doesn't add <board_name>/doc to the RIOT doxygen file, it will be done in a further PR.
Issues/PRs references
None so far.