Felipe Contreras <felipe.contre...@gmail.com> writes:

> We are supposedly adding files, to to which cache if 'the_index' is
> discarded?
>       if (!current_head) {
>               discard_cache();
> +             if (read_cache() < 0)
> +                     die(_("cannot read the index"));
>               return;
>       }

It is not obvious to me that this is a correct change.  discard_cache()
without subsequent reloading could also legitimately be used to empty
the index.  So if you are fixing a bug, please justify the change and
provide a testcase to guard against it in the future.

Thomas Rast
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to