Re: [PATCH] fetch: report local storage errors in status table

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] fetch: report local storage errors in status table

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:51

Jeff King [off-list ref] writes:
Previously, if there was an error while storing a local
tracking ref, the low-level functions would report an error,
but fetch's status output wouldn't indicate any problem.
E.g., imagine you have an old "refs/remotes/origin/foo/bar" but
upstream has deleted "foo/bar" in favor of a new branch
"foo". You would get output like this:

  error: there are still refs under 'refs/remotes/origin/foo'
  From $url_of_repo
   * [new branch]      foo        -> origin/foo

With this patch, the output takes into account the status of
updating the local ref:

  error: there are still refs under 'refs/remotes/origin/foo'
  From $url_of_repo
   ! [new branch]      foo        -> origin/foo  (unable to update local ref)

Signed-off-by: Jeff King <redacted>
Makes sense --- thanks.  This is something we can have automated tests,
isn't it?

Re: [PATCH] fetch: report local storage errors in status table

From: Jeff King <hidden>
Date: 2016-06-15 22:44:51

On Fri, Jun 27, 2008 at 04:37:33PM -0700, Junio C Hamano wrote:
quoted
With this patch, the output takes into account the status of
updating the local ref:

  error: there are still refs under 'refs/remotes/origin/foo'
  From $url_of_repo
   ! [new branch]      foo        -> origin/foo  (unable to update local ref)
Makes sense --- thanks.  This is something we can have automated tests,
isn't it?
We don't currently have any tests for either the fetch output or the
push output. Note that we aren't changing the output _status_. Fetch
always knew that this condition was a failure, and exited appropriately.
So it really would just be testing the expected human-readable output in
these situations, something I thought we usually didn't include in the
tests.

But if you think it is worth doing, I can whip up a few tests.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help