git-lfs: add support for board documentation files#9818
git-lfs: add support for board documentation files#9818jia200x wants to merge 2 commits intoRIOT-OS:masterfrom
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. |
jcarrano
left a comment
There was a problem hiding this comment.
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.
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. |
chrysn
left a comment
There was a problem hiding this comment.
I still like this approach and would love to see it resumed.
| # 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.
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
originor 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 LFSmessage).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/lfsmake docwill fail wih aPlease install git-lfsmessage. The newmake doctarget not only checks if git-lfs is installed but also executesgit lfs install --localas a dependency.Possible improvements
Testing procedure
Try running
make docwith 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.