From 65e407df88661b3b3d8b0351b46be868bd8d0ee4 Mon Sep 17 00:00:00 2001 From: Ashraful Islam Date: Tue, 6 May 2025 17:44:11 -0500 Subject: [PATCH] feat: enable lfs for git origin Co-authored-by: Gregory Kramida --- java/com/google/copybara/git/GitModule.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/java/com/google/copybara/git/GitModule.java b/java/com/google/copybara/git/GitModule.java index 38af4405d..90842873c 100644 --- a/java/com/google/copybara/git/GitModule.java +++ b/java/com/google/copybara/git/GitModule.java @@ -307,6 +307,12 @@ public GitModule(Options options) { + " fall back to the 'ref' param.\n" + "This is intended to help migrating to the new standard of using 'main'" + " without breaking users relying on the legacy default."), + @Param( + name = "enable_lfs", + defaultValue = "False", + named = true, + positional = false, + doc = "If true, Large File Storage support is enabled for the origin."), @Param( name = "credentials", allowedTypes = { @@ -332,6 +338,7 @@ public GitOrigin origin( Object describeVersion, Object versionSelector, Boolean primaryBranchMigration, + Boolean enableLfs, @Nullable Object credentials, StarlarkThread thread) throws EvalException { @@ -370,7 +377,7 @@ public GitOrigin origin( ? githubPostSubmitApprovalsProvider( fixedUrl, SkylarkUtil.convertOptionalString(ref), credentialHandler) : approvalsProvider(url), - /* enableLfs= */ false, + enableLfs, credentialHandler ); }