git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Unclear error message in "git remote update"
@ 2008-03-09 12:37 Samuel Tardieu
  2008-03-09 20:52 ` Johannes Schindelin
  2008-03-12  5:10 ` Junio C Hamano
  0 siblings, 2 replies; 3+ messages in thread
From: Samuel Tardieu @ 2008-03-09 12:37 UTC (permalink / raw)
  To: git

One of my colleague seems to have destroyed one of its head in his
private repository. When fetching from it through "git remote update"
using next, the repository name is not output:

% git remote update
error: refs/heads/2.0-uobjects points nowhere!

Using master, I get:

% git remote update
Updating core
Updating matthieu
error: refs/heads/2.0-uobjects points nowhere!
Updating origin

which is IMO much clearer. Also, I like seeing what remote repository
it is updating from in case anything gets stuck or slow.

Any objection to reinstating the message as does the following patch?

From: Samuel Tardieu <sam@rfc1149.net>
Date: Sun, 9 Mar 2008 13:33:44 +0100
Subject: [PATCH] builtin remote update: print remote name being fetched from

Reinstate the message "Updating <name>" in git remote update.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
---
 builtin-remote.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/builtin-remote.c b/builtin-remote.c
index ca3bf26..65d90e1 100644
--- a/builtin-remote.c
+++ b/builtin-remote.c
@@ -46,6 +46,7 @@ static int opt_parse_track(const struct option *opt, const char *arg, int not)
 static int fetch_remote(const char *name)
 {
 	const char *argv[] = { "fetch", name, NULL };
+	printf("Updating %s\n", name);
 	if (run_command_v_opt(argv, RUN_GIT_CMD))
 		return error("Could not fetch %s", name);
 	return 0;
-- 
1.5.4.3.611.g29c00


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Unclear error message in "git remote update"
  2008-03-09 12:37 Unclear error message in "git remote update" Samuel Tardieu
@ 2008-03-09 20:52 ` Johannes Schindelin
  2008-03-12  5:10 ` Junio C Hamano
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Schindelin @ 2008-03-09 20:52 UTC (permalink / raw)
  To: Samuel Tardieu; +Cc: git

Hi,

On Sun, 9 Mar 2008, Samuel Tardieu wrote:

> One of my colleague seems to have destroyed one of its head in his
> private repository. When fetching from it through "git remote update"
> using next, the repository name is not output:
> 
> % git remote update
> error: refs/heads/2.0-uobjects points nowhere!
> 
> Using master, I get:
> 
> % git remote update
> Updating core
> Updating matthieu
> error: refs/heads/2.0-uobjects points nowhere!
> Updating origin
> 
> which is IMO much clearer. Also, I like seeing what remote repository
> it is updating from in case anything gets stuck or slow.
> 
> Any objection to reinstating the message as does the following patch?

None from me.

Thanks,
Dscho

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Unclear error message in "git remote update"
  2008-03-09 12:37 Unclear error message in "git remote update" Samuel Tardieu
  2008-03-09 20:52 ` Johannes Schindelin
@ 2008-03-12  5:10 ` Junio C Hamano
  1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2008-03-12  5:10 UTC (permalink / raw)
  To: Samuel Tardieu; +Cc: git

Samuel Tardieu <sam@rfc1149.net> writes:

> One of my colleague seems to have destroyed one of its head in his
> private repository. When fetching from it through "git remote update"
> using next, the repository name is not output:
>
> % git remote update
> error: refs/heads/2.0-uobjects points nowhere!
>
> Using master, I get:
>
> % git remote update
> Updating core
> Updating matthieu
> error: refs/heads/2.0-uobjects points nowhere!
> Updating origin
>
> which is IMO much clearer. Also, I like seeing what remote repository
> it is updating from in case anything gets stuck or slow.
>
> Any objection to reinstating the message as does the following patch?

I do not have objections, but it feels that the message for normal case
(success) is cluttering the output.

If the remote repository is in a bad shape to solicit a "points nowhere"
error, perhaps

 (1) that error message should be squelched out completely, as it does not
     affect the outcome of the fetch anyway, or

 (2) the dangling symref should cause "fetch" to error out but with a
     different error status than the total failure case, so that this
     caller can tell it is a non-grave error, or

 (3) the dangling symref should actually make the fetch fail, as the
     remote repository is corrupt.

For now I'll take your patch, but this is something we may want to
clean-up in 1.6.0 timeframe.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-03-12  5:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-09 12:37 Unclear error message in "git remote update" Samuel Tardieu
2008-03-09 20:52 ` Johannes Schindelin
2008-03-12  5:10 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).