@@ -845,18 +845,8 @@ class Git(FetchMethod):
"""
Check if the repository has 'lfs' (large file) content
"""
-
- if ud.nobranch:
- # If no branch is specified, use the current git commit
- refname = ud.revision
- elif wd == ud.clonedir:
- # The bare clonedir doesn't use the remote names; it has the branch immediately.
- refname = ud.branch
- else:
- refname = "origin/%s" % ud.branch
-
cmd = "%s grep lfs %s:.gitattributes | wc -l" % (
- ud.basecmd, refname)
+ ud.basecmd, ud.revision)
try:
output = runfetchcmd(cmd, d, quiet=True, workdir=wd)
Its unclear why this function does not operate on the desired source revision to begin with (which really should be the decider on whether a particular source revision uses LFS or not). Simplify the decision logic by always checking the `.gitattributes` file of the target revision. Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de> --- lib/bb/fetch2/git.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)