diff options
author | Alex Riesen <raa.lkml@gmail.com> | 2009-03-22 23:07:33 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-03-22 17:13:08 -0700 |
commit | 26284f9356f4c4d8865db8bb024121311a1f90ff (patch) | |
tree | 491bc9fd8eb62c518ad0d48188f18a3d99f0faf9 /builtin-fetch.c | |
parent | 636991be2d2ce8368cd6735473954b1ebfa989bf (diff) | |
download | git-26284f9356f4c4d8865db8bb024121311a1f90ff.tar.gz |
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 <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-fetch.c')
-rw-r--r-- | builtin-fetch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-fetch.c b/builtin-fetch.c index 7fb35fca9d..7293146525 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, |