git: remove git message prefixes

Several error messages output by the git package currently begin
with a "git:" prefix, which is unlike any other error messages
from that package, or anywhere else, for that matter.

We can therefore simplify our message strings slightly by simply
removing this prefix from them, and in one case, we reword the
error message to provide the full text of the failing Git command
(git for-each-ref), which is how other Git errors are reported.

Note that these messages are not yet passed as translation
strings, but we will address that issue in a subsequent commit.
This commit is contained in:
Chris Darroch 2022-01-29 11:29:34 -08:00
parent 460e5dce90
commit 880eb15b2a
2 changed files with 2 additions and 2 deletions

@ -29,5 +29,5 @@ func (s FilterProcessStatus) String() string {
return "error"
}
panic(fmt.Sprintf("git: unknown FilterProcessStatus '%d'", s))
panic(fmt.Sprintf("unknown FilterProcessStatus '%d'", s))
}

@ -1230,7 +1230,7 @@ func AllRefsIn(wd string) ([]*Ref, error) {
parts := strings.SplitN(scanner.Text(), "\x00", 2)
if len(parts) != 2 {
return nil, lfserrors.Errorf(
"git: invalid for-each-ref line: %q", scanner.Text())
"invalid git for-each-ref line: %q", scanner.Text())
}
sha := parts[0]