# [PATCH] gitk: Show patch for initial commit

4 messages from 2011-09-30 to 2011-10-01. Participants: Marcus Karlsson, Zbigniew Jędrzejewski-Szmek, Junio C Hamano.
Thread: https://gitlist.dev/t/28538

## Marcus Karlsson, 2011-09-30 21:50

Subject: [PATCH] gitk: Show patch for initial commit
Message-ID: <20110930215021.GA3005@kennedy.acc.umu.se>
URL: https://gitlist.dev/e/20110930215021.GA3005%40kennedy.acc.umu.se

```
Make gitk show the patch for the initial commit.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>
---
 gitk-git/gitk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gitk-git/gitk b/gitk-git/gitk
index 4cde0c4..20aeae6 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -7436,7 +7436,7 @@ proc diffcmd {ids flags} {
 	    lappend cmd HEAD
 	}
     } else {
-	set cmd [concat | git diff-tree -r $flags $ids]
+	set cmd [concat | git diff-tree -r --root $flags $ids]
     }
     return $cmd
 }
-- 
1.7.7.rc3.4.g8d714

```

## Zbigniew Jędrzejewski-Szmek, 2011-10-01 09:54

Subject: Re: [PATCH] gitk: Show patch for initial commit
Message-ID: <4E86E343.5070704@in.waw.pl>
URL: https://gitlist.dev/e/4E86E343.5070704%40in.waw.pl
In-Reply-To: <20110930215021.GA3005@kennedy.acc.umu.se>

```
On 09/30/2011 11:50 PM, Marcus Karlsson wrote:
> Make gitk show the patch for the initial commit.
>
> Signed-off-by: Marcus Karlsson<mk@acc.umu.se>
> ---
>   gitk-git/gitk |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/gitk-git/gitk b/gitk-git/gitk
> index 4cde0c4..20aeae6 100755
> --- a/gitk-git/gitk
> +++ b/gitk-git/gitk
> @@ -7436,7 +7436,7 @@ proc diffcmd {ids flags} {
>   	    lappend cmd HEAD
>   	}
>       } else {
> -	set cmd [concat | git diff-tree -r $flags $ids]
> +	set cmd [concat | git diff-tree -r --root $flags $ids]
>       }
>       return $cmd
>   }
Cool, this works for me! But I think I would be really nice if gitk 
respected the configuration value of log.showroot. This would give nice 
consistency amongst the various tools.

Zbyszek

```

## Marcus Karlsson, 2011-10-01 18:42

Subject: Re: [PATCH] gitk: Show patch for initial commit
Message-ID: <20111001184216.GA5796@kennedy.acc.umu.se>
URL: https://gitlist.dev/e/20111001184216.GA5796%40kennedy.acc.umu.se
In-Reply-To: <4E86E343.5070704@in.waw.pl>

```
On Sat, Oct 01, 2011 at 11:54:11AM +0200, Zbigniew J??drzejewski-Szmek wrote:
> On 09/30/2011 11:50 PM, Marcus Karlsson wrote:
> >Make gitk show the patch for the initial commit.
> >
> >Signed-off-by: Marcus Karlsson<mk@acc.umu.se>
> >---
> >  gitk-git/gitk |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> >diff --git a/gitk-git/gitk b/gitk-git/gitk
> >index 4cde0c4..20aeae6 100755
> >--- a/gitk-git/gitk
> >+++ b/gitk-git/gitk
> >@@ -7436,7 +7436,7 @@ proc diffcmd {ids flags} {
> >  	    lappend cmd HEAD
> >  	}
> >      } else {
> >-	set cmd [concat | git diff-tree -r $flags $ids]
> >+	set cmd [concat | git diff-tree -r --root $flags $ids]
> >      }
> >      return $cmd
> >  }
> Cool, this works for me! But I think I would be really nice if gitk
> respected the configuration value of log.showroot. This would give
> nice consistency amongst the various tools.

I agree, that would be reasonable. I'll prepare a new patch with that
behavior.

Marcus

```

## Junio C Hamano, 2011-10-01 20:20

Subject: Re: [PATCH] gitk: Show patch for initial commit
Message-ID: <7vaa9kmpk3.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vaa9kmpk3.fsf%40alter.siamese.dyndns.org
In-Reply-To: <20111001184216.GA5796@kennedy.acc.umu.se>

```
Marcus Karlsson <mk@acc.umu.se> writes:

>> >diff --git a/gitk-git/gitk b/gitk-git/gitk
>> >index 4cde0c4..20aeae6 100755
>> >--- a/gitk-git/gitk
>> >+++ b/gitk-git/gitk
>> >@@ -7436,7 +7436,7 @@ proc diffcmd {ids flags} {
>> >  	    lappend cmd HEAD
>> >  	}
>> >      } else {
>> >-	set cmd [concat | git diff-tree -r $flags $ids]
>> >+	set cmd [concat | git diff-tree -r --root $flags $ids]
>> >      }
>> >      return $cmd
>> >  }
>> Cool, this works for me! But I think I would be really nice if gitk
>> respected the configuration value of log.showroot. This would give
>> nice consistency amongst the various tools.
>
> I agree, that would be reasonable. I'll prepare a new patch with that
> behavior.

That would be good, but whatever you do please keep the maintainer of
gitk, Paul Mackerras <paulus@samba.org>, in the loop.

```
