* [PATCH] Revert "git gui: show diffs with a minimum of 1 context line"
@ 2009-05-23 17:28 Markus Heidelberg
2009-05-23 23:16 ` Clemens Buchacher
0 siblings, 1 reply; 3+ messages in thread
From: Markus Heidelberg @ 2009-05-23 17:28 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: Clemens Buchacher, git, Markus Heidelberg
This reverts commit 55ba8a3474102eb8d638834d2b9bfe58d5014a40.
Conflicts:
lib/option.tcl
Diffs without context can actually be useful. Depending on the changes
it can be less distracting to read them or to get an overview.
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
---
git-gui.sh | 2 +-
lib/diff.tcl | 2 +-
lib/option.tcl | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/git-gui.sh b/git-gui.sh
index 14b92ba..604fdad 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -2287,7 +2287,7 @@ proc show_more_context {} {
proc show_less_context {} {
global repo_config
- if {$repo_config(gui.diffcontext) > 1} {
+ if {$repo_config(gui.diffcontext) >= 1} {
incr repo_config(gui.diffcontext) -1
reshow_diff
}
diff --git a/lib/diff.tcl b/lib/diff.tcl
index 925b3f5..71b250b 100644
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
@@ -282,7 +282,7 @@ proc start_show_diff {cont_info {add_opts {}}} {
lappend cmd -p
lappend cmd --no-color
- if {$repo_config(gui.diffcontext) >= 1} {
+ if {$repo_config(gui.diffcontext) >= 0} {
lappend cmd "-U$repo_config(gui.diffcontext)"
}
if {$w eq $ui_index} {
diff --git a/lib/option.tcl b/lib/option.tcl
index 1d55b49..eb216f6 100644
--- a/lib/option.tcl
+++ b/lib/option.tcl
@@ -149,7 +149,7 @@ proc do_options {} {
{b gui.fastcopyblame {mc "Blame Copy Only On Changed Files"}}
{i-20..200 gui.copyblamethreshold {mc "Minimum Letters To Blame Copy On"}}
{i-0..300 gui.blamehistoryctx {mc "Blame History Context Radius (days)"}}
- {i-1..99 gui.diffcontext {mc "Number of Diff Context Lines"}}
+ {i-0..99 gui.diffcontext {mc "Number of Diff Context Lines"}}
{i-0..99 gui.commitmsgwidth {mc "Commit Message Text Width"}}
{t gui.newbranchtemplate {mc "New Branch Name Template"}}
{c gui.encoding {mc "Default File Contents Encoding"}}
--
1.6.3.1.160.g45b30
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Revert "git gui: show diffs with a minimum of 1 context line"
2009-05-23 17:28 [PATCH] Revert "git gui: show diffs with a minimum of 1 context line" Markus Heidelberg
@ 2009-05-23 23:16 ` Clemens Buchacher
2009-05-24 10:01 ` Markus Heidelberg
0 siblings, 1 reply; 3+ messages in thread
From: Clemens Buchacher @ 2009-05-23 23:16 UTC (permalink / raw)
To: Markus Heidelberg; +Cc: Shawn O. Pearce, git
On Sat, May 23, 2009 at 07:28:47PM +0200, Markus Heidelberg wrote:
> Diffs without context can actually be useful. Depending on the changes
> it can be less distracting to read them or to get an overview.
Maybe so. But as stated in the commit message of 55ba8a3 (git gui: show
diffs with a minimum of 1 context line) context-less diff was disabled
because it caused bugs with staging. However, I never got around to fix the
real cause of the problem. See the original thread at
http://article.gmane.org/gmane.comp.version-control.git/94387
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Revert "git gui: show diffs with a minimum of 1 context line"
2009-05-23 23:16 ` Clemens Buchacher
@ 2009-05-24 10:01 ` Markus Heidelberg
0 siblings, 0 replies; 3+ messages in thread
From: Markus Heidelberg @ 2009-05-24 10:01 UTC (permalink / raw)
To: Clemens Buchacher; +Cc: Shawn O. Pearce, git
Clemens Buchacher, 24.05.2009:
> On Sat, May 23, 2009 at 07:28:47PM +0200, Markus Heidelberg wrote:
> > Diffs without context can actually be useful. Depending on the changes
> > it can be less distracting to read them or to get an overview.
>
> Maybe so. But as stated in the commit message of 55ba8a3 (git gui: show
> diffs with a minimum of 1 context line) context-less diff was disabled
> because it caused bugs with staging.
It wasn't clear to me that there were bugs. I thought it just "does not
work" in some way, but should have tried it at least. Now I see.
> However, I never got around to fix the
> real cause of the problem. See the original thread at
>
> http://article.gmane.org/gmane.comp.version-control.git/94387
Thanks for the link. After reading this discussion I also see that
disabling staging with zero context is not a user-friendly solution.
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-05-24 10:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-23 17:28 [PATCH] Revert "git gui: show diffs with a minimum of 1 context line" Markus Heidelberg
2009-05-23 23:16 ` Clemens Buchacher
2009-05-24 10:01 ` Markus Heidelberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).