* Git aliases executed from wrong dir
@ 2008-06-25 23:44 Kevin Ballard
2008-06-25 23:49 ` Kevin Ballard
2008-08-16 3:46 ` Jānis Rūcis
0 siblings, 2 replies; 3+ messages in thread
From: Kevin Ballard @ 2008-06-25 23:44 UTC (permalink / raw)
To: Git Mailing List
If I create an alias with `git config alias.foo '!pwd'` and then run
it from a subdirectory of my repo, it prints out the root of my repo.
This prevents the ability to create aliases that take filenames, as
they simply won't work if you try and reference a file from a
subdirectory.
--
Kevin Ballard
http://kevin.sb.org
kevin@sb.org
http://www.tildesoft.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Git aliases executed from wrong dir
2008-06-25 23:44 Git aliases executed from wrong dir Kevin Ballard
@ 2008-06-25 23:49 ` Kevin Ballard
2008-08-16 3:46 ` Jānis Rūcis
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Ballard @ 2008-06-25 23:49 UTC (permalink / raw)
To: Git Mailing List
To clarify, this only appears to affect shell aliases (i.e. ones that
start with !).
git config alias.foo 'ls-files'
Works fine from a subdir
git config alias.foo '!git ls-files'
Doesn't behave right from a subdir.
-Kevin Ballard
On Jun 25, 2008, at 4:44 PM, Kevin Ballard wrote:
> If I create an alias with `git config alias.foo '!pwd'` and then run
> it from a subdirectory of my repo, it prints out the root of my
> repo. This prevents the ability to create aliases that take
> filenames, as they simply won't work if you try and reference a file
> from a subdirectory.
>
> --
> Kevin Ballard
> http://kevin.sb.org
> kevin@sb.org
> http://www.tildesoft.com
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Kevin Ballard
http://kevin.sb.org
kevin@sb.org
http://www.tildesoft.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Git aliases executed from wrong dir
2008-06-25 23:44 Git aliases executed from wrong dir Kevin Ballard
2008-06-25 23:49 ` Kevin Ballard
@ 2008-08-16 3:46 ` Jānis Rūcis
1 sibling, 0 replies; 3+ messages in thread
From: Jānis Rūcis @ 2008-08-16 3:46 UTC (permalink / raw)
To: Kevin Ballard; +Cc: Git Mailing List
On Wed, Jun 25, 2008 at 04:44:49PM -0700, Kevin Ballard wrote:
> If I create an alias with `git config alias.foo '!pwd'` and then run it
> from a subdirectory of my repo, it prints out the root of my repo. This
> prevents the ability to create aliases that take filenames, as they
> simply won't work if you try and reference a file from a subdirectory.
Got bitten by the same problem. I have an alias for the
git-new-workdir script and I'm tracking some config files in my home
directory, but also have a bunch of Git repositories in
subdirectories. A "cd ..; git new-workdir old new" in one of these
tells me that "old" doesn't exist (because it doesn't exist in my home
dir which the alias ends up being invoked from) while a "git
new-workdir . ../new" works as expected.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-08-16 3:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-25 23:44 Git aliases executed from wrong dir Kevin Ballard
2008-06-25 23:49 ` Kevin Ballard
2008-08-16 3:46 ` Jānis Rūcis
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).