Re: [PATCH 4/6] fetch: report errors when backfilling tags fails
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Feb 15, 2022, 07:52 UTC
- Message-ID
- <CAP8UFD0MQCpFfWg2FP3S1VpDAxCwp3WGucFPn7K9BZ7UnckNLw@mail.gmail.com>
- In-Reply-To
- <54fdee845bea7f67f46817417f8e5a504bd39665.1644565025.git.ps@pks.im>
On Fri, Feb 11, 2022 at 9:03 PM Patrick Steinhardt <ps@pks.im> wrote:
> > When the backfilling of tags fails we do not report this error to the > caller, but only report it implicitly at a later point when reporting > updated references.
Probably stupid question: are we sure that it's a bug and not a feature?
Show 6 quoted lines
> This leaves callers unable to act upon the > information of whether the backfilling succeeded or not. > > Refactor the function to return an error code and pass it up the > callstack. This causes us to correctly propagate the error back to the > user of git-fetch(1).
Even if it would have been the right behavior when backfilling tags was implemented to return an error when backfilling tags fails, I think it's interesting to ask ourselves if this change could be seen as a regression by some users.