git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
To: Pierre Habouzit <madcoder@madism.org>
Cc: git@vger.kernel.org
Subject: Re: [wishlist] git-archive -L
Date: Tue, 03 Feb 2009 09:10:43 +0100	[thread overview]
Message-ID: <4987FC03.60607@lsrfire.ath.cx> (raw)
In-Reply-To: <20090202143425.GA30667@artemis.corp>

Pierre Habouzit schrieb:
> Hi Rene,
> 
> I wanted to do that myself, but I sadly miss the time right now, so I
> wonder if you'd know how to do the following.
> 
> We have in our repository a kind of modular system (for a family of web
> sites) where each web-site uses a (versionned) symlink farm. IOW it
> works basically that way:
> 
>     www/module1
>     www/module2
>     product_A/www/module1 -> ../../www/module1
>     product_A/www/module_A
>     product_B/www/module1 -> ../../www/module1
>     product_B/www/module2 -> ../../www/module2
>     product_B/www/module_B
> 
> Though product_A and _B even if they share a fair amount of code, are
> separate products and when we release, we'd like to be able to perform
> from inside:
> 
>     git archive --format=tar -L product_$A
> 
> where -L basically does what it does in cp: dereference symlinks.  To
> make the thing hairier, we also have symlinks _inside_ www/ (pointing
> into the same subtree) that we'd like to keep if possible (even if it's
> not a big deal).
> 
> So I'd suggest something where -L only dereferences the symlink if it
> goes outside of the list of paths passed to git-archive, and -LL (or -L
> -L) dereferences anything. Of course this would only make sense if the
> symlinks resolve to something that is tracked :)

Last April, I was working on making archive follow all symlinks pointing
to internal files.  The goal was a bit different, namely to create
archives for platforms without symlink support (i.e. it would resolve
all symlinks pointing to tracked objects).

IIRC the code had some limitations, e.g. it couldn't follow a symlink to
a path containing symlinked directories.  I'll need to rebase it to
master first, though, as the surrounding code has changed a bit in the
meantime.

To follow only symlinks that point outside of the specified paths sounds
like a sensible mode of operation, but I'm not sure that it's worth a
one letter option.

Given your setup you also might want to take a look at submodules and
the recent submodule archival support patches by Lars Hjelmi.

Anyway, I'll try to resurrect my old, incomplete symlink following code,
but I don't have much time, either. :-/

René

  reply	other threads:[~2009-02-03  8:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-02 14:34 [wishlist] git-archive -L Pierre Habouzit
2009-02-03  8:10 ` René Scharfe [this message]
2009-02-04 23:00   ` René Scharfe
2009-02-05 15:04     ` Pierre Habouzit

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4987FC03.60607@lsrfire.ath.cx \
    --to=rene.scharfe@lsrfire.ath.cx \
    --cc=git@vger.kernel.org \
    --cc=madcoder@madism.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).