* [Buildroot] [PATCH] download/git: fix LFS support
@ 2022-01-06 15:19 John Keeping
2022-01-07 18:07 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: John Keeping @ 2022-01-06 15:19 UTC (permalink / raw)
To: buildroot; +Cc: John Keeping, Yann E . MORIN, Vincent Fazio
The original patch for commit cff428fe31 ("download/git: support Git
LFS") included a call to "git lfs install" but this was a problem as it
could modify ~/.gitconfig outside the dl/ tree. When this was
updated it was thought that the modification to gitconfig was
unnecessary because the LFS fetch and checkout steps are performed
manually.
Unfortunately, this is not correct and the LFS checkout fails with:
Cannot checkout LFS objects, Git LFS is not installed.
Add the call to "git lfs install", with the --local option so that only
the repository's .git/config is modified and not the user's global
~/.gitconfig.
This is also required for submodules as the parent repository's config
is not inherited.
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Vincent Fazio <vfazio@xes-inc.com>
Signed-off-by: John Keeping <john@metanate.com>
---
support/download/git | 2 ++
1 file changed, 2 insertions(+)
diff --git a/support/download/git b/support/download/git
index 41c3160099..1a1c315f73 100755
--- a/support/download/git
+++ b/support/download/git
@@ -209,10 +209,12 @@ fi
# If there are large files then fetch them.
if [ ${large_file} -eq 1 ]; then
+ _git lfs install --local
_git lfs fetch
_git lfs checkout
# If there are also submodules, recurse into them,
if [ ${recurse} -eq 1 ]; then
+ _git submodule foreach --recursive ${GIT} lfs install --local
_git submodule foreach --recursive ${GIT} lfs fetch
_git submodule foreach --recursive ${GIT} lfs checkout
fi
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH] download/git: fix LFS support
2022-01-06 15:19 [Buildroot] [PATCH] download/git: fix LFS support John Keeping
@ 2022-01-07 18:07 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2022-01-07 18:07 UTC (permalink / raw)
To: John Keeping; +Cc: Vincent Fazio, Yann E . MORIN, buildroot
On Thu, 6 Jan 2022 15:19:42 +0000
John Keeping <john@metanate.com> wrote:
> The original patch for commit cff428fe31 ("download/git: support Git
> LFS") included a call to "git lfs install" but this was a problem as it
> could modify ~/.gitconfig outside the dl/ tree. When this was
> updated it was thought that the modification to gitconfig was
> unnecessary because the LFS fetch and checkout steps are performed
> manually.
>
> Unfortunately, this is not correct and the LFS checkout fails with:
>
> Cannot checkout LFS objects, Git LFS is not installed.
>
> Add the call to "git lfs install", with the --local option so that only
> the repository's .git/config is modified and not the user's global
> ~/.gitconfig.
>
> This is also required for submodules as the parent repository's config
> is not inherited.
>
> Cc: Arnout Vandecappelle <arnout@mind.be>
> Cc: Vincent Fazio <vfazio@xes-inc.com>
> Signed-off-by: John Keeping <john@metanate.com>
> ---
> support/download/git | 2 ++
> 1 file changed, 2 insertions(+)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-07 18:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-06 15:19 [Buildroot] [PATCH] download/git: fix LFS support John Keeping
2022-01-07 18:07 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox