diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-11-09 00:21:44 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-09 00:21:44 -0800 |
commit | 5d4138a66d265e7ddbe21d44f79bcaa1e9a6b6ff (patch) | |
tree | 47ff3839458d806fee14824f616c55cdd55b82fb /builtin-diff.c | |
parent | 063036af0832710cfcb1380cc4f9c4597b98cc26 (diff) | |
parent | b9217c09386e5313ac6a54cc91cf03149514154b (diff) | |
download | git-5d4138a66d265e7ddbe21d44f79bcaa1e9a6b6ff.tar.gz |
Merge branch 'maint'
* maint:
Start preparing for 1.5.3.6
git-send-email: Change the prompt for the subject of the initial message.
SubmittingPatches: improve the 'Patch:' section of the checklist
instaweb: Minor cleanups and fixes for potential problems
stop t1400 hiding errors in tests
Makefile: add missing dependency on wt-status.h
refresh_index_quietly(): express "optional" nature of index writing better
Fix sed string regex escaping in module_name.
Avoid a few unportable, needlessly nested "...`...".
git-mailsplit: with maildirs not only process cur/, but also new/
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-diff.c')
-rw-r--r-- | builtin-diff.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/builtin-diff.c b/builtin-diff.c index f77352b40d..f557d21929 100644 --- a/builtin-diff.c +++ b/builtin-diff.c @@ -200,15 +200,11 @@ static void refresh_index_quietly(void) discard_cache(); read_cache(); refresh_cache(REFRESH_QUIET|REFRESH_UNMERGED); - if (active_cache_changed) { - if (write_cache(fd, active_cache, active_nr) || - close(fd) || - commit_locked_index(lock_file)) - ; /* - * silently ignore it -- we haven't mucked - * with the real index. - */ - } + + if (active_cache_changed && + !write_cache(fd, active_cache, active_nr) && !close(fd)) + commit_locked_index(lock_file); + rollback_lock_file(lock_file); } |