Re: [PATCH v2 02/17] Report bugs consistently
- From
Jakub Narębski <jnareb@gmail.com>
- Date
- Jul 5, 2016, 13:05 UTC
- Message-ID
- <577BB09E.5070801@gmail.com>
- In-Reply-To
- <fdb0efbeb0b41c0d9976b2d66df90d2366f81ca1.1467717729.git.johannes.schindelin@gmx.de>
W dniu 2016-07-05 o 13:23, Johannes Schindelin pisze:
Show 14 quoted lines
> diff --git a/builtin/ls-files.c b/builtin/ls-files.c
> index f02e3d2..00ea91a 100644
> --- a/builtin/ls-files.c
> +++ b/builtin/ls-files.c
> @@ -118,7 +118,8 @@ static void show_killed_files(struct dir_struct *dir)
> */
> pos = cache_name_pos(ent->name, ent->len);
> if (0 <= pos)
> - die("bug in show-killed-files");
> + die("BUG: killed-file %.*s not found",
> + ent->len, ent->name);
> pos = -pos - 1;
> while (pos < active_nr &&
> ce_stage(active_cache[pos]))This has an additional improvement (not mentioned in the commit message, but probably not worth it) in that it shows which file was not found, not only that there was some bug, isn't it?
-- Jakub Narębski