From: Alex Riesen Date: Sun, 22 Mar 2009 22:07:33 +0000 (+0100) Subject: Improve error message about fetch into current branch X-Git-Tag: v1.6.3-rc0~114 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=26284f9356f4c4d8865db8bb024121311a1f90ff;p=git.git Improve error message about fetch into current branch Otherwise, it is hard to guess why the fetch failed. Make sure we at least mention that the repository must be bare. Also the current branch is printed. Signed-off-by: Alex Riesen Signed-off-by: Junio C Hamano --- diff --git a/builtin-fetch.c b/builtin-fetch.c index 7fb35fca9..729314652 100644 --- a/builtin-fetch.c +++ b/builtin-fetch.c @@ -544,7 +544,8 @@ static void check_not_current_branch(struct ref *ref_map) for (; ref_map; ref_map = ref_map->next) if (ref_map->peer_ref && !strcmp(current_branch->refname, ref_map->peer_ref->name)) - die("Refusing to fetch into current branch"); + die("Refusing to fetch into current branch %s " + "of non-bare repository", current_branch->refname); } static int do_fetch(struct transport *transport,