Re: [PATCH] git-rev-list: give better diagnostic for failed write

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Tuesday, June 26, 2007 - 3:32 pm

On Tue, 26 Jun 2007, Theodore Tso wrote:

No.

We basically _never_ want "line buffered" or "unbuffered", which is what 
stdio knows how to do. That sucks in _all_ cases.

What we want is "fully buffered" for plain files, and "record buffered" 
for anything else (where a "record" is basically the "commit + optional 
diff").

We can get the record buffered by adding the fflush() calls, but the thing 
is, we'd want to _avoid_ that if it was a file. It's just that there is no 
way to set that kind of flag portably with stdio, we'd have to carry it 
around _separately_ from stdio, which is a big pain.

But if we decide that this only matters with stdout (which currently is 
what the patches have done), we could of course just make it a single 
global variable (like "stdout" itself already is). Then we could just make 
git.c start out by testing stdout at startup and setting the global 
variable.

		Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] git-rev-list: give better diagnostic for faile ..., Linus Torvalds, (Tue Jun 26, 3:32 pm)
[PATCH] Don't fflush(stdout) when it's not helpful, Theodore Tso, (Thu Jun 28, 4:53 pm)
Re: [PATCH] Don't fflush(stdout) when it's not helpful, Frank Lichtenheld, (Thu Jun 28, 6:05 pm)
Re: [PATCH] Don't fflush(stdout) when it's not helpful, Theodore Tso, (Thu Jun 28, 8:48 pm)
Re: [PATCH] Don't fflush(stdout) when it's not helpful, Junio C Hamano, (Fri Jun 29, 12:07 am)
Re: [PATCH] Don't fflush(stdout) when it's not helpful, Linus Torvalds, (Fri Jun 29, 9:06 am)
Re: [PATCH] Don't fflush(stdout) when it's not helpful, Theodore Tso, (Fri Jun 29, 10:40 am)
Re: [PATCH] Don't fflush(stdout) when it's not helpful, Linus Torvalds, (Fri Jun 29, 4:43 pm)
Re: [PATCH] Don't fflush(stdout) when it's not helpful, Junio C Hamano, (Fri Jun 29, 7:15 pm)
Re: [PATCH] Don't fflush(stdout) when it's not helpful, Linus Torvalds, (Fri Jun 29, 9:24 pm)
Re: [PATCH] Don't fflush(stdout) when it's not helpful, Theodore Tso, (Sat Jun 30, 7:27 am)
Re: [PATCH] Don't fflush(stdout) when it's not helpful, Junio C Hamano, (Sat Jun 30, 11:42 am)