Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion java/com/google/copybara/git/GitDestination.java
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,11 @@ public ImmutableList<DestinationEffect> write(TransformResult transformResult,

console.progress("Git Destination: Adding all files");
try (ProfilerTask ignored = generalOptions.profiler().start("add_files")) {
alternate.add().force().renormalize().all().run();
if(generalOptions.isForced()){
alternate.add().force().all().run();
}else{
alternate.add().force().renormalize().all().run();
}
Copy link
Author

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.

}

console.progress("Git Destination: Excluding files");
Expand Down