All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gitsm: pass lfs parameter from main repo to all its submodules
@ 2022-10-17 13:20 Martin Jansa
  2022-10-25 14:21 ` [bitbake-devel] " Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Jansa @ 2022-10-17 13:20 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Martin Jansa

* it might not be ideal in some cases where we might require LFS objects
  only in some of the submodules, but still better than no way to set
  lfs for submodules which causes git smudge issues in e.g. vulkan-samples
  when LFS is enabled in gitconfig

[YOCTO #14938]

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 lib/bb/fetch2/gitsm.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/bb/fetch2/gitsm.py b/lib/bb/fetch2/gitsm.py
index 25d5db0e..36f0464c 100644
--- a/lib/bb/fetch2/gitsm.py
+++ b/lib/bb/fetch2/gitsm.py
@@ -122,6 +122,7 @@ class GitSM(Git):
             url += ';protocol=%s' % proto
             url += ";name=%s" % module
             url += ";subpath=%s" % module
+            url += ";lfs=%s" % ud.parm.get("lfs", "1")
 
             ld = d.createCopy()
             # Not necessary to set SRC_URI, since we're passing the URI to
-- 
2.38.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [bitbake-devel] [PATCH] gitsm: pass lfs parameter from main repo to all its submodules
  2022-10-17 13:20 [PATCH] gitsm: pass lfs parameter from main repo to all its submodules Martin Jansa
@ 2022-10-25 14:21 ` Richard Purdie
  2022-10-26  8:13   ` Martin Jansa
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2022-10-25 14:21 UTC (permalink / raw)
  To: Martin Jansa, bitbake-devel

On Mon, 2022-10-17 at 15:20 +0200, Martin Jansa wrote:
> * it might not be ideal in some cases where we might require LFS objects
>   only in some of the submodules, but still better than no way to set
>   lfs for submodules which causes git smudge issues in e.g. vulkan-samples
>   when LFS is enabled in gitconfig
> 
> [YOCTO #14938]
> 
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  lib/bb/fetch2/gitsm.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/bb/fetch2/gitsm.py b/lib/bb/fetch2/gitsm.py
> index 25d5db0e..36f0464c 100644
> --- a/lib/bb/fetch2/gitsm.py
> +++ b/lib/bb/fetch2/gitsm.py
> @@ -122,6 +122,7 @@ class GitSM(Git):
>              url += ';protocol=%s' % proto
>              url += ";name=%s" % module
>              url += ";subpath=%s" % module
> +            url += ";lfs=%s" % ud.parm.get("lfs", "1")
>  
>              ld = d.createCopy()
>              # Not necessary to set SRC_URI, since we're passing the URI to


Shouldn't that be:

ud.parm.get("lfs", "0")

i.e. default to off but pass if present?

Cheers,

Richard


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [bitbake-devel] [PATCH] gitsm: pass lfs parameter from main repo to all its submodules
  2022-10-25 14:21 ` [bitbake-devel] " Richard Purdie
@ 2022-10-26  8:13   ` Martin Jansa
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Jansa @ 2022-10-26  8:13 UTC (permalink / raw)
  To: Richard Purdie; +Cc: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 1644 bytes --]

Hi,

yes, that might be better default, but this change alone doesn't resolve
all issues with git-lfs still :(

as documented by added test:

https://patchwork.yoctoproject.org/project/bitbake/patch/20221018193746.3599845-1-Martin.Jansa@gmail.com/

I don't know what is expected behavior which would be reproducible (not
affected by user's .gitconfig and git-lfs installed or not-installed).

Regards,

On Tue, Oct 25, 2022 at 4:21 PM Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:

> On Mon, 2022-10-17 at 15:20 +0200, Martin Jansa wrote:
> > * it might not be ideal in some cases where we might require LFS objects
> >   only in some of the submodules, but still better than no way to set
> >   lfs for submodules which causes git smudge issues in e.g.
> vulkan-samples
> >   when LFS is enabled in gitconfig
> >
> > [YOCTO #14938]
> >
> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > ---
> >  lib/bb/fetch2/gitsm.py | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/lib/bb/fetch2/gitsm.py b/lib/bb/fetch2/gitsm.py
> > index 25d5db0e..36f0464c 100644
> > --- a/lib/bb/fetch2/gitsm.py
> > +++ b/lib/bb/fetch2/gitsm.py
> > @@ -122,6 +122,7 @@ class GitSM(Git):
> >              url += ';protocol=%s' % proto
> >              url += ";name=%s" % module
> >              url += ";subpath=%s" % module
> > +            url += ";lfs=%s" % ud.parm.get("lfs", "1")
> >
> >              ld = d.createCopy()
> >              # Not necessary to set SRC_URI, since we're passing the URI
> to
>
>
> Shouldn't that be:
>
> ud.parm.get("lfs", "0")
>
> i.e. default to off but pass if present?
>
> Cheers,
>
> Richard
>

[-- Attachment #2: Type: text/html, Size: 2544 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-26  8:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-17 13:20 [PATCH] gitsm: pass lfs parameter from main repo to all its submodules Martin Jansa
2022-10-25 14:21 ` [bitbake-devel] " Richard Purdie
2022-10-26  8:13   ` Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.