All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Clausecker <fuzxxl@gmail.com>
To: git@vger.kernel.org
Cc: Phil Hord <phil.hord@gmail.com>
Subject: Re: Feature request: Allow extracting revisions into directories
Date: Sat, 09 Feb 2013 16:58:19 +0100	[thread overview]
Message-ID: <1360425499.3369.10.camel@t520> (raw)
In-Reply-To: <CABURp0rMk-W8VMRhXoR9YYQSwjWTfPbXz5mhPX3-HKsBSu5_mw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3443 bytes --]

After thinking a while about how to solve the problems I have, I
consider the following things as a solution to my problem.

Add an option --isolated, -i to git checkout: Check out a branch / tag /
revision but do not touch the index. This could be used together with
--work-tree to check out a branch into an arbitrary directory. Also, it
satisfies all 4 criteria from [1] and therefore is perfect for
deployment from a bare repository.

What do you think about this feature request?

Yours, Robert Clausecker

[1]: http://sitaramc.github.com/the-list-and-irc/deploy.html

Am Dienstag, den 05.02.2013, 10:11 -0500 schrieb Phil Hord:
> On Sun, Feb 3, 2013 at 7:42 PM, Sitaram Chamarty <sitaramc@gmail.com> wrote:
> > On 02/03/2013 11:41 PM, Robert Clausecker wrote:
> >>
> >> Am Sonntag, den 03.02.2013, 21:55 +0530 schrieb Sitaram Chamarty:
> >>> Could you help me understand why piping it to tar (actually 'tar -C
> >>> /dest/dir -x') is not sufficient to achieve what you want?
> >>
> >> Piping the output of git archive into tar is of course a possible
> >> solution; I just don't like the fact that you need to pipe the output
> >> into a separate program to do something that should be possible with a
> >> simple switch and not an extra command. It feels unintuitive and like a
> >> workaround to make an archive just to unpack it on-the-fly. Also, adding
> >> such a command (or at least documenting the way to do this using a pipe
> >> to tar somewhere in the man pages) is a small and simple change that
> >> improves usability.
> >
> > I realise it appears to be the fashion these days to get away from the
> > Unix philosophy of having different tools do different things and
> > combining them as needed.
> >
> > Ignoring the option-heavy GNU, and looking at the more traditional BSD
> > tar manpage [1], I notice the following flags that could still be
> > potentially needed by someone running 'git archive': '-t' (instead of
> > '-x'), '-C dir', '--exclude/include', '-k', '-m', '--numeric-owner', -o,
> > -P, -p, -q, -s, -T, -U, -v, -w, and -X.
> 
> OP did not ask about tar so I do not see why any of these tar options
> are relevant.  It seems like what he really wants is 'git archive
> --format=native' , maybe.   You can almost create this option by
> saying
> 
>    git config tar.native.command "tar -x"
> 
> except that you do not get the opportunity to specify a target directory.
> 
> But maybe he really wants a form of 'git checkout' instead.
> 
> 
> > And I'm ignoring the esoteric ones like "--chroot" and "-S" (sparse mode).
> >
> > How many of these options would you like included in git?  And if you
> > say "I don't need any of those; I just need '-x'", that's not relevant.
> >  Someone else may need any or all of those flags, and if you accept "-x"
> > you have to accept some of the others too.
> 
> This is only true if you cannot stop yourself from thinking about
> 'tar'.  What about zip, for example?
> 
> I think none of these options is relevant.
> 
> 
> > Also, I often want to deploy to a different host, and I might do that
> > like so:
> >
> >     git archive ... | ssh host tar -C /deploy/dir -x
> >
> > Why not put that ssh functionality into git also?
> 
> This slippery-slope argument is growing tiresome.
> 
> Phil
> 
> p.s. Conceded: OP set off this avalanche by disparaging the vaunted
> PIPE operation.


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2013-02-09 15:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-03 14:18 Feature request: Allow extracting revisions into directories Robert Clausecker
2013-02-03 16:25 ` Sitaram Chamarty
2013-02-03 18:11   ` Robert Clausecker
2013-02-04  0:42     ` Sitaram Chamarty
2013-02-05 15:11       ` Phil Hord
2013-02-09 15:58         ` Robert Clausecker [this message]
2013-02-09 23:00           ` Junio C Hamano
2013-02-10  3:45             ` Junio C Hamano
2013-02-10  3:57               ` Robert Clausecker
2013-02-10  4:06                 ` Jonathan Nieder
2013-02-10  4:10                   ` Robert Clausecker
2013-02-10  4:19                     ` Jonathan Nieder
2013-02-03 23:26 ` Konstantin Khomoutov
2013-02-04 11:18 ` Michael J Gruber
2013-02-04 12:14   ` Robert Clausecker
2013-02-04 12:47     ` Tomas Carnecky
2013-02-04 16:52       ` Junio C Hamano
2013-02-05  8:55         ` Sitaram Chamarty
2013-02-04 12:58     ` Andrew Ardill
2013-02-04 16:55       ` Junio C Hamano
2013-02-04 18:21     ` Andreas Schwab
2013-02-10 12:16     ` Thomas Koch

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=1360425499.3369.10.camel@t520 \
    --to=fuzxxl@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=phil.hord@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.