Skip to contentSkip to conversation

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

PATCH In review Alex Chiang 4 participants 4 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 guilt(1): fix path to git-sh-setup

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.

---

guilt +1 -1
index 50414a4..ba4593a 100755
@@ -23,7 +23,7 @@ esac
 # we change directories ourselves
 SUBDIRECTORY_OK=1
 
-. git-sh-setup
+. `git --exec-path`/git-sh-setup
 
 #
 # Git version check
#1 lore raw

guilt esac · line 26

Quoted 10 lines · Alex Chiang
guilt +1 -1
index 50414a4..ba4593a 100755
@@ -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

#2 lore raw

Hi,

Quoted 9 lines · Petr Baudis
Quoted 8 lines · Alex Chiang
guilt +0 -0
index 50414a4..ba4593a 100755
@@ -23,7 +23,7 @@ esac
 # we change directories ourselves
 SUBDIRECTORY_OK=1
 
Quoted 4 lines

guilt esac · line 26

Quoted 2 lines
guilt +1 -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

#3 lore raw
In reply to Alex Chiang
Quoted 4 lines · Alex Chiang

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"

Signature · 4 lines
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