Re: Feature request: Allow extracting revisions into directories

2013-02-10 Thread Thomas Koch
Robert Clausecker: 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

Re: Feature request: Allow extracting revisions into directories

2013-02-09 Thread Robert Clausecker
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

Re: Feature request: Allow extracting revisions into directories

2013-02-09 Thread Junio C Hamano
Robert Clausecker fuz...@gmail.com writes: 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

Re: Feature request: Allow extracting revisions into directories

2013-02-09 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: I am not Phil, but if you ask me, I think it is borderline between meh and no way we would give a short-and-sweet -i to something like this. I think one reason it was meh for me is that we never did an equivalent of cvs export and svn export, primarily

Re: Feature request: Allow extracting revisions into directories

2013-02-09 Thread Robert Clausecker
There are two things git archive is missing that are needed in my use case: First, git archive in combination with tar won't remove unneeded files. You have to run rm -rf before manually which brings me to the next point; git archive can't really make incremental updates. Consider an export that

Re: Feature request: Allow extracting revisions into directories

2013-02-09 Thread Jonathan Nieder
Hi Robert, Robert Clausecker wrote: There are two things git archive is missing that are needed in my use case: First, git archive in combination with tar won't remove unneeded files. You have to run rm -rf before manually which brings me to the next point; git archive can't really make

Re: Feature request: Allow extracting revisions into directories

2013-02-09 Thread Robert Clausecker
That is actually a pretty interesting approach. I can use a different index file for different deployments. How does this cooperate with bare repositories? Aren't they supposed to have no index file at all? Am Samstag, den 09.02.2013, 20:06 -0800 schrieb Jonathan Nieder: My advice is to keep a

Re: Feature request: Allow extracting revisions into directories

2013-02-09 Thread Jonathan Nieder
Robert Clausecker wrote: That is actually a pretty interesting approach. I can use a different index file for different deployments. How does this cooperate with bare repositories? Aren't they supposed to have no index file at all? It should work fine in a bare repo. If you can think of a

Re: Feature request: Allow extracting revisions into directories

2013-02-05 Thread Sitaram Chamarty
On Mon, Feb 4, 2013 at 10:22 PM, Junio C Hamano gits...@pobox.com wrote: Tomas Carnecky tomas.carne...@gmail.com writes: That's what `git checkout` is for. And I would even argue that it's the better choice in your situation because it would delete files from /var/www/foo which you have

Re: Feature request: Allow extracting revisions into directories

2013-02-04 Thread Michael J Gruber
Robert Clausecker venit, vidit, dixit 03.02.2013 15:18: Hello! git currently has the archive command that allows to save an arbitrary revision into a tar or zip file. Sometimes it is useful to not save this revision into an archive but to directly put all files into an arbitrary directory.

Re: Feature request: Allow extracting revisions into directories

2013-02-04 Thread Tomas Carnecky
On Mon, 04 Feb 2013 13:14:05 +0100, Robert Clausecker fuz...@gmail.com wrote: 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

Re: Feature request: Allow extracting revisions into directories

2013-02-04 Thread Andrew Ardill
On 4 February 2013 23:14, Robert Clausecker fuz...@gmail.com wrote: 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

Re: Feature request: Allow extracting revisions into directories

2013-02-04 Thread Junio C Hamano
Andrew Ardill andrew.ard...@gmail.com writes: On 4 February 2013 23:14, Robert Clausecker fuz...@gmail.com wrote: 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

Re: Feature request: Allow extracting revisions into directories

2013-02-04 Thread Andreas Schwab
Robert Clausecker fuz...@gmail.com writes: 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

Feature request: Allow extracting revisions into directories

2013-02-03 Thread Robert Clausecker
Hello! git currently has the archive command that allows to save an arbitrary revision into a tar or zip file. Sometimes it is useful to not save this revision into an archive but to directly put all files into an arbitrary directory. Currently this seems to be not possible to archive directly;

Re: Feature request: Allow extracting revisions into directories

2013-02-03 Thread Sitaram Chamarty
On 02/03/2013 07:48 PM, Robert Clausecker wrote: Hello! git currently has the archive command that allows to save an arbitrary revision into a tar or zip file. Sometimes it is useful to not save this revision into an archive but to directly put all files into an arbitrary directory.

Re: Feature request: Allow extracting revisions into directories

2013-02-03 Thread Robert Clausecker
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

Re: Feature request: Allow extracting revisions into directories

2013-02-03 Thread Konstantin Khomoutov
On Sun, Feb 03, 2013 at 03:18:05PM +0100, Robert Clausecker wrote: git currently has the archive command that allows to save an arbitrary revision into a tar or zip file. Sometimes it is useful to not save this revision into an archive but to directly put all files into an arbitrary

Re: Feature request: Allow extracting revisions into directories

2013-02-03 Thread Sitaram Chamarty
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