Re: Bug: .gitconfig folder

2015-05-28 Thread Junio C Hamano
Jeff King writes: > On Wed, May 27, 2015 at 03:38:12PM -0700, Junio C Hamano wrote: > >> The patch was meant to be a tongue-in-cheek tangent that is a vast >> improvement for cases where we absolutely need to use mmap but does >> not help the OP at all ;-) I do not think there is any need for th

Re: Bug: .gitconfig folder

2015-05-28 Thread Jeff King
On Wed, May 27, 2015 at 03:38:12PM -0700, Junio C Hamano wrote: > The patch was meant to be a tongue-in-cheek tangent that is a vast > improvement for cases where we absolutely need to use mmap but does > not help the OP at all ;-) I do not think there is any need for the > config reader to read

Re: Bug: .gitconfig folder

2015-05-27 Thread Jeff King
On Wed, May 27, 2015 at 03:24:47PM -0700, Stefan Beller wrote: > What is our thinking for after-fact recovery attempts? > Like we try the mmap first, if that fails we just use open to get the > contents of > the file. And when open fails, we can still print a nice error message? For config, I thi

Re: Bug: .gitconfig folder

2015-05-27 Thread Junio C Hamano
Jeff King writes: >> -die_errno("Out of memory? mmap failed"); >> +die_errno("mmap failed"); > > This is definitely an improvement, but the real failing of that error > message is that it does not tell us that "~/.gitconfig" is the culprit. > I don't think

Re: Bug: .gitconfig folder

2015-05-27 Thread Stefan Beller
On Wed, May 27, 2015 at 3:18 PM, Jeff King wrote: > On Wed, May 27, 2015 at 01:30:29PM -0700, Junio C Hamano wrote: > >> Jorge writes: >> >> > If you have a folder named ~/.gitconfig instead of a file with that >> > name, when you try to run some global config editing command it will >> > fail wi

Re: Bug: .gitconfig folder

2015-05-27 Thread Jeff King
On Wed, May 27, 2015 at 01:30:29PM -0700, Junio C Hamano wrote: > Jorge writes: > > > If you have a folder named ~/.gitconfig instead of a file with that > > name, when you try to run some global config editing command it will > > fail with a wrong error message: > > > > "fatal: Out of memor

Re: Bug: .gitconfig folder

2015-05-27 Thread Junio C Hamano
Jorge writes: > If you have a folder named ~/.gitconfig instead of a file with that > name, when you try to run some global config editing command it will > fail with a wrong error message: > > "fatal: Out of memory? mmap failed: No such device" That indeed is a funny error message. How abo

Bug: .gitconfig folder

2015-05-27 Thread Jorge
If you have a folder named ~/.gitconfig instead of a file with that name, when you try to run some global config editing command it will fail with a wrong error message: "fatal: Out of memory? mmap failed: No such device" You can reproduce it: $rm ~/.gitconfig $mkdir ~/.gitconfig $ls -l