From: Robert Clausecker <fuzxxl@gmail.com>
To: Michael J Gruber <git@drmicha.warpmail.net>, git@vger.kernel.org
Subject: Re: Feature request: Allow extracting revisions into directories
Date: Mon, 04 Feb 2013 13:14:05 +0100 [thread overview]
Message-ID: <1359980045.24730.32.camel@t520> (raw)
In-Reply-To: <510F9907.7010107@drmicha.warpmail.net>
[-- Attachment #1: Type: text/plain, Size: 1876 bytes --]
Am Montag, den 04.02.2013, 12:18 +0100 schrieb Michael J Gruber:
> Sitaram has said much about the Unix philosophy already, and Konstantin
> gave a variant of checkout. Just two more cents:
>
> How would you copy a directory tree? I presume you wouldn't use "tar c .
> | tar -xC gothere", but what would be your worklflow?
>
> Depending on what you actually want to achieve, "git clone -b branch"
> and removing the superfluous .git-dir might be a viable option. (Beware
> the hardlinks, though.)
>
> Michael
The specific workflow I am planning is this:
I have a server that hosts a bare git repository. This git repository
contains a branch production. Whenever somebody pushes to production a
hook automatically puts a copy of the current production branch
into /var/www/foo. I could of course use pull for that but it just does
not feels right. Why should I have a repository twice on the server?
Adding an option to put the tree of an arbitrary revision into a
directory is something that improves usability as it is an operation
semantically different from tar. Saying that you can already get this
with git archive and ad-hoc unpacking is as saying: You don't need cp.
Just tar the file and untar it somewhere else.
Of course that is a possibility but it does not not feel right and is
not intuitive. Adding this feature won't cause feature creep but would
rather add an operation that makes sense in some scenarios and reduces
the dependencies on other commands that might not be available on other
platforms (If you care about that).
Also, this functionality is in full accordance with the Unix principle
as it is a basic operation ("put tree into files") and not something
super special. Also, it always feels like a hack if you do this ad-hoc
unpacking. Like "git can't do it the simple way".
Yours, Robert Clausecker
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2013-02-04 12:14 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
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 [this message]
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=1359980045.24730.32.camel@t520 \
--to=fuzxxl@gmail.com \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.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.
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).