git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH] git-p4: add option to store files in Git LFS on import

From
Luke Diamand <luke@diamand.org>
Date
Aug 30, 2015, 08:49 UTC
Message-ID
<CAE5ih7-TfLqwye8YpmZz90AVjYGQ8m0sF6GLKnG9pjvV8cTSjw@mail.gmail.com>
In-Reply-To
<1440764691-62254-1-git-send-email-larsxschneider@gmail.com>
On 28 August 2015 at 13:24,  <larsxschneider@gmail.com> wrote:
> From: Lars Schneider <larsxschneider@gmail.com>
>
> I am migrating huge Perforce repositories including history to Git. Some of them contain large files that would blow up the resulting Git repositories. This patch adds an option to store these files in Git LFS [1] on git-p4 clone.

I'm a bit worried by this. LFS isn't the only way to handle large files in git - there's also git annex (which I've used in a similar situation) and obviously random homebrew solutions. We're going to end up with git-p4 sprouting ever increasing numbers of --use-XXX-if-size-exceeds options. On the other hand, having it integrated into git-p4 is quite nice as it saves a lot of messing around.

Would it be possible as a start to have (within git-p4) a generic spot-big-files-and-handle-them-differently patch, and a second patch to add specific LFS support? That then means that other schemes would be a lot easier to add in future.

Some other comments inline.
Show 26 quoted lines
>
> In order to run the unit tests you need to install the Git LFS extension [2].
>
> Known limitations:
> The option "use-lfs-if-size-exceeds" looks at the uncompressed file size. Sometimes huge XML files are tiny if compressed. I wonder if there is an easy way to learn about the size of a file in a git pack file. I assume compressing it is the only way to know.
>
> Feedback is highly appreciated.
>
> Thank you,
> Lars
>
>
> [1] https://git-lfs.github.com/
> [2] https://github.com/github/git-lfs/releases/
>
> Lars Schneider (1):
>   git-p4: add option to store files in Git LFS on import
>
>  Documentation/git-p4.txt |  12 ++
>  git-p4.py                |  94 ++++++++++++++--
>  t/t9822-git-p4-lfs.sh    | 277 +++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 374 insertions(+), 9 deletions(-)
>  create mode 100755 t/t9822-git-p4-lfs.sh
>
> --
> 1.9.5 (Apple Git-50.3)

Can you switch to a newer git - this one's quite old now so if there are regressions introduced later, you won't know about them!

>
Previous: Luke DiamandNext: Lars Schneider
Message 4 of 9 in “git-p4: add option to store files in Git LFS on import”
  1. git-p4: add option to store files in Git LFS on importlarsxschneider@gmail.com, Aug 28, 2015
  2. git-p4: add option to store files in Git LFS on importlarsxschneider@gmail.com, Aug 28, 2015
  3. Luke DiamandAug 30, 2015
  4. Luke DiamandAug 30, 2015
  5. Lars SchneiderAug 30, 2015
  6. Luke DiamandAug 30, 2015
  7. Lars SchneiderSep 3, 2015
  8. Luke DiamandSep 3, 2015
  9. John KeepingSep 3, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.