Re: [RFC/PATCH 2/2] messages: uniform error messages for index write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> writes:

> * Leave "temporary" in place and add TRANSLATORS note.
>   It may happen that the index file is writable but not the temporary
>   one.
>
> * Leave pack-write.c alone.
>   It is low level without l10n.
>
> Signed-off-by: Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx>
> ---
> I am actually a bit torn on the "temporary index" messages. On the one hand
> we should hide technicalities from the user; on the other hand, we should give
> helpful information for debugging.
>
> Maybe "new index" and "temporary index" are really in the same camp? I would
> omit "temporary" in that case, too.

It is true that we never overwrite the file in-place, but instead
create a new file and then rename it to the destiation.  So in that
sense, we are always writing "new index file".

There however indeed is a different kind of "temporary" index
involved, when you are doing "git commit paths" to create a partial
commit.  We populate a pristine (relative to HEAD) index, update the
contents of it with the working tree contents at specified paths in
order to write the tree out, but do not use that index after that.
The real index is updated the same way for the specified paths to
match what was committed, but what was added to the real index
outside the specified paths before the partial commit was made is
all kept in the real index.  The presense of this "temporary" index
is something the end users may have to be aware of, if they want to
peek into the state of the index from inside their hooks, so in that
sense, it may make sense to include the word "temporary" in the
error message in that codepath.

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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]