Skip to content
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

For each repo stop on error #642

Merged
merged 3 commits into from
Apr 17, 2024

Conversation

dscho
Copy link
Member

@dscho dscho commented Apr 16, 2024

This is an early version of patches I am about to send upstream: gitgitgadget#1719.

This addresses #623.

dscho and others added 3 commits April 17, 2024 10:48
In microsoft#623, it was reported that
the regularly scheduled maintenance stops if one repo in the middle of
the list was found to be missing.

This is undesirable, and points out a gap in the design of `git
for-each-repo`: We need a mode where that command does not stop on an
error, but continues to try running the specified command with the other
repositories.

Imitating the `--keep-going` option of GNU make, this commit teaches
`for-each-repo` the same trick: to continue with the operation on all
the remaining repositories in case there was a problem with one
repository, still setting the exit code to indicate an error occurred.

Helped-by: Eric Sunshine <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
In microsoft#623, it was reported that
maintenance stops on a missing repository, omitting the remaining
repositories that were scheduled for maintenance.

This is undesirable, as it should be a best effort type of operation.

It should still fail due to the missing repository, of course, but not
leave the non-missing repositories in unmaintained shapes.

Let's use `for-each-repo`'s shiny new `--keep-going` option that we just
introduced for that very purpose.

This change will be picked up when running `git maintenance start`,
which is run implicitly by `scalar reconfigure`.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho force-pushed the for-each-repo-stop-on-error branch from 805c24b to 86c0809 Compare April 17, 2024 08:50
@derrickstolee
Copy link

Thanks for working on this, @dscho!

@dscho
Copy link
Member Author

dscho commented Apr 17, 2024

The reviews on the Git mailing list so far look favorable (just two nits, which I have addressed already). So I'm going to merge this PR. If any further iterations are required on the Git mailing list, I will open follow-up PRs.

@dscho dscho merged commit fb590ca into microsoft:vfs-2.44.0 Apr 17, 2024
45 checks passed
@dscho dscho deleted the for-each-repo-stop-on-error branch April 17, 2024 20:20
dscho added a commit that referenced this pull request Apr 23, 2024
This is an early version of patches I am about to send upstream:
gitgitgadget#1719.

This addresses #623.
dscho added a commit that referenced this pull request Apr 23, 2024
This is an early version of patches I am about to send upstream:
gitgitgadget#1719.

This addresses #623.
dscho added a commit that referenced this pull request Apr 24, 2024
This is an early version of patches I am about to send upstream:
gitgitgadget#1719.

This addresses #623.
dscho added a commit that referenced this pull request Apr 29, 2024
This is an early version of patches I am about to send upstream:
gitgitgadget#1719.

This addresses #623.
dscho added a commit that referenced this pull request May 14, 2024
This is an early version of patches I am about to send upstream:
gitgitgadget#1719.

This addresses #623.
dscho added a commit that referenced this pull request Jun 3, 2024
This is an early version of patches I am about to send upstream:
gitgitgadget#1719.

This addresses #623.
dscho added a commit that referenced this pull request Jul 17, 2024
This is an early version of patches I am about to send upstream:
gitgitgadget#1719.

This addresses #623.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants