Two quick patches for guilt v0.30
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
threads / patch / 14333
Subject: [PATCH 1/2] must_commit_first: Make sure the index is up to date
Two quick patches for guilt v0.30
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
git diff-files can be confused if the index is not up to date, so make sure it is updated first.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> --- guilt | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/guilt b/guilt index 50414a4..cdf4e9b 100755 --- a/guilt +++ b/guilt @@ -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 $? }
-- 1.5.6.1.205.ge2c7.dirty
[PATCH 2/2] Make guilt work even after git-sh-setup is moved out of the user's path
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> --- guilt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/guilt b/guilt index cdf4e9b..d30d35a 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
-- 1.5.6.1.205.ge2c7.dirty
Re: [PATCH 2/2] Make guilt work even after git-sh-setup is moved out of the user's path
On Mon, Jul 07, 2008 at 08:03:12PM -0400, Theodore Ts'o wrote:
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> > --- > guilt | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/guilt b/guilt > index cdf4e9b..d30d35a 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
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.
-- I think there is a world market for maybe five computers. - Thomas Watson, chairman of IBM, 1943.
Re: [PATCH 2/2] Make guilt work even after git-sh-setup is moved out of the user's path
"Josef 'Jeff' Sipek" <jeffpc@josefsipek.net> writes:
> On Mon, Jul 07, 2008 at 08:03:12PM -0400, Theodore Ts'o wrote: >> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> >> --- >> guilt | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/guilt b/guilt >> index cdf4e9b..d30d35a 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 > > 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
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
Re: [PATCH 2/2] Make guilt work even after git-sh-setup is moved out of the user's path
On Mon, Jul 07, 2008 at 05:56:54PM -0700, Junio C Hamano wrote:
> "Josef 'Jeff' Sipek" <jeffpc@josefsipek.net> writes:
...
> > 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.
> 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.
-- Don't drink and derive. Alcohol and algebra don't mix.
Re: [PATCH 2/2] Make guilt work even after git-sh-setup is moved out of the user's path
"Josef 'Jeff' Sipek" <jeffpc@josefsipek.net> writes:
> 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 ;-).
Re: [PATCH 2/2] Make guilt work even after git-sh-setup is moved out of the user's path
On Mon, Jul 07, 2008 at 06:17:19PM -0700, Junio C Hamano wrote:
> "Josef 'Jeff' Sipek" <jeffpc@josefsipek.net> writes: > > > 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 ;-).
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.
-- Penguin : Linux version 2.6.25.4 on an i386 machine (6135.77 BogoMips).