-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass --renormalize
during git add
to fix LFS usage in destination repo
#301
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to be orthogonal to adding LFS, is there a strong reason to add the renormalize option in the same PR?
TY! Left a comment - the CLA will prevent any imports until signed, sorry about that. |
- "false" by default - value passed to call to GitOrigin.newGitOrigin, just like for github_origin - allows for LFS usage with any Git backend that supports LFS, e.g. GitLab Co-authored-by: Ashraful Islam <[email protected]>
- `renormalize` field is "false" by default - sets `renormalize` field to true - if `renormalize` is set to true, "--renormalize" argument is appended to the `git add` command. Co-authored-by: Ashraful Islam <[email protected]>
- enables use of Git LFS in git destinations Co-authored-by: Ashraful Islam <[email protected]>
f04fad5
to
b28f11b
Compare
@hsudhof I guess it doesn't have to be a single MR. We were getting Copybara to work on this scenario: It required both of these changes to actually go through, but if you think they are orthogonal, I can make two separate MRs. |
@hsudhof I'll wait for your feedback before moving forward with separating this into two PRs. |
This reverts commit a787216.
@hsudhof we removed the enabling of the lfs parameter from the current PR, we'll make a separate one for enabling LFS in non-GitHub origins after we're done with this one. |
--renormalize
during git add
to fix LFS usage in destination repo
…neral option is used Co-authored-by: Ashraful Islam <[email protected]> - fix on very first (--force) revision
alternate.add().force().all().run(); | ||
}else{ | ||
alternate.add().force().renormalize().all().run(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discovered that, on initial sync of a branch w/ --force
flag usage in global options, adding --renormalize
results in a situation where no new files are added to that initial destination commit. Hence the conditional. Perhaps this isn't the best design; if so, we request reviewer's input on what can be a better design.
- Allow the user to setenable_lfs = true
as a parameter of regulargit.origin
(as opposed to onlygit.github_origin
), thereby extending support to GitLab LFS origins (set toenable_lfs = false
by default, so change is backwards-compatible to all existing workflows and compatible with non-lfs-enabled Git repositories).--renormalize
duringgit add
, which fixes LFS on the target repo (enabling coupling e.g. GitLab origins w/ LFS to GitHub destinations with LFS and similar user stories)Fixes #277 andaddresses #60 (comment)