read_branches_file ()

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Date: Friday, February 8, 2008 - 11:50 am

I'm (again) trying to port git-1.5.4 to HP-UX, and I've already got rather
far, but I'm hitting some stuff I cannot explain.

t5405-send-pack-rewind.sh fails the 'git fetch .. master:master' part in
the setup, as deep down, read_branches_file () is called with in remote
the name "..".

The file that it tries to open using git_path () is ".git/branches/.."
That is weird. That is not a file, but a dir. "../.git/branches" would
be more logical, but whatever. HP-UX 11.00 will gladly return a valid
FILE * for opening a directory with fopen (), which, when read, will
return anything but what is expected. So, maybe read_branches_file ()
should be protected against opening anything but files. Maybe with some
stat () and S_ISREG ()'s.

Or has something gone wrong earlier on?

In my case, the returned url is 'l', which cannot be opened:

fatal: 'l': unable to chdir or not a git archive
fatal: The remote end hung up unexpectedly

which is cast from upload-pack.c:main ()

-- 
H.Merijn Brand         Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using & porting perl 5.6.2, 5.8.x, 5.10.x  on HP-UX 10.20, 11.00, 11.11,
& 11.23, SuSE 10.1 & 10.2, AIX 5.2, and Cygwin.       http://qa.perl.org
http://mirrors.develooper.com/hpux/            http://www.test-smoke.org
                        http://www.goldmark.org/jeff/stupid-disclaimers/
-
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:
read_branches_file (), H.Merijn Brand, (Fri Feb 8, 11:50 am)
Re: read_branches_file (), Daniel Barkalow, (Fri Feb 8, 1:18 pm)
Re: read_branches_file (), H.Merijn Brand, (Fri Feb 8, 12:03 pm)
Re: read_branches_file (), Andreas Ericsson, (Mon Feb 11, 6:00 am)
Re: read_branches_file (), H.Merijn Brand, (Mon Feb 11, 6:17 am)
Re: read_branches_file (), Johannes Schindelin, (Fri Feb 8, 12:22 pm)
Re: read_branches_file (), H.Merijn Brand, (Fri Feb 8, 12:49 pm)