author | Junio C Hamano <gitster@pobox.com> | |
Fri, 9 Nov 2007 00:24:00 +0000 (16:24 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 9 Nov 2007 00:26:23 +0000 (16:26 -0800) | ||
commit | fbbdbfc3ccff209136c9f94fed8321e5d3d0ca85 | |
tree | c3fd8702e36c87582b938b08c4d0f583fcc0ced9 | tree | snapshot |
parent | 4f2e94c0f7685f9c58e67b0651147684efb0f57e | commit | diff |
refresh_index_quietly(): express "optional" nature of index writing better
The point of the part of the code this patch touches is that if
we modified the active_cache, we try to write it out and make it
the index file for later users to use by calling
"commit_locked_index", but we do not really care about the
failure from this sequence because it is done purely as an
optimization.
The original code called three functions primarily for their
side effects but as condition of an if statement, which is
admittedly a bad style.
Incidentally, it squelches an "empty if body" warning from gcc.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The point of the part of the code this patch touches is that if
we modified the active_cache, we try to write it out and make it
the index file for later users to use by calling
"commit_locked_index", but we do not really care about the
failure from this sequence because it is done purely as an
optimization.
The original code called three functions primarily for their
side effects but as condition of an if statement, which is
admittedly a bad style.
Incidentally, it squelches an "empty if body" warning from gcc.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-diff.c | diff | blob | history |