diff options
| -rw-r--r-- | cache.c | 6 | ||||
| -rw-r--r-- | ui-patch.c | 2 |
2 files changed, 6 insertions, 2 deletions
| @@ -224,6 +224,12 @@ static int fill_slot(struct cache_slot *slot) | |||
| 224 | /* Generate cache content */ | 224 | /* Generate cache content */ |
| 225 | slot->fn(); | 225 | slot->fn(); |
| 226 | 226 | ||
| 227 | /* Make sure any buffered data is flushed to the file */ | ||
| 228 | if (fflush(stdout)) { | ||
| 229 | close(tmp); | ||
| 230 | return errno; | ||
| 231 | } | ||
| 232 | |||
| 227 | /* update stat info */ | 233 | /* update stat info */ |
| 228 | if (fstat(slot->lock_fd, &slot->cache_st)) { | 234 | if (fstat(slot->lock_fd, &slot->cache_st)) { |
| 229 | close(tmp); | 235 | close(tmp); |
| @@ -92,6 +92,4 @@ void cgit_print_patch(const char *new_rev, const char *old_rev, | |||
| 92 | log_tree_commit(&rev, commit); | 92 | log_tree_commit(&rev, commit); |
| 93 | printf("-- \ncgit %s\n\n", cgit_version); | 93 | printf("-- \ncgit %s\n\n", cgit_version); |
| 94 | } | 94 | } |
| 95 | |||
| 96 | fflush(stdout); | ||
| 97 | } | 95 | } |
