diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 27a0d05144..5fb573a381 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -52,6 +52,11 @@ Supported SRC_URI options are: | |||
52 | For local git:// urls to use the current branch HEAD as the revision for use with | 52 | For local git:// urls to use the current branch HEAD as the revision for use with |
53 | AUTOREV. Implies nobranch. | 53 | AUTOREV. Implies nobranch. |
54 | 54 | ||
55 | - lfs | ||
56 | Enable the checkout to use LFS for large files. This will download all LFS files | ||
57 | in the download step, as the unpack step does not have network access. | ||
58 | The default is "1", set lfs=0 to skip. | ||
59 | |||
55 | """ | 60 | """ |
56 | 61 | ||
57 | # Copyright (C) 2005 Richard Purdie | 62 | # Copyright (C) 2005 Richard Purdie |
@@ -629,6 +634,8 @@ class Git(FetchMethod): | |||
629 | raise bb.fetch2.FetchError("Repository %s has LFS content, install git-lfs on host to download (or set lfs=0 to ignore it)" % (repourl)) | 634 | raise bb.fetch2.FetchError("Repository %s has LFS content, install git-lfs on host to download (or set lfs=0 to ignore it)" % (repourl)) |
630 | elif not need_lfs: | 635 | elif not need_lfs: |
631 | bb.note("Repository %s has LFS content but it is not being fetched" % (repourl)) | 636 | bb.note("Repository %s has LFS content but it is not being fetched" % (repourl)) |
637 | else: | ||
638 | runfetchcmd("%s lfs install" % ud.basecmd, d, workdir=destdir) | ||
632 | 639 | ||
633 | if not ud.nocheckout: | 640 | if not ud.nocheckout: |
634 | if subpath: | 641 | if subpath: |
@@ -688,8 +695,11 @@ class Git(FetchMethod): | |||
688 | Check if the repository has 'lfs' (large file) content | 695 | Check if the repository has 'lfs' (large file) content |
689 | """ | 696 | """ |
690 | 697 | ||
691 | # The bare clonedir doesn't use the remote names; it has the branch immediately. | 698 | if ud.nobranch: |
692 | if wd == ud.clonedir: | 699 | # If no branch is specified, use the current git commit |
700 | refname = self._build_revision(ud, d, ud.names[0]) | ||
701 | elif wd == ud.clonedir: | ||
702 | # The bare clonedir doesn't use the remote names; it has the branch immediately. | ||
693 | refname = ud.branches[ud.names[0]] | 703 | refname = ud.branches[ud.names[0]] |
694 | else: | 704 | else: |
695 | refname = "origin/%s" % ud.branches[ud.names[0]] | 705 | refname = "origin/%s" % ud.branches[ud.names[0]] |