Re: [PATCH] Teach git to change to a given directory using -C option

2013-08-31 Thread Eric Sunshine
On Fri, Aug 30, 2013 at 9:35 AM, Nazri Ramliy wrote: > This is similar in spirit to to "make -C dir ..." and "tar -C dir ...". > > Currently it takes more effort (keypresses) to invoke git command in a > different directory than the current one without leaving the current > directory: > > 1. (

[PATCH] Teach git to change to a given directory using -C option

2013-08-30 Thread Nazri Ramliy
This is similar in spirit to to "make -C dir ..." and "tar -C dir ...". Currently it takes more effort (keypresses) to invoke git command in a different directory than the current one without leaving the current directory: 1. (cd ~/foo && git status) git --git-dir=~/foo/.git --work-dir

[PATCH] Teach git to change to a given directory using -C option

2013-04-21 Thread Nazri Ramliy
This is similar in spirit to to "make -C dir ..." and "tar -C dir ...". Currently finding out the status of a git repository that is located away from the current working directory without going to that directory can be done in the following ways: 1. (cd ~/foo && git status) 2. git --git-

Re: [PATCH] Teach git to change to a given directory using -C option

2013-04-20 Thread Jeff King
On Sat, Apr 20, 2013 at 03:18:38PM -0700, Jonathan Nieder wrote: > The "sometimes you just want to pass a command to 'exec'" use case > does not convince me. I equally well might want to run "git" after > another command, or run "git" if and only if a repository exists > there, or do any number o

Re: [PATCH] Teach git to change to a given directory using -C option

2013-04-20 Thread Jonathan Nieder
Jeff King wrote: > On Fri, Apr 19, 2013 at 08:21:48PM +0800, Nazri Ramliy wrote: >> Often I find myself needing to find out quickly the status of a repository >> that >> is not in my currenct working directory, like this: >> >> $ (cd ~/foo; git log -1) >> >> With this patch now i can sim

Re: [PATCH] Teach git to change to a given directory using -C option

2013-04-19 Thread Jeff King
On Fri, Apr 19, 2013 at 08:21:48PM +0800, Nazri Ramliy wrote: > This is similar in spirit to to "make -C dir ..." and "tar -C dir ...". > > Signed-off-by: Nazri Ramliy > --- > Often I find myself needing to find out quickly the status of a repository > that > is not in my currenct working direc

[PATCH] Teach git to change to a given directory using -C option

2013-04-19 Thread Nazri Ramliy
This is similar in spirit to to "make -C dir ..." and "tar -C dir ...". Signed-off-by: Nazri Ramliy --- Often I find myself needing to find out quickly the status of a repository that is not in my currenct working directory, like this: $ (cd ~/foo; git log -1) With this patch now i can