# wrong expectation from "git log -p"

6 messages from 2009-06-02 to 2009-07-05. Participants: Thomas Spura, Junio C Hamano, Todd Zullinger, Thomas Rast, Eric Wong.
Thread: https://gitlist.dev/t/19632

## Thomas Spura, 2009-06-02 00:34

Subject: wrong expectation from "git log -p"
Message-ID: <pan.2009.06.02.00.34.36@fedoraproject.org>
URL: https://gitlist.dev/e/pan.2009.06.02.00.34.36%40fedoraproject.org

```
If running "git log -p parse-options.*", the last commit is 
df217ed6430efe444a09fffdafd39720ae3f9864
There are the changes this commit makes towards parse-options.*.

I was expecting to see the full commit with all changes and not only 
towards the 2 files - only including the two files.

Is my expactation wrong or is this a bug?

	Thomas

```

## Junio C Hamano, 2009-06-02 00:54

Subject: Re: wrong expectation from "git log -p"
Message-ID: <7vzlcrihew.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vzlcrihew.fsf%40alter.siamese.dyndns.org
In-Reply-To: <pan.2009.06.02.00.34.36@fedoraproject.org>

```
Thomas Spura <tomspur@fedoraproject.org> writes:

> If running "git log -p parse-options.*", the last commit is 
> df217ed6430efe444a09fffdafd39720ae3f9864
> There are the changes this commit makes towards parse-options.*.
>
> I was expecting to see the full commit with all changes and not only 
> towards the 2 files - only including the two files.
>
> Is my expactation wrong or is this a bug?

Time to run "man git-log" and look for --full-diff, perhaps?

```

## Todd Zullinger, 2009-06-03 12:22

Subject: [PATCH] completion: Add --full-diff to log/gitk options
Message-ID: <20090603122230.GZ28808@inocybe.localdomain>
URL: https://gitlist.dev/e/20090603122230.GZ28808%40inocybe.localdomain
In-Reply-To: <7vzlcrihew.fsf@alter.siamese.dyndns.org>

```
Signed-off-by: Todd Zullinger <tmz@pobox.com>
---

Junio C Hamano wrote:
> Thomas Spura <tomspur@fedoraproject.org> writes:
>
>> If running "git log -p parse-options.*", the last commit is
>> df217ed6430efe444a09fffdafd39720ae3f9864
>> There are the changes this commit makes towards parse-options.*.
>>
>> I was expecting to see the full commit with all changes and not only
>> towards the 2 files - only including the two files.
>>
>> Is my expactation wrong or is this a bug?
>
> Time to run "man git-log" and look for --full-diff, perhaps?

While this patch won't do much to help people find the option, perhaps
those who learn about it will appreciate not having to type it. :)

I *think* __git_log_gitk_options is the proper place for it, but it's
early in the a.m. and I'm not averse to being proved wrong.

 contrib/completion/git-completion.bash |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 0c8bb53..2b291ea 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1117,7 +1117,7 @@ __git_log_common_options="
 "
 # Options that go well for log and gitk (not shortlog)
 __git_log_gitk_options="
-	--dense --sparse --full-history
+	--dense --sparse --full-diff --full-history
 	--simplify-merges --simplify-by-decoration
 	--left-right
 "
-- 
1.6.3.1

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Going to hell when I die would just be redundant.

```

## Thomas Rast, 2009-06-03 14:30

Subject: Re: [PATCH] completion: Add --full-diff to log/gitk options
Message-ID: <200906031630.09962.trast@student.ethz.ch>
URL: https://gitlist.dev/e/200906031630.09962.trast%40student.ethz.ch
In-Reply-To: <20090603122230.GZ28808@inocybe.localdomain>

```
Todd Zullinger wrote:
> I *think* __git_log_gitk_options is the proper place for it, but it's
> early in the a.m. and I'm not averse to being proved wrong.
[...]
>  # Options that go well for log and gitk (not shortlog)
>  __git_log_gitk_options="
> -	--dense --sparse --full-history
> +	--dense --sparse --full-diff --full-history

Gitk has its own setting in the Preferences called "limit diffs to
listed paths", and ignores this option, so it should go directly in
_git_log.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

```

## Todd Zullinger, 2009-06-03 20:20

Subject: [PATCH v2] completion: Add --full-diff to log options
Message-ID: <20090603202058.GA28808@inocybe.localdomain>
URL: https://gitlist.dev/e/20090603202058.GA28808%40inocybe.localdomain
In-Reply-To: <200906031630.09962.trast@student.ethz.ch>

```
Signed-off-by: Todd Zullinger <tmz@pobox.com>
---

Thomas Rast wrote:
> Todd Zullinger wrote:
>> I *think* __git_log_gitk_options is the proper place for it, but it's
>> early in the a.m. and I'm not averse to being proved wrong.
> [...]
>>  # Options that go well for log and gitk (not shortlog)
>>  __git_log_gitk_options="
>> -	--dense --sparse --full-history
>> +	--dense --sparse --full-diff --full-history
>
> Gitk has its own setting in the Preferences called "limit diffs to
> listed paths", and ignores this option, so it should go directly in
> _git_log.

Ahh, thanks Thomas.

 contrib/completion/git-completion.bash |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 98b9cbe..79a99af 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1157,7 +1157,7 @@ _git_log ()
 			$__git_log_shortlog_options
 			$__git_log_gitk_options
 			--root --topo-order --date-order --reverse
-			--follow
+			--follow --full-diff
 			--abbrev-commit --abbrev=
 			--relative-date --date=
 			--pretty= --format= --oneline
-- 
1.6.3.1

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I have to decide between two equally frightening options.  If I wanted
to do that, I'd vote.
    -- Duckman

```

## Eric Wong, 2009-07-05 08:35

Subject: Re: [PATCH v2] completion: Add --full-diff to log options
Message-ID: <20090705083501.GA13068@dcvr.yhbt.net>
URL: https://gitlist.dev/e/20090705083501.GA13068%40dcvr.yhbt.net
In-Reply-To: <20090603202058.GA28808@inocybe.localdomain>

```
Todd Zullinger <tmz@pobox.com> wrote:
> Signed-off-by: Todd Zullinger <tmz@pobox.com>

I was just missing this completion for "git log" myself.

Acked-by: Eric Wong <normalperson@yhbt.net>

> ---
>  contrib/completion/git-completion.bash |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 98b9cbe..79a99af 100755
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1157,7 +1157,7 @@ _git_log ()
>  			$__git_log_shortlog_options
>  			$__git_log_gitk_options
>  			--root --topo-order --date-order --reverse
> -			--follow
> +			--follow --full-diff
>  			--abbrev-commit --abbrev=
>  			--relative-date --date=
>  			--pretty= --format= --oneline
> -- 

```
