git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* using aliases within the subdirectory
@ 2011-04-13 10:24 Matej Batic
  2011-04-13 12:18 ` Michael J Gruber
  0 siblings, 1 reply; 3+ messages in thread
From: Matej Batic @ 2011-04-13 10:24 UTC (permalink / raw)
  To: git

Dear all,

I am facing a problem, noted previously in
    
http://git.661346.n2.nabble.com/git-alias-always-chdir-to-top-td1609456.html  

    http://kerneltrap.org/mailarchive/git/2010/5/5/29818/thread
which in practice means that I cannot pass the " -- 
relative_path_to_some_file_in_the_tree" argument to my alias.

Is there any way to get the current working dir before git changes dir 
to root directory?

Best regards,
Matej

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: using aliases within the subdirectory
  2011-04-13 10:24 using aliases within the subdirectory Matej Batic
@ 2011-04-13 12:18 ` Michael J Gruber
       [not found]   ` <4DA5965C.8050501@ge.infn.it>
  0 siblings, 1 reply; 3+ messages in thread
From: Michael J Gruber @ 2011-04-13 12:18 UTC (permalink / raw)
  To: Matej Batic; +Cc: git

Matej Batic venit, vidit, dixit 13.04.2011 12:24:
> Dear all,
> 
> I am facing a problem, noted previously in
>     
> http://git.661346.n2.nabble.com/git-alias-always-chdir-to-top-td1609456.html  
> 
>     http://kerneltrap.org/mailarchive/git/2010/5/5/29818/thread
> which in practice means that I cannot pass the " -- 
> relative_path_to_some_file_in_the_tree" argument to my alias.
> 
> Is there any way to get the current working dir before git changes dir 
> to root directory?
> 
> Best regards,
> Matej

This may depend on your shell and rc files, but for me, $PWD gives the
original current working dir.

Also, revisiting that topic after 1.7.5 seems worthwhile.

Michael

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: using aliases within the subdirectory
       [not found]   ` <4DA5965C.8050501@ge.infn.it>
@ 2011-04-13 12:42     ` Michael J Gruber
  0 siblings, 0 replies; 3+ messages in thread
From: Michael J Gruber @ 2011-04-13 12:42 UTC (permalink / raw)
  To: Matej Batic; +Cc: Git Mailing List

Matej Batic venit, vidit, dixit 13.04.2011 14:26:
> Michael J Gruber wrote:
>> Matej Batic venit, vidit, dixit 13.04.2011 12:24:
>>   
>>> Dear all,
>>>
>>> I am facing a problem, noted previously in
>>>     
>>> http://git.661346.n2.nabble.com/git-alias-always-chdir-to-top-td1609456.html  
>>>
>>>     http://kerneltrap.org/mailarchive/git/2010/5/5/29818/thread
>>> which in practice means that I cannot pass the " -- 
>>> relative_path_to_some_file_in_the_tree" argument to my alias.
>>>
>>> Is there any way to get the current working dir before git changes dir 
>>> to root directory?
>>>
>>> Best regards,
>>> Matej
>>>     
>>
>> This may depend on your shell and rc files, but for me, $PWD gives the
>> original current working dir.
>>
>> Also, revisiting that topic after 1.7.5 seems worthwhile.
>>
>> Michael
>>   
> 
> Well, that does not work for me:
> [alias]
>     pwd = "!sh -c 'echo $PWD'"
> 
> git pwd inside tree subdirectory will print git root directory with git 
> version 1.7.3.4 and also with 1.7.4.1.

I had only tried "pwd = !env" to check the environment which is passed
(and that has the PWD from the subdir). So, I guess you'd need to have a
second look at that topic.

Michael

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-04-13 12:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-13 10:24 using aliases within the subdirectory Matej Batic
2011-04-13 12:18 ` Michael J Gruber
     [not found]   ` <4DA5965C.8050501@ge.infn.it>
2011-04-13 12:42     ` Michael J Gruber

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