From: Alan Hourihane <alanh@fairlite.co.uk>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: new platform & S_IFGITLINK problem
Date: Thu, 22 Jul 2010 17:23:32 +0100 [thread overview]
Message-ID: <1279815812.7796.5499.camel@jetpack.demon.co.uk> (raw)
In-Reply-To: <7vfx2b2ft5.fsf@alter.siamese.dyndns.org>
On Sat, 2010-05-01 at 19:33 -0700, Junio C Hamano wrote:
> Alan Hourihane <alanh@fairlite.co.uk> writes:
>
> > Just joined as I'm compiling git on a new platform and wondered if
> > someone can help solve a problem with the definition of S_IFGITLINK.
>
> Yikes. The current codebase pretty much assumes that IFREG is 0100000,
> IFDIR 0040000, and IFLNK 0120000, and the bits read from "struct stat" and
> the mode bits we store in the index and tree objects are interchangeable.
>
> Yes, that assumption is a gross POSIX violation but we so far haven't seen
> any platform that matters in real life that assigns the IFMT bits
> differently.
>
> We would need to:
>
> (1) rename S_IFGITLINK to GIT_S_IFMODULE;
>
> (2) define GIT_S_IF{REG,DIR,LNK} as 0100000, 0040000, and 0120000;
>
> (3) write MODE_SYSTEM_TO_GIT() macro to convert from S_IF{REG,DIR,LNK} we
> read from struct stat to the "canonical" GIT_S_IF{REG,DIR,LNK}
> values; and
>
> (4) change all the code that read mode from struct stat and use it to
> first use MODE_SYSTEM_TO_GIT().
>
> Currently 'git grep -e "S_IF[A-Z]" -e "struct stat"' reports around 250
> hits, so it is not infeasible amount of work, but it is not a trivial and
> mechanical replacement, either. I or somebody need to set aside a block
> of time to do this clean-up and audit the result.
>
> Thanks for a report.
Hi Junio,
Is there any ETA on fixing this up ?
Thanks,
Alan.
next prev parent reply other threads:[~2010-07-22 16:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-01 23:29 new platform & S_IFGITLINK problem Alan Hourihane
2010-05-02 2:33 ` Junio C Hamano
2010-05-02 9:39 ` Alan Hourihane
2010-05-04 3:39 ` Linus Torvalds
2010-05-04 3:52 ` Linus Torvalds
2010-05-04 6:13 ` Andreas Ericsson
2010-05-04 14:34 ` Linus Torvalds
2010-05-04 15:29 ` Junio C Hamano
2010-05-04 7:21 ` Alan Hourihane
2010-07-22 16:23 ` Alan Hourihane [this message]
2010-07-25 17:29 ` Junio C Hamano
2010-07-25 18:00 ` Alan Hourihane
2010-08-02 16:11 ` Ævar Arnfjörð Bjarmason
2010-08-02 16:14 ` Alan Hourihane
2010-08-02 16:26 ` Ævar Arnfjörð Bjarmason
2010-05-05 2:29 ` Jonathan Nieder
2010-05-05 8:36 ` Alan Hourihane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1279815812.7796.5499.camel@jetpack.demon.co.uk \
--to=alanh@fairlite.co.uk \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).