Skip to content

Conversation

schoentoon
Copy link
Contributor

I apparently didn't test this properly with #6, but basically it would fail completely upon a second run (or any run there after). With error messages like 2022/04/21 14:13:42 Failed to clone: worktree not available in a bare repository. This pull request will check whether a discovered repository is a bare repository or not. And if it is, it will skip the complete git pull step (on which it would otherwise fail) and only do a git fetch, which is plenty for a backup.

A second run with -backup.bare-clone would fail as it would still try to
retrieve a work tree and do a git pull. Now it will check whether a
discovered repository is bare or not. And if it is, it will just skip
the git pull and only do a git fetch down the line.
@ChappIO
Copy link
Owner

ChappIO commented Apr 22, 2022

Oops 😅 I will do a test tonight and merge/release if it all works nicely.

@ChappIO
Copy link
Owner

ChappIO commented Apr 22, 2022

Nvm, I had 15 minutes before I had to leave. Seems to work alright now!

@ChappIO ChappIO merged commit 290a124 into ChappIO:main Apr 22, 2022
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