threads / patch / 28538

patchgitk: Show patch for initial commit

Subject: [PATCH] gitk: Show patch for initial commit

## tl;dr

4 messages between Sep 30, 2011 and Oct 1, 2011. Diffs are folded; open one to read it.

replies: 3people: 3as markdown or json

Marcus Karlsson· Sep 30, 2011, 21:50 UTC · lore
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(-)
Show changes to gitk-git/gitk +1 −1
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· Oct 1, 2011, 09:54 UTC · re: Marcus Karlsson · lore

Re: [PATCH] gitk: Show patch for initial commit

On 09/30/2011 11:50 PM, Marcus Karlsson wrote:
Show 20 quoted lines
> 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· Oct 1, 2011, 18:42 UTC · re: Zbigniew Jędrzejewski-Szmek · lore

Re: [PATCH] gitk: Show patch for initial commit

On Sat, Oct 01, 2011 at 11:54:11AM +0200, Zbigniew J??drzejewski-Szmek wrote:
Show 24 quoted lines
> 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· Oct 1, 2011, 20:20 UTC · re: Marcus Karlsson · lore

Re: [PATCH] gitk: Show patch for initial commit

Marcus Karlsson <mk@acc.umu.se> writes:
Show 19 quoted lines
>> >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.

← back to recent threads