[darcs-users] Re: Wishlist: execute permissions

David Roundy droundy at abridgegame.org
Sun Nov 28 13:39:34 UTC 2004


On Sat, Nov 27, 2004 at 07:41:00PM +0000, Mark Stosberg wrote:
> On 2004-11-26, David Roundy <droundy at abridgegame.org> wrote:
> > Hmmm.  Adding a flag to tell darcs to make files beginning with #!
> > executable sounds like a viable possibility.  It wouldn't muck up the
> > repositories (as a patch type would), and we could always remove it later
> > if we add support for versioning the execute bit.  Although executable
> > scripts don't *need* to begin with #!, it's almost always a good idea, and
> > almost never hurts.  I think this may be a case where the less general
> > solution (hardcoding a flag to look for #!) may be cleaner and easier on
> > users, and probably will serve almost everyone's needs.
> >
> > --make-poundbang-scripts-executable, perhaps?
>
> I like this because it's probably going to 'just work' at least 95% of
> the time. For my own work, it think it would cover 100% of the cases I
> care about it.

Indeed, that's what I like about it.  And it's a solution we can add to the
1.0.x branch, since it doesn't add a patch type.

> --set-shebang-scripts-executable
> 
> It's just a little shorter than your own solution. :)

Indeed.  It does seem a bit nicer.  One question is whether the executable
bit should be removed if the #! is removed from the beginning of the file
(or vice versa).  I guess it'd have to be, since files are always created
"empty" and thus without a #!, so we'd have to support making them
executable when the #! is added, so it wouldn't be hard to do the reverse
when it's removed.
-- 
David Roundy
http://www.darcs.net




More information about the darcs-users mailing list