# [gitweb PATCH] add a 'diff to parent' option in the file history display

2 messages from 2005-10-23 to 2005-10-23. Participants: Brad Roberts.
Thread: https://gitlist.dev/t/2199

## Brad Roberts, 2005-10-23 15:25

Subject: [gitweb PATCH] add a 'diff to parent' option in the file history display
Message-ID: <Pine.LNX.4.44.0510230815570.2284-100000@bellevue.puremagic.com>
URL: https://gitlist.dev/e/Pine.LNX.4.44.0510230815570.2284-100000%40bellevue.puremagic.com

```
I'm not sure how well this plays with multiple parent merges or anything
complicated.  It seems to work well on a converted cvs archive.

Pullable from:  git://cvs.puremagic.com/git/gitweb.git

---------------------
add a 'diff to parent' option in the file history display

Signed-off-by: Brad Roberts <braddr@puremagic.com>
---

 gitweb.cgi |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

2539b424d62cc2ab060c5d2fa9525a6b6f8df7e5
diff --git a/gitweb.cgi b/gitweb.cgi
--- a/gitweb.cgi
+++ b/gitweb.cgi
@@ -2054,6 +2054,9 @@ sub git_history {
 				print " | " .
 				$cgi->a({-href => "$my_uri?p=$project;a=blobdiff;h=$blob;hp=$blob_parent;hb=$commit;f=$file_name"},
 				"diff to current");
+				print " | "
+				$cgi->a({-href => "$my_uri?p=$project;a=blobdiff;h=$blob_parent;hp=$3;hb=$commit;f=$file_name"},
+				"diff to parent");
 			}
 			print "</td>\n" .
 			      "</tr>\n";

```

## Brad Roberts, 2005-10-23 17:13

Subject: Re: [gitweb PATCH] add a 'diff to parent' option in the file history display
Message-ID: <Pine.LNX.4.44.0510231011200.2284-100000@bellevue.puremagic.com>
URL: https://gitlist.dev/e/Pine.LNX.4.44.0510231011200.2284-100000%40bellevue.puremagic.com
In-Reply-To: <Pine.LNX.4.44.0510230815570.2284-100000@bellevue.puremagic.com>

```
And of course I flub another patch.. the first new line there needs a
trailing '.'.  I've checked in that change to the repository below.

Also, both of these are on the 'brad-master' branch, not 'master'.

On Sun, 23 Oct 2005, Brad Roberts wrote:

> Date: Sun, 23 Oct 2005 08:25:05 -0700 (PDT)
> From: Brad Roberts <braddr@puremagic.com>
> To: git@vger.kernel.org
> Subject: [gitweb PATCH] add a 'diff to parent' option in the file history
>     display
>
> I'm not sure how well this plays with multiple parent merges or anything
> complicated.  It seems to work well on a converted cvs archive.
>
> Pullable from:  git://cvs.puremagic.com/git/gitweb.git
>
> ---------------------
> add a 'diff to parent' option in the file history display
>
> Signed-off-by: Brad Roberts <braddr@puremagic.com>
> ---
>
>  gitweb.cgi |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> 2539b424d62cc2ab060c5d2fa9525a6b6f8df7e5
> diff --git a/gitweb.cgi b/gitweb.cgi
> --- a/gitweb.cgi
> +++ b/gitweb.cgi
> @@ -2054,6 +2054,9 @@ sub git_history {
>  				print " | " .
>  				$cgi->a({-href => "$my_uri?p=$project;a=blobdiff;h=$blob;hp=$blob_parent;hb=$commit;f=$file_name"},
>  				"diff to current");
> +				print " | "
> +				$cgi->a({-href => "$my_uri?p=$project;a=blobdiff;h=$blob_parent;hp=$3;hb=$commit;f=$file_name"},
> +				"diff to parent");
>  			}
>  			print "</td>\n" .
>  			      "</tr>\n";
>
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

```
