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 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-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 s

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 ma

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 o

Re: Feature request: Allow extracting revisions into directories

2013-02-09 Thread Junio C Hamano
Junio C Hamano 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 beca

Re: Feature request: Allow extracting revisions into directories

2013-02-09 Thread Junio C Hamano
Robert Clausecker 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 used together

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 bran

Re: Feature request: Allow extracting revisions into directories

2013-02-05 Thread Phil Hord
On Sun, Feb 3, 2013 at 7:42 PM, Sitaram Chamarty 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

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 wrote: > Tomas Carnecky 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 deleted in your repo. git archi

Re: Feature request: Allow extracting revisions into directories

2013-02-04 Thread Andreas Schwab
Robert Clausecker 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 for that but

Re: Feature request: Allow extracting revisions into directories

2013-02-04 Thread Junio C Hamano
Andrew Ardill writes: > On 4 February 2013 23:14, Robert Clausecker 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 p

Re: Feature request: Allow extracting revisions into directories

2013-02-04 Thread Junio C Hamano
Tomas Carnecky 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 deleted in your repo. git archive|tar wouldn't do that. The point about removal is an interesting on

Re: Feature request: Allow extracting revisions into directories

2013-02-04 Thread Andrew Ardill
On 4 February 2013 23:14, Robert Clausecker 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 current produ

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 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 dependencies

Re: Feature request: Allow extracting revisions into directories

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

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 > direct

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

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 > direct

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 fa

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. Cu

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; th