Skip to content

git for-each-repo stops on non-existent repo (Windows?) #623

@derrickstolee

Description

@derrickstolee

Setup

  • Which version of microsoft/git are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.43.0.vfs.0.0
cpu: x86_64
built from commit: b7a6ed788a205fb2c0013111d277b4c9d6ab35bd
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon

Are you using Scalar or VFS for Git?

Scalar

  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.23612.1000]
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

I removed a repository that was previously registered with background maintenance.

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Git Bash or CMD.

git config --global --add my.config BOGUS-PATH
git config --global --add my.config C:/Real/Path
$ git for-each-repo --config=my.config status
fatal: cannot change to 'BOGUS-PATH': No such file or directory
  • What did you expect to occur after running these commands?

The iteration of git for-each-repo to continue on all repos, ignoring the non-existent repo.

  • What actually happened instead?

The first non-existent repo stopped the loop.

Additional Context / Impact

This affects background maintenance for users who have deleted a repo. It shuts down all background maintenance for repos later in the maintenance.repo multi-config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions