Details
Description
The "lfs mirror extend" command with the "-N" option today takes a count of the number of mirrors to add to a file, but there is no way to specify the total number of mirrors to create on a file. This can be problematic if there are multiple threads running e.g. "lfs mirror extend -N 1" on the same file, or if the command has an error and is retried, as it may incorrectly result in 3 or more mirrors being created on the file.
It would be desirable to have an option that specifies to create the total number of mirrors on the file, and this is a no-op if that number of mirrors already exists. It is open for discussion whether this should also reduce the number of mirrors on a file if there are more, and if so how it would select which mirror to remove.