Skip to contentSkip to conversation

Two quick patches for guilt v0.30

PATCH In review Theodore Ts'o 3 participants 8 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Hi Jeff, here are two quick patches for guilt, versus v0.30. The second is needed for people using the latest git (on the master branch), so it'd be great if you could get this out.

Thanks, regards,

- Ted

#1 lore raw

PATCH 1/2 must_commit_first: Make sure the index is up to date

git diff-files can be confused if the index is not up to date, so make sure it is updated first.

---
 guilt |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
guilt +1 -0
index 50414a4..cdf4e9b 100755
@@ -495,6 +495,7 @@ s/^\([0-9]\{4\}\)-\([0-9]\{2\}\)-\([0-9]\{2\}\) \([0-9]\{2\}\):\([0-9]\{2\}\):\(
 # usage: must_commit_first
 must_commit_first()
 {
+	git update-index --refresh --unmerged -q > /dev/null
 	[ `git diff-files | wc -l` -eq 0 ]
 	return $?
 }
Signature · 1 line
1.5.6.1.205.ge2c7.dirty
#2 lore raw

PATCH 2/2 Make guilt work even after git-sh-setup is moved out of the user's path

---
 guilt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
guilt +1 -1
index cdf4e9b..d30d35a 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
Signature · 1 line
1.5.6.1.205.ge2c7.dirty
#3 lore raw

Re: [PATCH 2/2] Make guilt work even after git-sh-setup is moved out of the user's path

Quoted 10 lines · Theodore Ts'o
---
 guilt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
guilt +0 -0
index cdf4e9b..d30d35a 100755

guilt esac · line 26

Quoted 5 lines
guilt +1 -1
@@ -23,7 +23,7 @@ esac
 # we change directories ourselves
 SUBDIRECTORY_OK=1
 
-. git-sh-setup
+. $(git --exec-path)/git-sh-setup

This seems wrong.

jeffpc@freyr:~$ git --version
git version 1.5.6.2.247.g923712
jeffpc@freyr:~$ git --exec-path
/home/jeffpc/git-bin/bin

AFAICT, it should be:

/home/jeffpc/git-bin/libexec/git-core

(which contains git-sh-setup)

Josef 'Jeff' Sipek.

Signature · 2 lines
I think there is a world market for maybe five computers.
		- Thomas Watson, chairman of IBM, 1943.
#4 lore raw

Re: [PATCH 2/2] Make guilt work even after git-sh-setup is moved out of the user's path

Quoted 19 lines · Josef 'Jeff' Sipek
Quoted 10 lines · Theodore Ts'o
---
 guilt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
guilt +0 -0
index cdf4e9b..d30d35a 100755

guilt esac · line 26

Quoted 5 lines
guilt +1 -1
@@ -23,7 +23,7 @@ esac
 # we change directories ourselves
 SUBDIRECTORY_OK=1
 
-. git-sh-setup
+. $(git --exec-path)/git-sh-setup

This seems wrong.

Quoted 4 lines
jeffpc@freyr:~$ git --version
git version 1.5.6.2.247.g923712
jeffpc@freyr:~$ git --exec-path
/home/jeffpc/git-bin/bin

Hmm, it is yours that look wrong.

With 1.6.0 preview (aka 'master'):

$ git --version
git version 1.5.6.2.255.gbed62
$ git --exec-path
/home/junio/git-master/libexec/git-core

With 1.5.6 maintenance track (aka 'maint'):

$ ~/git-maint/bin/git --version
git version 1.5.6.2.15.g39f31
$ ~/git-maint/bin/git --exec-path
/home/junio/git-maint/bin
#5 lore raw

Re: [PATCH 2/2] Make guilt work even after git-sh-setup is moved out of the user's path

Quoted 1 line · Junio C Hamano

"Josef 'Jeff' Sipek" <[email protected]> writes:

...

Quoted 6 lines
Quoted 4 lines
jeffpc@freyr:~$ git --version
git version 1.5.6.2.247.g923712
jeffpc@freyr:~$ git --exec-path
/home/jeffpc/git-bin/bin

Hmm, it is yours that look wrong.

Ok.

Quoted 4 lines

With 1.6.0 preview (aka 'master'):

$ git --version
git version 1.5.6.2.255.gbed62

A fresh clone (from master.kernel.org over ssh) gets me:

$ git describe
v1.5.6.2-247-g9237122
$ git --version
git version 1.5.6.GIT
$ git --exec-path
/home/jeffpc/git-bin/bin

You seem to have a different HEAD for the master branch than I do.

Josef 'Jeff' Sipek.

Signature · 1 line
Don't drink and derive. Alcohol and algebra don't mix.
#6 lore raw

Re: [PATCH 2/2] Make guilt work even after git-sh-setup is moved out of the user's path

Quoted 10 lines · Josef 'Jeff' Sipek

A fresh clone (from master.kernel.org over ssh) gets me:

$ git describe
v1.5.6.2-247-g9237122
$ git --version
git version 1.5.6.GIT
$ git --exec-path
/home/jeffpc/git-bin/bin

You seem to have a different HEAD for the master branch than I do.

Oh, my private 'master' almost always is ahead of the public one after work.

But I do not have any new changes around this area lately. Promise ;-).

#7 lore raw

Re: [PATCH 2/2] Make guilt work even after git-sh-setup is moved out of the user's path

Quoted 11 lines · Junio C Hamano
Quoted 9 lines · Josef 'Jeff' Sipek

A fresh clone (from master.kernel.org over ssh) gets me:

$ git describe
v1.5.6.2-247-g9237122
$ git --version
git version 1.5.6.GIT
$ git --exec-path
/home/jeffpc/git-bin/bin
Quoted 6 lines
Quoted 1 line

You seem to have a different HEAD for the master branch than I do.

Oh, my private 'master' almost always is ahead of the public one after work.

But I do not have any new changes around this area lately. Promise ;-).

Heh.

Alright, mystery solved. I had a GIT_EXEC_PATH set. Removing it from my bash_profile makes everything work just fine.

Sorry for the noise.

Jeff.

Signature · 1 line
Penguin : Linux version 2.6.25.4 on an i386 machine (6135.77 BogoMips).