threads / patch / 14499

patchguilt(1): fix path to git-sh-setup

Subject: [PATCH] guilt(1): fix path to git-sh-setup

## tl;dr

4 messages between Jul 16, 2008 and Jul 17, 2008. Diffs are folded; open one to read it.

replies: 3people: 4as markdown or json

Alex Chiang· Jul 16, 2008, 23:23 UTC · lore
git is in the process of moving subcommands to /usr/libexec/git-core

This move breaks an assumption in guilt about the location of git-sh-setup.

We can ask git for where it thinks its executables live.
Signed-off-by: Alex Chiang <achiang@hp.com>
---
Show changes to guilt +1 −1
diff --git a/guilt b/guilt
index 50414a4..ba4593a 100755
--- a/guilt
+++ b/guilt
@@ -23,7 +23,7 @@ esac
 # we change directories ourselves
 SUBDIRECTORY_OK=1
 
-. git-sh-setup
+. `git --exec-path`/git-sh-setup
 
 #
 # Git version check
Petr Baudis· Jul 17, 2008, 10:02 UTC · re: Alex Chiang · lore

Re: [PATCH] guilt(1): fix path to git-sh-setup

On Wed, Jul 16, 2008 at 05:23:39PM -0600, Alex Chiang wrote:
Show 10 quoted lines
> diff --git a/guilt b/guilt
> index 50414a4..ba4593a 100755
> --- a/guilt
> +++ b/guilt
> @@ -23,7 +23,7 @@ esac
>  # we change directories ourselves
>  SUBDIRECTORY_OK=1
>  
> -. git-sh-setup
> +. `git --exec-path`/git-sh-setup
Beware of the proverbial "/Program Files/Git" location, however.
				Petr "Pasky" Baudis
Johannes Schindelin· Jul 17, 2008, 11:58 UTC · re: Petr Baudis · lore

Re: [PATCH] guilt(1): fix path to git-sh-setup

Hi,
On Thu, 17 Jul 2008, Petr Baudis wrote:
Show 13 quoted lines
> On Wed, Jul 16, 2008 at 05:23:39PM -0600, Alex Chiang wrote:
> > diff --git a/guilt b/guilt
> > index 50414a4..ba4593a 100755
> > --- a/guilt
> > +++ b/guilt
> > @@ -23,7 +23,7 @@ esac
> >  # we change directories ourselves
> >  SUBDIRECTORY_OK=1
> >  
> > -. git-sh-setup
> > +. `git --exec-path`/git-sh-setup
> 
> Beware of the proverbial "/Program Files/Git" location, however.

Indeed. And when trying to stray not _too_ far away from the coding style of git.git, avoid the backticks, too, like so:

	. "$(git --exec-path)"/git-sh-setup

Ciao, Dscho

Josef 'Jeff' Sipek· Jul 17, 2008, 14:53 UTC · re: Alex Chiang · lore

Re: [PATCH] guilt(1): fix path to git-sh-setup

On Wed, Jul 16, 2008 at 05:23:39PM -0600, Alex Chiang wrote:
> git is in the process of moving subcommands to /usr/libexec/git-core
> 
> This move breaks an assumption in guilt about the location of
> git-sh-setup.
 
I already have a fix for this queued up.
Thanks anyway,
Josef 'Jeff' Sipek.

P.S. Pasky: good catch, I'll check the queued up patch to make sure it's not "broken"

-- 
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like
that.
		- Linus Torvalds

← back to recent threads