git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avery Pennarun <apenwarr@gmail.com>
To: J Chapman Flack <jflack@math.purdue.edu>
Cc: git@vger.kernel.org
Subject: Re: git's fascination with absolute paths
Date: Mon, 21 Dec 2009 17:09:29 -0500	[thread overview]
Message-ID: <32541b130912211409j540928c0g8e944fcc05c44f82@mail.gmail.com> (raw)
In-Reply-To: <4B2FC17A.3010705@math.purdue.edu>

On Mon, Dec 21, 2009 at 1:42 PM, J Chapman Flack <jflack@math.purdue.edu> wrote:
> In general it seems best for a program to stay free of assumptions
> about absolute paths except when there is a specific functional
> requirement that needs them.  I assume there is something git does
> that requires it to have this limitation, but it's not intuitive
> to me if I just think about what I expect an scm system to do.
> I've searched on 'absolute' in the list archive to see if there
> was a past discussion like "we've decided we need absolute paths
> everywhere because X" but I didn't find any.  Can someone
> describe what the reasoning was?  A security concern perhaps?
> (And one more serious than the race condition built into
> make_absolute_path?)

I think it's probably just because it's easier to deal with absolute
paths than relative ones.  Those ".." things can be annoying,
particularly inside scripts, etc, and git uses a lot of scripts.  Much
more straightforward to just normalize all the paths once and be sure
there are no weird dots in them.

Not to say that it can't be done... just that it seems nobody has been
inspired to do so.  I'm guessing most of the existing developers still
won't be inspired to do it based on your rather unusual use case;
however, they might accept patches.

> Or, perhaps I should be asking, what is there in git that will
> break if I recompile it with make_absolute_path(p){return p;}?
> Does it store absolute paths in the db?  Would a recompiled
> version produce a db other gits couldn't read?

You might try this and then see what happens in 'make test'.  I
imagine a set of clean patches that removed a lot of assumptions about
absolute paths, without breaking any unit tests, would be something
worth considering for integration into git.

Have fun,

Avery

  reply	other threads:[~2009-12-21 22:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-21 18:42 git's fascination with absolute paths J Chapman Flack
2009-12-21 22:09 ` Avery Pennarun [this message]
2009-12-22  0:26   ` Junio C Hamano
2009-12-22  6:30     ` Junio C Hamano
2009-12-22 17:21       ` J Chapman Flack

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=32541b130912211409j540928c0g8e944fcc05c44f82@mail.gmail.com \
    --to=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jflack@math.purdue.edu \
    /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).