On Thu, Feb 16, 2017 at 11:10:18AM +0100, Andreas Schwab wrote:
> >>int xfclose(FILE *fp)
> >>{
> >>return ferror(fp) | fclose(fp);
> >>}
> >
> > Yes, that's exactly what I had in mind (might be worth calling out the
> > bitwise-OR, though, just to make it clear it's not a
On Feb 15 2017, Jeff King wrote:
> On Wed, Feb 15, 2017 at 02:50:19PM -0800, Junio C Hamano wrote:
>
>> > That works, but the fact that we need a comment is a good sign that it's
>> > kind of gross. It's too bad stdio does not specify the return of fclose
>> > to report an error in the close _or_
On Wed, Feb 15, 2017 at 02:50:19PM -0800, Junio C Hamano wrote:
> > That works, but the fact that we need a comment is a good sign that it's
> > kind of gross. It's too bad stdio does not specify the return of fclose
> > to report an error in the close _or_ any previous error. I guess we
> > could
Jeff King writes:
> Good catch. I think we use a nasty bitwise-OR elsewhere to do that.
> Ah, here it is, in tempfile.c:
>
> /*
> * Note: no short-circuiting here; we want to fclose()
> * in any case!
> */
> err =
On Wed, Feb 15, 2017 at 02:28:10PM -0800, Junio C Hamano wrote:
> Jeff King writes:
>
> >> abort:
> >>strbuf_release(¬e);
> >>free(url);
> >> - fclose(fp);
> >> + if (ferror(fp))
> >> + rc = -1;
> >> + if (fclose(fp))
> >> + rc = -1;
> >>return rc;
> >
> > Yeah
Jeff King writes:
>> abort:
>> strbuf_release(¬e);
>> free(url);
>> -fclose(fp);
>> +if (ferror(fp))
>> +rc = -1;
>> +if (fclose(fp))
>> +rc = -1;
>> return rc;
>
> Yeah, I think this works. Normally you'd want to flush before checking
> ferror
On Wed, Feb 15, 2017 at 01:47:23PM -0800, Junio C Hamano wrote:
> Jeff King writes:
>
> > On Sun, Feb 12, 2017 at 05:37:30PM +0100, Jáchym Barvínek wrote:
> > If FETCH_HEAD failed to write because of a full disk (or any other
> > reason), then the right thing is for "git fetch" to write an error
Jeff King writes:
> On Sun, Feb 12, 2017 at 05:37:30PM +0100, Jáchym Barvínek wrote:
> If FETCH_HEAD failed to write because of a full disk (or any other
> reason), then the right thing is for "git fetch" to write an error to
> stderr, and git-pull should not continue the operation at all.
>
> If
On Sun, Feb 12, 2017 at 05:37:30PM +0100, Jáchym Barvínek wrote:
> Hello, I would like to report what I consider a bug in git, I hope I'm
> doing it the right way.
> I was trying to run `git pull` in my repository and got the following
> error: "git pull
> Your configuration specifies to merge wi
Hello, I would like to report what I consider a bug in git, I hope I'm
doing it the right way.
I was trying to run `git pull` in my repository and got the following
error: "git pull
Your configuration specifies to merge with the ref 'refs/heads/master'
from the remote, but no such ref was fetched.
10 matches
Mail list logo