ScoopInstaller / Extras

📦 The Extras bucket for Scoop.
https://scoop.sh
The Unlicense
1.75k stars 1.32k forks source link

[Bug]: (Git) Repo broken - fatal errors #10214

Open AntonOks opened 1 year ago

AntonOks commented 1 year ago

Prerequisites

Package Name

ALL

Expected/Current Behaviour

scoop update should just work.... but it's now throwing GIT fatal errors

Steps to Reproduce

λ scoop update
Updating Scoop...
Updating 'extras' bucket...
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: bad object refs/heads/master
error: https://github.com/ScoopInstaller/Extras did not send all necessary objects

fatal: ambiguous argument 'HEAD..HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
...
...
...

Possible Solution

fix the GIT repo...

Scoop and Buckets Version

λ scoop --version
Current Scoop version:
v0.3.1 - Released at 2022-11-15

'extras' bucket:
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Scoop Config

λ scoop config

debug                 : True
alias                 : @{cache-show-all=scoop-cache-show-all; cache-rm-all=scoop-cache-rm-all; cleanup-all=scoop-cleanup-all; list-all=scoop-list-all; info-all=scoop-info-all; search-info=scoop-search-info;
                        bucket-origin=scoop-bucket-origin}
aria2-enabled         : True
last_update           : 10.01.2023 08:47:46
autostash_on_conflict : True
scoop_repo            : http://github.com/ScoopInstaller/Scoop
scoop_branch          : master

PowerShell Version

λ $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.3.1
PSEdition                      Core
GitCommitId                    7.3.1
OS                             Microsoft Windows 10.0.19044
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Additional Softwares

a lot

rasa commented 1 year ago

scoop bucket rm extras
scoop bucket add extras
AntonOks commented 1 year ago

Thanks @rasa

(I know) That kind of thing always works for a broken (and later fixed) GIT repo.

How about a new option, similar to autostash_on_conflict : True , which does i.e. for any GIT return code, which indicates a broken GIT repo, exactly those 2x things (bucket rm and re-add)?

StarsbySea commented 1 year ago

(I know) That kind of thing always works for a broken (and later fixed) GIT repo.

How about a new option, similar to autostash_on_conflict : True , which does i.e. for any GIT return code, which indicates a broken GIT repo, exactly those 2x things (bucket rm and re-add)?

@AntonOks This is actually a good idea, could you please create a new Feature Request at https://github.com/ScoopInstaller/Scoop/issues and explain your excellent idea, please? This issue can now be closed.

AntonOks commented 1 year ago

(I know) That kind of thing always works for a broken (and later fixed) GIT repo. How about a new option, similar to autostash_on_conflict : True , which does i.e. for any GIT return code, which indicates a broken GIT repo, exactly those 2x things (bucket rm and re-add)?

@AntonOks This is actually a good idea, could you please create a new Feature Request at https://github.com/ScoopInstaller/Scoop/issues and explain your excellent idea, please? This issue can now be closed.

Thanks for the feedback @StarsbySea ... Done with https://github.com/ScoopInstaller/Scoop/issues/5460