Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] LFS

Great! I think it will anyway take some more time to get everything right/reviewed J I’d really love to get things mostly ready until mid-December (for our personal use – does not need to be an official release until then) because I will have to prepare our move to LFS early next year.

 

Cheers,

Markus

 

From: Mark Waite [mailto:mark.earl.waite@xxxxxxxxx]
Sent: Wednesday, November 15, 2017 12:51 PM
To: Duft Markus <Markus.Duft@xxxxxxxxxxxxxxxx>
Cc: David Pursehouse <david.pursehouse@xxxxxxxxx>; EGit developer discussion (egit-dev@xxxxxxxxxxx) <egit-dev@xxxxxxxxxxx>; JGit Developers list (jgit-dev@xxxxxxxxxxx) <jgit-dev@xxxxxxxxxxx>
Subject: Re: [jgit-dev] LFS

 

I would like to test it with the Jenkins git client plugin (and the matching git plugin).  However, weekend and evening time has been at a premium recently and I won't have free time until the Thanksgiving break.

 

Mark Waite

 

On Tue, Nov 14, 2017 at 11:26 PM Duft Markus <Markus.Duft@xxxxxxxxxxxxxxxx> wrote:

Hey,

 

I will definitely continue testing this in house for the next days/weeks. If/whenever you have time to test, it would be appreciated J I’m pretty sure the way we work (Gerrit) does not cover all use cases…

 

Cheers,

Markus

 

From: David Pursehouse [mailto:david.pursehouse@xxxxxxxxx]
Sent: Wednesday, November 15, 2017 2:41 AM
To: Duft Markus <Markus.Duft@xxxxxxxxxxxxxxxx>
Cc: JGit Developers list (jgit-dev@xxxxxxxxxxx) <jgit-dev@xxxxxxxxxxx>; EGit developer discussion (egit-dev@xxxxxxxxxxx) <egit-dev@xxxxxxxxxxx>
Subject: Re: [jgit-dev] LFS

 

On Tue, Nov 14, 2017 at 7:26 PM Duft Markus <Markus.Duft@xxxxxxxxxxxxxxxx> wrote:

Hey All ... again :)

If anybody is interested in the LFS support, I'd be glad to have somebody (apart from me) test it.

 

Thanks for working on this.  It looks interesting, but I've been really busy with other work at $DAYJOB and haven't had time to try it out yet.

 

 

Fetch [1] and [2] for EGit and JGit each, this should give:

1) Download (clone/fetch) support for LFS objects (including SSH based auto-discovery)
2) Upload (push) support for LFS objects (including SSH based auto-discovery)
3) Merge/Rebase/Cherry-Pick support for LFS objects
4) Diff (history view, format patch, etc.) support for LFS objects
5) Blame annotation support for LFS objects
6) EGit LFS configuration check and installation (configurable)

I'm pretty sure that I missed quite a lot of use cases ;) If anybody could help find them, that'd be great. Apart from that, the commits should be in pretty good shape now, from my POV - please review them.

[1] https://git.eclipse.org/r/76591
[2] https://git.eclipse.org/r/111376

Cheers,
Markus

-----Original Message-----
From: jgit-dev-bounces@xxxxxxxxxxx [mailto:jgit-dev-bounces@xxxxxxxxxxx] On Behalf Of Duft Markus
Sent: Friday, November 10, 2017 1:16 PM
To: JGit Developers list (jgit-dev@xxxxxxxxxxx) <jgit-dev@xxxxxxxxxxx>
Cc: EGit developer discussion (egit-dev@xxxxxxxxxxx) <egit-dev@xxxxxxxxxxx>
Subject: Re: [jgit-dev] LFS

Hey,

It is a little hard to judge whether I'm moving into the right direction without any answers to my mails ;(

Those who feel able to judge, please consider having a quick look at these commits - does not need to be reviewed in all detail right now, just tell me if I'm completely wrong:

JGIT:

1) https://git.eclipse.org/r/83506 - LFS download support
2) https://git.eclipse.org/r/111364 - LFS upload support
3) https://git.eclipse.org/r/111376 - my first (maybe completely stupid) ideas on how to integrate into merging/rebase/cherry-pick

EGit:

1) https://git.eclipse.org/r/76591 - register and enable LFS

Thanks in advance for your time.

Markus

-----Original Message-----
From: jgit-dev-bounces@xxxxxxxxxxx [mailto:jgit-dev-bounces@xxxxxxxxxxx] On Behalf Of Duft Markus
Sent: Thursday, November 2, 2017 9:14 AM
To: JGit Developers list (jgit-dev@xxxxxxxxxxx) <jgit-dev@xxxxxxxxxxx>
Subject: Re: [jgit-dev] LFS

Hey,

Still having the below two open questions. Nevertheless in the meantime I tried to finish up the changes that were on Gerrit for a while now:

1) JGit: https://git.eclipse.org/r/#/c/83506/

 * Download LFS resources from a configured LFS server (99% Christians work, thanks :))
 * Automatically discover LFS server URL when cloning from a capable SSH server (i.e. Gerrit with LFS plugin) and transparently handle authentication against this server for both API and object download.
 * Install LFS support for the current user - this is still just a simple Callable which is used by the EGit change (see below) only right now. It probably should also be integrated into PGM - one of my below open questions is on how this could be achieved.

2) EGit: https://git.eclipse.org/r/#/c/76591/

 * Register LFS smudge and clean filters if available (they are optional) (100% Christians work, thanks :)).
 * Detect if LFS has been configured for the current user (.gitconfig)
 * Ask the user whether LFS support should be installed (adding the 'lfs' filter to the user config). It adds this in a way that is compatible with CGIT GIT-LFS support. The important bit is that it installs the useJGitBuiltin flag. If this is not set, JGit will use native git-lfs

Could you Gurus please provide some feedback on the changes? I'm 90% sure that some things are not where they ought to be code-wise. If somebody could tell me which things to move where, I'd happily do the changes...

Cheers,
Markus

-----Original Message-----
From: jgit-dev-bounces@xxxxxxxxxxx [mailto:jgit-dev-bounces@xxxxxxxxxxx] On Behalf Of Duft Markus
Sent: Tuesday, October 31, 2017 2:33 PM
To: JGit Developers list (jgit-dev@xxxxxxxxxxx) <jgit-dev@xxxxxxxxxxx>
Subject: Re: [jgit-dev] LFS

Hi All again,

Still working on LFS support, and I have two big open questions somebody might be able to help me with :)

1) I implemented a "git lfs install" equivalent command in org.eclipse.jgit.lfs (which is optional, right?) - what would be the preferred way to integrate that into PGM? I guess it is not allowed to have a dependency to an optional part of JGit here, right?
2) Uploading of LFS objects; this is happening using a pre-push hook in native lfs. JGit also supports pre-push hooks, so once native LFS installed it's hook, it will be executed. Now I want to detect that a certain pre-push hook is a native LFS hook and INSTEAD execute some JGit builtin - how to achieve this the best way? With clean/smudge it was "easier", as they are explicitly specified in the configuration, whereas the pre-push can be "anything"...

Thanks in advance for your input and ideas.

Cheers,
Markus

-----Original Message-----
From: jgit-dev-bounces@xxxxxxxxxxx [mailto:jgit-dev-bounces@xxxxxxxxxxx] On Behalf Of Duft Markus
Sent: Tuesday, October 17, 2017 9:41 AM
To: Shawn Pearce <spearce@xxxxxxxxxxx>
Cc: JGit Developers list (jgit-dev@xxxxxxxxxxx) <jgit-dev@xxxxxxxxxxx>
Subject: Re: [jgit-dev] LFS

Hi All :)

I'm tinkering with LFS support. Quite a lot is working so far (I honestly did not do very much to get this running). The major thing that’s missing from my POV is pre-push hook support for a builtin LFS pre-push. Now my question is: what would be the best approach to implement this, without introducing too many hacks.

I'd of course like to detect the native git-lfs pre-push and don't execute it, but rather execute the built-in hook. On the other hand I would rather not implement some string magic that is bound to fail once git-lfs commands would change or something like that... (?).

IMHO the most simple (stupid) approach would be to override the doRun method in PrePushHook and do something more intelligent if a lfs pre-push hook is detected, but as I said, I fear that this solution is too stupid :)

Any advice?

On another note, because most of you have at least some knowledge of Gerrit (looking at you Shawn ;)): is there any way to improve diff support for LFS tracked files? Somehow Gerrit fails with internal error as long as a change is not merged. Once it is merged, the LFS markers are diffed, instead of the file contents. I'm using the LFS plugins and the FS backend in my case, if that is important. Gerrit is some 2.14 snapshot.

Cheers,
Markus

-----Original Message-----
From: Shawn Pearce [mailto:spearce@xxxxxxxxxxx]
Sent: Thursday, September 28, 2017 5:35 PM
To: Duft Markus <Markus.Duft@xxxxxxxxxxxxxxxx>
Cc: JGit Developers list (jgit-dev@xxxxxxxxxxx) <jgit-dev@xxxxxxxxxxx>
Subject: Re: [jgit-dev] LFS

On Thu, Sep 28, 2017 at 2:06 AM, Duft Markus
<Markus.Duft@xxxxxxxxxxxxxxxx> wrote:
>
> I know that SAP lost interest in LFS – but I did not ;) I picked up this
> commit: https://git.eclipse.org/r/#/c/83506/9 and rebased to somewhere on
> 4.8.1 which we are using. I then registered the filters in EGit Activator
> something like done in https://git.eclipse.org/r/#/c/76591/3
>
>
>
> I also managed to setup a test repo with this .gitattributes:
>
>
>
> $ cat .gitattributes
>
> *.lfs.txt filter=lfs diff=lfs merge=lfs -text
>
>
>
> And this .git/config:
>
>
>
> $ cat .git/config
>
> [core]
>
>                 repositoryformatversion = 0
>
>                 filemode = true
>
>                 logallrefupdates = true
>
> [filter "lfs"]
>
>                 clean = jgit://builtin/lfs/clean
>
>                 smudge = jgit://builtin/lfs/smudge
>
>                 required = true
>
>
>
> I successfully test local commits, and verified that the LFS pointers are
> the actual git objects as expected.
>
>
>
> There are couple of questions for me now:
>
>
>
> ·         Apart from the mentioned two commits, is there anything “big”
> open? Or is it just finalization of what’s there? For instance I cannot see
> any “upload” code? Where would that go?
>
> ·         It seems the repository is now no longer usable with CGIT (“error:
> external filter jgit://builtin/lfs/clean failed”). Is there a way to make a
> repository usable with CGIT and JGIT?

The filter name strings you configure in .git/config must be identical
between the two systems. That means you should configure the filter
name string for git-core and then JGit needs to recognize that name
specially, and swap in its logic instead of launching that command.

SSI Schäfer IT Solutions GmbH | Friesachstrasse 15 | 8114 Friesach | Austria
Registered Office: Friesach | Commercial Register: 49324 K | VAT no. ATU28654300
Commercial Court: Landesgericht für Zivilrechtssachen Graz
_______________________________________________
jgit-dev mailing list
jgit-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jgit-dev

SSI Schäfer IT Solutions GmbH | Friesachstrasse 15 | 8114 Friesach | Austria
Registered Office: Friesach | Commercial Register: 49324 K | VAT no. ATU28654300
Commercial Court: Landesgericht für Zivilrechtssachen Graz
_______________________________________________
jgit-dev mailing list
jgit-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jgit-dev

SSI Schäfer IT Solutions GmbH | Friesachstrasse 15 | 8114 Friesach | Austria
Registered Office: Friesach | Commercial Register: 49324 K | VAT no. ATU28654300
Commercial Court: Landesgericht für Zivilrechtssachen Graz
_______________________________________________
jgit-dev mailing list
jgit-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jgit-dev

SSI Schäfer IT Solutions GmbH | Friesachstrasse 15 | 8114 Friesach | Austria
Registered Office: Friesach | Commercial Register: 49324 K | VAT no. ATU28654300
Commercial Court: Landesgericht für Zivilrechtssachen Graz
_______________________________________________
jgit-dev mailing list
jgit-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jgit-dev

SSI Schäfer IT Solutions GmbH | Friesachstrasse 15 | 8114 Friesach | Austria
Registered Office: Friesach | Commercial Register: 49324 K | VAT no. ATU28654300
Commercial Court: Landesgericht für Zivilrechtssachen Graz
_______________________________________________
jgit-dev mailing list
jgit-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jgit-dev


SSI Schäfer IT Solutions GmbH | Friesachstrasse 15 | 8114 Friesach | Austria
Registered Office: Friesach | Commercial Register: 49324 K | VAT no. ATU28654300
Commercial Court: Landesgericht für Zivilrechtssachen Graz

_______________________________________________
jgit-dev mailing list
jgit-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jgit-dev


SSI Schäfer IT Solutions GmbH | Friesachstrasse 15 | 8114 Friesach | Austria
Registered Office: Friesach | Commercial Register: 49324 K | VAT no. ATU28654300
Commercial Court: Landesgericht für Zivilrechtssachen Graz

Back to the top