* Re: Heads up: major rebase -i -p rework coming up
From: Sverre Rabbelier @ 2009-01-25 15:07 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Jakub Narebski, git
In-Reply-To: <alpine.DEB.1.00.0901251509550.14855@racer>
Heya,
On Sun, Jan 25, 2009 at 15:17, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
>> >> merge (B) A # Merge...
>> > merge B parent A' # Merge...
>> merge B with A' # Merge...
> merge B Merge bla/blub
> parent A' bla/blub
Oh goody, more painting! I was wondering when the next pick-a-word
contest would be!
--
Cheers,
Sverre Rabbelier
^ permalink raw reply
* Re: Heads up: major rebase -i -p rework coming up
From: Johannes Schindelin @ 2009-01-25 15:24 UTC (permalink / raw)
To: Sverre Rabbelier; +Cc: Jakub Narebski, git
In-Reply-To: <bd6139dc0901250707m5e1898cdu530a0d7566ca2da5@mail.gmail.com>
Hi,
On Sun, 25 Jan 2009, Sverre Rabbelier wrote:
> On Sun, Jan 25, 2009 at 15:17, Johannes Schindelin
> <Johannes.Schindelin@gmx.de> wrote:
> >> >> merge (B) A # Merge...
> >> > merge B parent A' # Merge...
> >> merge B with A' # Merge...
> > merge B Merge bla/blub
> > parent A' bla/blub
>
> Oh goody, more painting! I was wondering when the next pick-a-word
> contest would be!
In this case, it is not about painting. I will gladly ignore all those
who think they must submit a new word for this action.
The thing is: I want the command to be intuitive, so I need a syntax where
even the most idiotic dullard will understand what are the parents, and
why we need the original merge's commit name, too.
So maybe I answered my question myself:
merge parents $sha1 [$sha1...] original $sha1 $msg
Ciao,
Dscho
^ permalink raw reply
* Re: Heads up: major rebase -i -p rework coming up
From: Jakub Narebski @ 2009-01-25 16:22 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git, Thomas Rast
In-Reply-To: <alpine.DEB.1.00.0901251509550.14855@racer>
On Sun, 25 Jan 2009, Johannes Schindelin wrote:
> Hi,
>
> [please do not forget to Cc: me; today is a slow day, so I did not miss
> your mail, but that is definitely not true on other days.]
This was spur of the moment idea, one that I wouldn't mind if you
would miss it.
But now that you have something interesting to say, I'll re-added
CC list for this thread.
> On Sun, 25 Jan 2009, Jakub Narebski wrote:
>> Johannes Schindelin wrote:
>>
>>>> Hmm. You're right, that is not really intuitive. How about
>>>>
>>>> merge (B) A # Merge...
>>>>
>>>> instead?
>>>
>>> Or even better:
>>>
>>> merge B parent A' # Merge...
>>
>> merge B with A' # Merge...
>
> No, that does not catch the meaning.
Errr... I didn't mean for 'with' to mean 'into'.
> B is the _original_ merge commit. So it actually knows what parents it
> has, but we want to give the user the freedom to change those parents.
>
> The first parent is easy: this will be HEAD at that stage.
>
> The other parents will be relatively easy: just replace A' by something
> else.
>
> _However_ now that the merge commit B will be _redone_, we _still_ want to
> be able to refer to it later in the rebase script. Therefore, rebase has
> to know that we _redid_ B at this stage.
>
> Another idea:
>
> merge B Merge bla/blub
> parent A' bla/blub
It would be good idea... even better if 'p' shortcut was not taken
by 'pick'...
This is similar to your earlier idea:
merge 9383af1' was f39d50a Merge branch 'mh/unify-color' into next
# \ 9383af1 Revert previous two commits
Or perhaps:
merge A' D' into B Merge bla/blub
--
Jakub Narebski
Poland
^ permalink raw reply
* Re: [PATCH] git-svn: add --ignore-paths option for fetching
From: public_vi @ 2009-01-25 16:29 UTC (permalink / raw)
To: Thomas Rast; +Cc: git, normalperson
In-Reply-To: <200901251521.15591.trast@student.ethz.ch>
It is useful for me, but I think I can be useful for others too.
May be it's better to make in inclusive, i.e. "--only-matching=<regex>"?
> This would be a good place to explain why this is useful, and (if
> applicable) why you chose to implement it the way you did.
>
OK, fixing them.
> You put the --ignore-paths explanation in the middle of the
> --localtime documentation (the last paragraph quoted still talks about
> --localtime).
>
> This is the first function in git-svn.perl using camelCase. Consider
> sticking to the current style and spelling it is_path_ignored().
>
> You broke the symmetry here, while all other hunks just add an
> equivalent check to the existing in_dot_git().
>
> However, the latter makes me wonder if it would be cleaner to move the
> in_dot_git() test to isPathIgnored (er, is_path_ignored) too?
>
^ permalink raw reply
* Re: Heads up: major rebase -i -p rework coming up
From: Björn Steinbrink @ 2009-01-25 17:18 UTC (permalink / raw)
To: Jakub Narebski; +Cc: Johannes Schindelin, git, Thomas Rast
In-Reply-To: <200901251722.53392.jnareb@gmail.com>
On 2009.01.25 17:22:52 +0100, Jakub Narebski wrote:
> Or perhaps:
>
> merge A' D' into B Merge bla/blub
That would be confusing. I'd read it as:
git checkout B
git merge A' D'
But the point of B is just to tell rebase that the original merge commit
B is replaced by this new merge commit, so that B' works later.
Björn
^ permalink raw reply
* Translations in Git release?
From: Dill @ 2009-01-25 17:41 UTC (permalink / raw)
To: git
Is there a plan to include translations of the Documentation within
Git or should they exist outside of the project?
^ permalink raw reply
* [PATCH v1 0/3] Introduce config variable "diff.primer"
From: Keith Cascio @ 2009-01-25 17:30 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jeff King, Johannes Schindelin, git
The next three patches introduce a way to specify diff options
git always obeys. Then use the new feature to
enhance git-gui with white space ignore settings. The fastest
way to see this patch in action is: apply all three patches,
fire up git-gui, modify a file, then right-click on the diff
panel and look for the new "White Space" sub-menu.
Future work: Extend the gitattributes mechanism so it supports
all [diff] config variables, including e.g. diff.mnemonicprefix
and diff.primer.
Keith Cascio (3):
Introduce config variable "diff.primer"
Test functionality of new config variable "diff.primer"
git-gui hooks for new config variable "diff.primer"
Documentation/config.txt | 14 +++++
Documentation/diff-options.txt | 13 +++++
Makefile | 2 +
builtin-log.c | 1 +
diff.c | 83 ++++++++++++++++++++++++++----
diff.h | 15 ++++-
git-gui/git-gui.sh | 51 ++++++++++++++++++
git-gui/lib/diff.tcl | 8 ++-
git-gui/lib/option.tcl | 57 +++++++++++++++++++--
gitk-git/gitk | 16 +++---
t/t4033-diff-primer.sh | 111 ++++++++++++++++++++++++++++++++++++++++
11 files changed, 343 insertions(+), 28 deletions(-)
create mode 100755 t/t4033-diff-primer.sh
^ permalink raw reply
* [PATCH v1 2/3] Test functionality of new config variable "diff.primer"
From: Keith Cascio @ 2009-01-25 17:30 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jeff King, Johannes Schindelin, git
In-Reply-To: <1232904657-31831-2-git-send-email-keith@cs.ucla.edu>
Test functionality of new config variable "diff.primer"
Signed-off-by: Keith Cascio <keith@cs.ucla.edu>
---
t/t4033-diff-primer.sh | 111 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 111 insertions(+), 0 deletions(-)
create mode 100755 t/t4033-diff-primer.sh
diff --git a/t/t4033-diff-primer.sh b/t/t4033-diff-primer.sh
new file mode 100755
index 0000000..116d6ad
--- /dev/null
+++ b/t/t4033-diff-primer.sh
@@ -0,0 +1,111 @@
+#!/bin/sh
+#
+# Copyright (c) 2009 Keith G. Cascio
+#
+# based on t4015-diff-whitespace.sh by Johannes E. Schindelin
+#
+
+test_description='Ensure diff engine honors config variable "diff.primer".
+
+'
+. ./test-lib.sh
+. "$TEST_DIRECTORY"/diff-lib.sh
+
+tr 'Q' '\015' << EOF > x
+whitespace at beginning
+whitespace change
+whitespace in the middle
+whitespace at end
+unchanged line
+CR at endQ
+EOF
+
+git add x
+git commit -m '1.0' >/dev/null 2>&1
+
+tr '_' ' ' << EOF > x
+ whitespace at beginning
+whitespace change
+white space in the middle
+whitespace at end__
+unchanged line
+CR at end
+EOF
+
+test_expect_success 'ensure diff.primer begins with empty value' '
+[ -z $(git config --get diff.primer) ]
+'
+
+tr 'Q_' '\015 ' << EOF > expect
+diff --git a/x b/x
+index d99af23..8b32fb5 100644
+--- a/x
++++ b/x
+@@ -1,6 +1,6 @@
+-whitespace at beginning
+-whitespace change
+-whitespace in the middle
+-whitespace at end
++ whitespace at beginning
++whitespace change
++white space in the middle
++whitespace at end__
+ unchanged line
+-CR at endQ
++CR at end
+EOF
+git diff > out
+test_expect_success 'test diff with empty value of diff.primer' 'test_cmp expect out'
+
+git config diff.primer '-w'
+
+test_expect_success 'ensure diff.primer value set' '
+[ $(git config --get diff.primer) = "-w" ]
+'
+
+git diff --no-primer > out
+test_expect_success 'test git diff --no-primer' 'test_cmp expect out'
+
+cat << EOF > expect
+diff --git a/x b/x
+index d99af23..8b32fb5 100644
+EOF
+git diff > out
+test_expect_success 'test with diff.primer = -w' 'test_cmp expect out'
+
+git add x
+git commit -m 'whitespace changes' >/dev/null 2>&1
+
+git config diff.primer '-w --color'
+
+tr 'Q_' '\015 ' << EOF > expect
+Subject: [PATCH] whitespace changes
+
+---
+ x | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/x b/x
+index d99af23..8b32fb5 100644
+--- a/x
++++ b/x
+@@ -1,6 +1,6 @@
+-whitespace at beginning
+-whitespace change
+-whitespace in the middle
+-whitespace at end
++ whitespace at beginning
++whitespace change
++white space in the middle
++whitespace at end__
+ unchanged line
+-CR at endQ
++CR at end
+--_
+EOF
+
+git format-patch --stdout HEAD^..HEAD 2>&1 | sed -re '1,3d;$d' | sed -re '$d' > out
+test_expect_success 'ensure git format-patch not affected by diff.primer' 'test_cmp expect out'
+
+test_done
+
--
1.6.1
^ permalink raw reply related
* [PATCH v1 3/3] git-gui hooks for new config variable "diff.primer"
From: Keith Cascio @ 2009-01-25 17:30 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jeff King, Johannes Schindelin, git
In-Reply-To: <1232904657-31831-3-git-send-email-keith@cs.ucla.edu>
git-gui hooks for new config variable "diff.primer".
Add three checkboxes to both sides of
options panel (local/global).
Add a sub-menu named "White Space" to
diff-panel right-click context menu, with
three checkboxes.
Signed-off-by: Keith Cascio <keith@cs.ucla.edu>
---
git-gui/git-gui.sh | 51 ++++++++++++++++++++++++++++++++++++++++++
git-gui/lib/option.tcl | 57 +++++++++++++++++++++++++++++++++++++++++++----
2 files changed, 103 insertions(+), 5 deletions(-)
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index e018e07..5d93351 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -3075,10 +3075,43 @@ $ui_diff tag conf d>>>>>>> \
$ui_diff tag raise sel
+proc mirror_diff_state {} {
+ global diff__ignore_space_at_eol diff__ignore_space_change diff__ignore_all_space
+
+ set key "diff.primer"
+ set ddo [git config --get $key]
+ set diff__ignore_space_at_eol [expr {[string match "*--ignore-space-at-eol*" $ddo] ? "true" : "false"}]
+ set diff__ignore_space_change [expr {[string match "*--ignore-space-change*" $ddo] ? "true" : "false"}]
+ set diff__ignore_all_space [expr {[string match "*--ignore-all-space*" $ddo] ? "true" : "false"}]
+}
+
+proc adjust_command_line { flag value str } {
+ if {$value eq "true"} {
+ if { ! [string match "*$flag*" $str ] } {
+ set str [concat $str $flag] }
+ } else { regsub -- $flag $str "" str }
+ return $str
+}
+
+proc record_diff_state {} {
+ global diff__ignore_space_at_eol diff__ignore_space_change diff__ignore_all_space
+
+ set key "diff.primer"
+ set ddo [git config --get $key]
+ set ddo [adjust_command_line --ignore-space-at-eol $diff__ignore_space_at_eol $ddo]
+ set ddo [adjust_command_line --ignore-space-change $diff__ignore_space_change $ddo]
+ set ddo [adjust_command_line --ignore-all-space $diff__ignore_all_space $ddo]
+
+ git config $key $ddo
+ reshow_diff
+}
+
# -- Diff Body Context Menu
#
proc create_common_diff_popup {ctxm} {
+ global diff__ignore_space_at_eol diff__ignore_space_change diff__ignore_all_space
+
$ctxm add command \
-label [mc "Show Less Context"] \
-command show_less_context
@@ -3087,6 +3120,24 @@ proc create_common_diff_popup {ctxm} {
-label [mc "Show More Context"] \
-command show_more_context
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
+ mirror_diff_state
+ set whitespacemenu $ctxm.ws
+ menu $whitespacemenu -postcommand mirror_diff_state
+ $ctxm add cascade \
+ -label [mc "White Space"] \
+ -menu $whitespacemenu
+ $whitespacemenu add checkbutton \
+ -label [mc "--ignore-space-at-eol"] \
+ -variable diff__ignore_space_at_eol -onvalue "true" -offvalue "false" \
+ -command record_diff_state
+ $whitespacemenu add checkbutton \
+ -label [mc "--ignore-space-change"] \
+ -variable diff__ignore_space_change -onvalue "true" -offvalue "false" \
+ -command record_diff_state
+ $whitespacemenu add checkbutton \
+ -label [mc "--ignore-all-space" ] \
+ -variable diff__ignore_all_space -onvalue "true" -offvalue "false" \
+ -command record_diff_state
$ctxm add separator
$ctxm add command \
-label [mc Refresh] \
diff --git a/git-gui/lib/option.tcl b/git-gui/lib/option.tcl
index 1d55b49..fbdf4e8 100644
--- a/git-gui/lib/option.tcl
+++ b/git-gui/lib/option.tcl
@@ -28,6 +28,7 @@ proc save_config {} {
global repo_config global_config system_config
global repo_config_new global_config_new
global ui_comm_spell
+ global ddo diff_primer_global diff_primer_repo pseudovariables
foreach option $font_descs {
set name [lindex $option 0]
@@ -46,17 +47,40 @@ proc save_config {} {
unset global_config_new(gui.$font^^size)
}
+ foreach name [get_diff_primer] {
+ set diff_option [string range $name 8 [string length $name]]
+ set ifound [lsearch $diff_primer_global $diff_option]
+ if {$global_config_new($name) eq "true"} {
+ if {$ifound < 0} { lappend diff_primer_global $diff_option }
+ } else {
+ if {$ifound >= 0} { set diff_primer_global [lreplace $diff_primer_global $ifound $ifound]}
+ }
+ set ifound [lsearch $diff_primer_repo $diff_option]
+ if { $repo_config_new($name) eq "true"} {
+ if {$ifound < 0} { lappend diff_primer_repo $diff_option }
+ } else {
+ if {$ifound >= 0} { set diff_primer_repo [lreplace $diff_primer_repo $ifound $ifound]}
+ }
+ }
+ array unset default_config gui.diff--ignore-*
+ set default_config($ddo) ""
+ set global_config_new($ddo) [join $diff_primer_global]
+ set repo_config_new($ddo) [join $diff_primer_repo ]
+
foreach name [array names default_config] {
set value $global_config_new($name)
- if {$value ne $global_config($name)} {
- if {$value eq $system_config($name)} {
+ set value_global [expr {[info exists global_config($name)] ? $global_config($name) : ""}]
+ set value_system [expr {[info exists system_config($name)] ? $system_config($name) : ""}]
+ set value_repo [expr {[info exists repo_config($name)] ? $repo_config($name) : ""}]
+ if {$value ne $value_global} {
+ if {$value eq $value_system} {
catch {git config --global --unset $name}
} else {
regsub -all "\[{}\]" $value {"} value
git config --global $name $value
}
set global_config($name) $value
- if {$value eq $repo_config($name)} {
+ if {$value eq $value_repo} {
catch {git config --unset $name}
set repo_config($name) $value
}
@@ -65,8 +89,10 @@ proc save_config {} {
foreach name [array names default_config] {
set value $repo_config_new($name)
- if {$value ne $repo_config($name)} {
- if {$value eq $global_config($name)} {
+ set value_global [expr {[info exists global_config($name)] ? $global_config($name) : ""}]
+ set value_repo [expr {[info exists repo_config($name)] ? $repo_config($name) : ""}]
+ if {$value ne $value_repo} {
+ if {$value eq $value_global} {
catch {git config --unset $name}
} else {
regsub -all "\[{}\]" $value {"} value
@@ -88,10 +114,23 @@ proc save_config {} {
}
}
+proc get_diff_primer {} {
+ global repo_config global_config
+ global ddo diff_primer_global diff_primer_repo pseudovariables
+
+ set ddo "diff.primer"
+ set diff_primer_global [expr {[info exists global_config($ddo)] ? [split $global_config($ddo)] : [list]}]
+ set diff_primer_repo [expr {[info exists repo_config($ddo)] ? [split $repo_config($ddo)] : [list]}]
+ set pseudovariables [list "gui.diff--ignore-space-at-eol" "gui.diff--ignore-space-change" "gui.diff--ignore-all-space"]
+
+ return $pseudovariables
+}
+
proc do_options {} {
global repo_config global_config font_descs
global repo_config_new global_config_new
global ui_comm_spell
+ global ddo diff_primer_global diff_primer_repo pseudovariables
array unset repo_config_new
array unset global_config_new
@@ -108,6 +147,11 @@ proc do_options {} {
foreach name [array names global_config] {
set global_config_new($name) $global_config($name)
}
+ foreach name [get_diff_primer] {
+ set diff_option [string range $name 8 [string length $name]]
+ set global_config_new($name) [expr {[lsearch $diff_primer_global $diff_option] < 0 ? "false" : "true"}]
+ set repo_config_new($name) [expr {[lsearch $diff_primer_repo $diff_option] < 0 ? "false" : "true"}]
+ }
set w .options_editor
toplevel $w
@@ -150,6 +194,9 @@ proc do_options {} {
{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"}}
+ {b gui.diff--ignore-space-at-eol {mc "Diff Ignore Trailing White Space" }}
+ {b gui.diff--ignore-space-change {mc "Diff Ignore Changes In Amount Of White Space"}}
+ {b gui.diff--ignore-all-space {mc "Diff Ignore All White Space" }}
{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.1
^ permalink raw reply related
* [PATCH v1 1/3] Introduce config variable "diff.primer"
From: Keith Cascio @ 2009-01-25 17:30 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jeff King, Johannes Schindelin, git
In-Reply-To: <1232904657-31831-1-git-send-email-keith@cs.ucla.edu>
Introduce config variable "diff.primer".
Allows user to specify arbitrary options
to pass to diff on every invocation,
including internal invocations from other
programs, e.g. git-gui.
Introduce diff command-line options:
--no-primer, --machine-friendly
Protect git-format-patch, git-apply,
git-am, git-rebase, git-gui and gitk
from inapplicable options.
Signed-off-by: Keith Cascio <keith@cs.ucla.edu>
---
Documentation/config.txt | 14 +++++++
Documentation/diff-options.txt | 13 ++++++
Makefile | 2 +
builtin-log.c | 1 +
diff.c | 83 +++++++++++++++++++++++++++++++++++-----
diff.h | 15 ++++++-
git-gui/lib/diff.tcl | 8 +++-
gitk-git/gitk | 16 ++++----
8 files changed, 129 insertions(+), 23 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 290cb48..dd00f98 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -601,6 +601,20 @@ diff.autorefreshindex::
affects only 'git-diff' Porcelain, and not lower level
'diff' commands, such as 'git-diff-files'.
+diff.primer::
+ Whitespace-separated list of options to pass to 'git-diff'
+ on every invocation, including internal invocations from
+ linkgit:git-gui[1] and linkgit:gitk[1],
+ e.g. `"--color --ignore-space-at-eol --exit-code"`.
+ See linkgit:git-diff[1]. You can override these at run time with the
+ diff option --no-primer. Supports a subset of
+ 'git-diff'\'s many options, at least:
+ `-b --binary --color --color-words --cumulative --dirstat-by-file
+--exit-code --ext-diff --find-copies-harder --follow --full-index
+--ignore-all-space --ignore-space-at-eol --ignore-space-change
+--ignore-submodules --no-color --no-ext-diff --no-textconv -q --quiet -R -r
+--relative -t --text --textconv -w`
+
diff.external::
If this config variable is set, diff generation is not
performed using the internal diff machinery, but using the
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 1f8ce97..4d12359 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -240,5 +240,18 @@ endif::git-format-patch[]
--no-prefix::
Do not show any source or destination prefix.
+--no-primer::
+ Ignore default options specified in '.git/config', i.e.
+ those that were set using a command like
+ `git config diff.primer "--color --ignore-space-at-eol --exit-code"`
+
+--machine-friendly::
+ Declaratively override and turn off all diff options that alter patch
+ output in a way not suitable for input to a program that expects
+ a canonical patch. For example, `--color`, and the whitespace ignore
+ options `-w`, `-b` and `--ignore-space-at-eol`. Important when
+ 'git-format-patch' generates output for 'git-apply' or 'git-am', for
+ example in the context of 'git-rebase'.
+
For more detailed explanation on these common options, see also
linkgit:gitdiffcore[7].
diff --git a/Makefile b/Makefile
index b4d9cb4..195f984 100644
--- a/Makefile
+++ b/Makefile
@@ -1279,6 +1279,8 @@ git-http-push$X: revision.o http.o http-push.o $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
+diff.h: xdiff/xdiff.h
+
$(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
$(patsubst git-%$X,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h)
builtin-revert.o wt-status.o: wt-status.h
diff --git a/builtin-log.c b/builtin-log.c
index 2ae39af..b385e35 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -784,6 +784,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
rev.combine_merges = 0;
rev.ignore_merges = 1;
DIFF_OPT_SET(&rev.diffopt, RECURSIVE);
+ DIFF_OPT_SET(&rev.diffopt, MACHINE_FRIENDLY);
rev.subject_prefix = fmt_patch_subject_prefix;
diff --git a/diff.c b/diff.c
index 82cff97..a8c103f 100644
--- a/diff.c
+++ b/diff.c
@@ -24,6 +24,8 @@ static int diff_rename_limit_default = 200;
static int diff_suppress_blank_empty;
int diff_use_color_default = -1;
static const char *external_diff_cmd_cfg;
+static const char *diff_primer;
+static struct diff_options *primer;
int diff_auto_refresh_index = 1;
static int diff_mnemonic_prefix;
@@ -102,6 +104,8 @@ int git_diff_basic_config(const char *var, const char *value, void *cb)
diff_rename_limit_default = git_config_int(var, value);
return 0;
}
+ if (!strcmp(var, "diff.primer"))
+ return git_config_string(& diff_primer, var, value);
switch (userdiff_config(var, value)) {
case 0: break;
@@ -2215,6 +2219,46 @@ static void run_checkdiff(struct diff_filepair *p, struct diff_options *o)
builtin_checkdiff(name, other, attr_path, p->one, p->two, o);
}
+static const char blank[] = " \t\r\n";
+
+void set_diff_primer(struct diff_options *options)
+{
+ char *str1, *token, *saveptr;
+ int len;
+
+ if((DIFF_OPT_TST(options, SUPPRESS_PRIMER)) ||
+ (! diff_primer ) ||
+ ((len = (strlen(diff_primer)+1)) < 3 )){ return; }
+
+ token = str1 = strncpy( (char*) malloc(len), diff_primer, len );
+ if( ( saveptr = strpbrk( token += strspn( token, blank ), blank )) ){ *(saveptr++) = '\0'; }
+ while( token ){
+ if( *token == '-' ){
+ diff_opt_parse( options, (const char **) &token, -1 );
+ }
+ if( (token = saveptr) ){
+ if( ( saveptr = strpbrk( token += strspn( token, blank ), blank )) ){ *(saveptr++) = '\0'; }
+ }
+ }
+
+ free( str1 );
+}
+
+struct diff_options* flatten_diff_options( struct diff_options *master, struct diff_options *slave )
+{
+ unsigned x0 = master->flags , x1 = master->mask , x2 = slave->flags , x3 = slave->mask;
+ long w = master->xdl_opts, x = master->xdl_mask, y = slave->xdl_opts, z = slave->xdl_mask;
+
+ //minimized by Quine-McClusk
+ master->flags = (~x1&x2&x3)|(x0&~x3)|(x0&x1);
+ master->mask = x1 | x3;
+
+ master->xdl_opts = (~x &y &z )|(w &~z )|(w &x );
+ master->xdl_mask = x | z ;
+
+ return master;
+}
+
void diff_setup(struct diff_options *options)
{
memset(options, 0, sizeof(*options));
@@ -2225,15 +2269,16 @@ void diff_setup(struct diff_options *options)
options->break_opt = -1;
options->rename_limit = -1;
options->dirstat_percent = 3;
- DIFF_OPT_CLR(options, DIRSTAT_CUMULATIVE);
+ if( DIFF_OPT_TST(options, DIRSTAT_CUMULATIVE))
+ DIFF_OPT_CLR(options, DIRSTAT_CUMULATIVE);
options->context = 3;
options->change = diff_change;
options->add_remove = diff_addremove;
if (diff_use_color_default > 0)
- DIFF_OPT_SET(options, COLOR_DIFF);
- else
- DIFF_OPT_CLR(options, COLOR_DIFF);
+ DIFF_OPT_SET(options, COLOR_DIFF);
+ else if( DIFF_OPT_TST(options, COLOR_DIFF))
+ DIFF_OPT_CLR(options, COLOR_DIFF);
options->detect_rename = diff_detect_rename_default;
if (!diff_mnemonic_prefix) {
@@ -2322,6 +2367,18 @@ int diff_setup_done(struct diff_options *options)
DIFF_OPT_SET(options, EXIT_WITH_STATUS);
}
+ if( ! DIFF_OPT_TST( options, SUPPRESS_PRIMER ) ){
+ if( ! primer ){
+ diff_setup( primer = (struct diff_options *) malloc( sizeof(struct diff_options) ) );
+ set_diff_primer( primer );
+ }
+ flatten_diff_options( options, primer );
+ }
+
+ if( DIFF_OPT_TST( options, MACHINE_FRIENDLY ) ){
+ DIFF_MACHINE_FRIENDLY( options );
+ }
+
return 0;
}
@@ -2469,13 +2526,13 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
/* xdiff options */
else if (!strcmp(arg, "-w") || !strcmp(arg, "--ignore-all-space"))
- options->xdl_opts |= XDF_IGNORE_WHITESPACE;
+ DIFF_XDL_SET(options, IGNORE_WHITESPACE);
else if (!strcmp(arg, "-b") || !strcmp(arg, "--ignore-space-change"))
- options->xdl_opts |= XDF_IGNORE_WHITESPACE_CHANGE;
+ DIFF_XDL_SET(options, IGNORE_WHITESPACE_CHANGE);
else if (!strcmp(arg, "--ignore-space-at-eol"))
- options->xdl_opts |= XDF_IGNORE_WHITESPACE_AT_EOL;
+ DIFF_XDL_SET(options, IGNORE_WHITESPACE_AT_EOL);
else if (!strcmp(arg, "--patience"))
- options->xdl_opts |= XDF_PATIENCE_DIFF;
+ DIFF_XDL_SET(options, PATIENCE_DIFF);
/* flags options */
else if (!strcmp(arg, "--binary")) {
@@ -2496,8 +2553,10 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
DIFF_OPT_SET(options, COLOR_DIFF);
else if (!strcmp(arg, "--no-color"))
DIFF_OPT_CLR(options, COLOR_DIFF);
- else if (!strcmp(arg, "--color-words"))
- options->flags |= DIFF_OPT_COLOR_DIFF | DIFF_OPT_COLOR_DIFF_WORDS;
+ else if (!strcmp(arg, "--color-words")){
+ DIFF_OPT_SET(options, COLOR_DIFF);
+ DIFF_OPT_SET(options, COLOR_DIFF_WORDS);
+ }
else if (!strcmp(arg, "--exit-code"))
DIFF_OPT_SET(options, EXIT_WITH_STATUS);
else if (!strcmp(arg, "--quiet"))
@@ -2512,6 +2571,10 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
DIFF_OPT_CLR(options, ALLOW_TEXTCONV);
else if (!strcmp(arg, "--ignore-submodules"))
DIFF_OPT_SET(options, IGNORE_SUBMODULES);
+ else if (!strcmp(arg, "--no-primer"))
+ DIFF_OPT_SET(options, SUPPRESS_PRIMER);
+ else if (!strcmp(arg, "--machine-friendly"))
+ DIFF_OPT_SET(options, MACHINE_FRIENDLY);
/* misc options */
else if (!strcmp(arg, "-z"))
diff --git a/diff.h b/diff.h
index 4d5a327..e98c23a 100644
--- a/diff.h
+++ b/diff.h
@@ -5,6 +5,7 @@
#define DIFF_H
#include "tree-walk.h"
+#include "xdiff/xdiff.h"
struct rev_info;
struct diff_options;
@@ -66,9 +67,15 @@ typedef void (*diff_format_fn_t)(struct diff_queue_struct *q,
#define DIFF_OPT_DIRSTAT_CUMULATIVE (1 << 19)
#define DIFF_OPT_DIRSTAT_BY_FILE (1 << 20)
#define DIFF_OPT_ALLOW_TEXTCONV (1 << 21)
-#define DIFF_OPT_TST(opts, flag) ((opts)->flags & DIFF_OPT_##flag)
-#define DIFF_OPT_SET(opts, flag) ((opts)->flags |= DIFF_OPT_##flag)
-#define DIFF_OPT_CLR(opts, flag) ((opts)->flags &= ~DIFF_OPT_##flag)
+#define DIFF_OPT_SUPPRESS_PRIMER (1 << 22)
+#define DIFF_OPT_MACHINE_FRIENDLY (1 << 23)
+#define DIFF_OPT_TST(opts, flag) ((opts)->flags & DIFF_OPT_##flag)
+#define DIFF_OPT_SET(opts, flag) ((opts)->flags |= DIFF_OPT_##flag), ((opts)->mask |= DIFF_OPT_##flag)
+#define DIFF_OPT_CLR(opts, flag) ((opts)->flags &= ~DIFF_OPT_##flag), ((opts)->mask |= DIFF_OPT_##flag)
+#define DIFF_XDL_TST(opts, flag) ((opts)->xdl_opts & XDF_##flag)
+#define DIFF_XDL_SET(opts, flag) ((opts)->xdl_opts |= XDF_##flag), ((opts)->xdl_mask |= XDF_##flag)
+#define DIFF_XDL_CLR(opts, flag) ((opts)->xdl_opts &= ~XDF_##flag), ((opts)->xdl_mask |= XDF_##flag)
+#define DIFF_MACHINE_FRIENDLY(opts) ((opts)->flags &= ~(DIFF_OPT_COLOR_DIFF)), ((opts)->xdl_opts &= ~(XDF_WHITESPACE_FLAGS))
struct diff_options {
const char *filter;
@@ -77,6 +84,7 @@ struct diff_options {
const char *single_follow;
const char *a_prefix, *b_prefix;
unsigned flags;
+ unsigned mask;
int context;
int interhunkcontext;
int break_opt;
@@ -95,6 +103,7 @@ struct diff_options {
int prefix_length;
const char *stat_sep;
long xdl_opts;
+ long xdl_mask;
int stat_width;
int stat_name_width;
diff --git a/git-gui/lib/diff.tcl b/git-gui/lib/diff.tcl
index bbbf15c..94faf95 100644
--- a/git-gui/lib/diff.tcl
+++ b/git-gui/lib/diff.tcl
@@ -276,6 +276,7 @@ proc start_show_diff {cont_info {add_opts {}}} {
}
lappend cmd -p
+ lappend cmd --exit-code
lappend cmd --no-color
if {$repo_config(gui.diffcontext) >= 1} {
lappend cmd "-U$repo_config(gui.diffcontext)"
@@ -310,6 +311,7 @@ proc read_diff {fd cont_info} {
global ui_diff diff_active
global is_3way_diff is_conflict_diff current_diff_header
global current_diff_queue
+ global errorCode
$ui_diff conf -state normal
while {[gets $fd line] >= 0} {
@@ -397,7 +399,9 @@ proc read_diff {fd cont_info} {
$ui_diff conf -state disabled
if {[eof $fd]} {
- close $fd
+ fconfigure $fd -blocking 1
+ catch { close $fd } err
+ set diff_exit_status $errorCode
if {$current_diff_queue ne {}} {
advance_diff_queue $cont_info
@@ -413,7 +417,7 @@ proc read_diff {fd cont_info} {
}
ui_ready
- if {[$ui_diff index end] eq {2.0}} {
+ if {$diff_exit_status eq "NONE"} {
handle_empty_diff
}
set callback [lindex $cont_info 1]
diff --git a/gitk-git/gitk b/gitk-git/gitk
index dc2a439..49e5cb7 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -4259,7 +4259,7 @@ proc do_file_hl {serial} {
# must be "containing:", i.e. we're searching commit info
return
}
- set cmd [concat | git diff-tree -r -s --stdin $gdtargs]
+ set cmd [concat | git diff-tree --no-color -r -s --stdin $gdtargs]
set filehighlight [open $cmd r+]
fconfigure $filehighlight -blocking 0
filerun $filehighlight readfhighlight
@@ -4753,7 +4753,7 @@ proc dodiffindex {} {
if {!$showlocalchanges || !$isworktree} return
incr lserial
- set cmd "|git diff-index --cached HEAD"
+ set cmd "|git diff-index --no-color --cached HEAD"
if {$vfilelimit($curview) ne {}} {
set cmd [concat $cmd -- $vfilelimit($curview)]
}
@@ -4782,7 +4782,7 @@ proc readdiffindex {fd serial inst} {
}
# now see if there are any local changes not checked in to the index
- set cmd "|git diff-files"
+ set cmd "|git diff-files --no-color"
if {$vfilelimit($curview) ne {}} {
set cmd [concat $cmd -- $vfilelimit($curview)]
}
@@ -7068,7 +7068,7 @@ proc diffcmd {ids flags} {
if {$i >= 0} {
if {[llength $ids] > 1 && $j < 0} {
# comparing working directory with some specific revision
- set cmd [concat | git diff-index $flags]
+ set cmd [concat | git diff-index --no-color $flags]
if {$i == 0} {
lappend cmd -R [lindex $ids 1]
} else {
@@ -7076,13 +7076,13 @@ proc diffcmd {ids flags} {
}
} else {
# comparing working directory with index
- set cmd [concat | git diff-files $flags]
+ set cmd [concat | git diff-files --no-color $flags]
if {$j == 1} {
lappend cmd -R
}
}
} elseif {$j >= 0} {
- set cmd [concat | git diff-index --cached $flags]
+ set cmd [concat | git diff-index --no-color --cached $flags]
if {[llength $ids] > 1} {
# comparing index with specific revision
if {$i == 0} {
@@ -7095,7 +7095,7 @@ proc diffcmd {ids flags} {
lappend cmd HEAD
}
} else {
- set cmd [concat | git diff-tree -r $flags $ids]
+ set cmd [concat | git diff-tree --no-color -r $flags $ids]
}
return $cmd
}
@@ -10657,7 +10657,7 @@ if {[catch {package require Tk 8.4} err]} {
}
# defaults...
-set wrcomcmd "git diff-tree --stdin -p --pretty"
+set wrcomcmd "git diff-tree --no-color --stdin -p --pretty"
set gitencoding {}
catch {
--
1.6.1
^ permalink raw reply related
* [PATCH] Add new testcase for git-merge-tree
From: Miklos Vajna @ 2009-01-25 18:03 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
t/t6034-merge-tree.sh | 40 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 40 insertions(+), 0 deletions(-)
create mode 100755 t/t6034-merge-tree.sh
diff --git a/t/t6034-merge-tree.sh b/t/t6034-merge-tree.sh
new file mode 100755
index 0000000..42bd5e7
--- /dev/null
+++ b/t/t6034-merge-tree.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+test_description='git merge-tree
+
+Testing merging two trees without touching the index.'
+
+. ./test-lib.sh
+
+test_expect_success 'setup' '
+ echo c0 > c0.c &&
+ git add c0.c &&
+ git commit -m c0 &&
+ git tag c0 &&
+ echo c1 > c1.c &&
+ git add c1.c &&
+ git commit -m c1 &&
+ git tag c1 &&
+ c1=$(git hash-object c1.c)
+ git reset --hard c0 &&
+ echo c2 > c2.c &&
+ git add c2.c &&
+ git commit -m c2 &&
+ git tag c2
+ c2=$(git hash-object c2.c)
+'
+
+test_expect_success 'merge c1 with c2' '
+ cat <<EOF >expected &&
+added in local
+ our 100644 $c1 c1.c
+added in remote
+ their 100644 $c2 c2.c
+@@ -0,0 +1 @@
++c2
+EOF
+ git merge-tree c0 c1 c2 > actual &&
+ test_cmp expected actual
+'
+
+test_done
--
1.6.1
^ permalink raw reply related
* Re: [PATCH v1 1/3] Introduce config variable "diff.primer"
From: Johannes Schindelin @ 2009-01-25 18:17 UTC (permalink / raw)
To: Keith Cascio; +Cc: Junio C Hamano, Jeff King, git
In-Reply-To: <1232904657-31831-2-git-send-email-keith@cs.ucla.edu>
Hi,
On Sun, 25 Jan 2009, Keith Cascio wrote:
> Introduce config variable "diff.primer".
> Allows user to specify arbitrary options
> to pass to diff on every invocation,
> including internal invocations from other
> programs, e.g. git-gui.
That would break existing scripts using "git diff" rather badly. We
already did not allow something like "git config alias.diff ..." from
changing the behavior of "git diff", so I cannot find a reason why we
should let diff.primer (a misnomer BTW) override the behavior.
Ciao,
Dscho
^ permalink raw reply
* Re: [PATCH v1 3/3] git-gui hooks for new config variable "diff.primer"
From: Johannes Schindelin @ 2009-01-25 18:22 UTC (permalink / raw)
To: Keith Cascio; +Cc: Junio C Hamano, Jeff King, git
In-Reply-To: <1232904657-31831-4-git-send-email-keith@cs.ucla.edu>
Hi,
On Sun, 25 Jan 2009, Keith Cascio wrote:
> git-gui hooks for new config variable "diff.primer".
> Add three checkboxes to both sides of
> options panel (local/global).
> Add a sub-menu named "White Space" to
> diff-panel right-click context menu, with
> three checkboxes.
Rather than storing the information about how to call "git diff" as
diff.primer, why don't you store that information in a config variable
gui.whiteSpaceMode and teach "git gui" to call "git diff" accordingly?
That would have the further advantage of not breaking other people's
setups...
> git-gui/git-gui.sh | 51 ++++++++++++++++++++++++++++++++++++++++++
> git-gui/lib/option.tcl | 57 +++++++++++++++++++++++++++++++++++++++++++----
Please submit git-gui patches without the git-gui prefix, as it makes it
harder on the maintainer of git-gui, Shawn (who you did not Cc: BTW).
Ciao,
Dscho
^ permalink raw reply
* Re: [PATCH] Allow cloning an empty repository
From: Sverre Rabbelier @ 2009-01-25 18:33 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Johannes Schindelin, Git Mailinglist, Miklos Vajna
In-Reply-To: <7vy6x0j7py.fsf@gitster.siamese.dyndns.org>
On Sun, Jan 25, 2009 at 06:05, Junio C Hamano <gitster@pobox.com> wrote:
> Yeah, it is on 'next' and I've pushed the results out last night, but I
> got sick and didn't manage to send out "What's cooking".
Ok, awesome! :).
--
Cheers,
Sverre Rabbelier
^ permalink raw reply
* Re: [PATCH v1 1/3] Introduce config variable "diff.primer"
From: Keith Cascio @ 2009-01-25 18:44 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Junio C Hamano, Jeff King, git
In-Reply-To: <alpine.DEB.1.00.0901251916010.14855@racer>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1197 bytes --]
On Sun, 25 Jan 2009, Johannes Schindelin wrote:
> That would break existing scripts using "git diff" rather badly. We already
> did not allow something like "git config alias.diff ..." from changing the
> behavior of "git diff", so I cannot find a reason why we should let
> diff.primer (a misnomer BTW) override the behavior.
I took special care to protect all core scripts from the effects. Quote from
patch 1/3:
> Protect git-format-patch, git-apply,
> git-am, git-rebase, git-gui and gitk
> from inapplicable options.
I fact, by introducing the cpp macro DIFF_MACHINE_FRIENDLY() and the
command-line options "--machine-friendly" and "--no-primer", I made such
protection declarative. Don't you find it preferable that existing programs and
scripts would explicitly declare their desire for machine-friendly output?
The name "primer" is open to discussion, of course. But I like it.
From Merriam-Webster:
primer n 1: a device for priming 2: material used in priming a surface
prime vb 1: fill, load 2: to prepare for firing 3: to apply the first color, coating or preparation to <~ a wall>
Thanks for your input. More input welcome.
-- Keith
^ permalink raw reply
* Re: CR codes from git commands
From: Brent Goodrick @ 2009-01-25 18:47 UTC (permalink / raw)
To: Boyd Stephen Smith Jr.; +Cc: Brent Goodrick, git
In-Reply-To: <200901250319.05665.bss@iguanasuicide.net>
Boyd Stephen Smith Jr. writes:
> On Saturday 24 January 2009, Brent Goodrick <bgoodr@gmail.com> wrote
> about 'Re: CR codes from git commands':
> >While I'm at it, what is the standard procedure for submitting git
> >patches for review once I've cooked up and validated it on my end? I'm
> >guessing posting the patch into this mailing list is part of the
> >answer to that question.
>
> If you've got a patch, I assume you've got a checkout. Look in
> Documentation/SubmittingPatches.
Thanks I see that now. No, I don't have a patch yet, was struggling to
find that basic info that really should be front and center somewhere
on the wiki (and also access to the wiki is very slow).
bg
^ permalink raw reply
* Re: What's cooking in git.git (Jan 2009, #06; Sat, 24)
From: Jeff King @ 2009-01-25 18:51 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Junio C Hamano, git
In-Reply-To: <alpine.DEB.1.00.0901251308430.14855@racer>
On Sun, Jan 25, 2009 at 01:17:33PM +0100, Johannes Schindelin wrote:
> BTW a test run on my machine resulted in a few koku of valgrind errors;
> This was done in my personal tree which contains dozens of extra patches,
> so I want to repeat the exercize with 'next' first, but I think we will
> get quite some patches due to the valgrind support...
Hmm. I hope not. "master" was testing clean on valgrind a few months ago
(and took only a handful of cleanups to get that way after years of
development), so either you are getting false positives, my original
work was getting false negatives, or the code quality has dropped
dramatically in the last 3 months. :)
-Peff
^ permalink raw reply
* [EGIT PATCH 2/4] Cleanup ui plugin.xml, replace deprecated elements and attributes
From: Robin Rosenberg @ 2009-01-25 18:52 UTC (permalink / raw)
To: spearce; +Cc: git, Robin Rosenberg
In-Reply-To: <1232909538-3279-1-git-send-email-robin.rosenberg@dewire.com>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
org.spearce.egit.ui/plugin.xml | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/org.spearce.egit.ui/plugin.xml b/org.spearce.egit.ui/plugin.xml
index 0b18f15..e5c81e5 100644
--- a/org.spearce.egit.ui/plugin.xml
+++ b/org.spearce.egit.ui/plugin.xml
@@ -196,11 +196,16 @@
<extension point="org.eclipse.ui.propertyPages">
<page
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true"
name="%Git"
class="org.spearce.egit.ui.internal.preferences.GitProjectPropertyPage"
id="org.spearce.egit.ui.preferences.GitProjectPropertyPage">
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject">
+ <test
+ property="projectPersistentProperty org.eclipse.team.core.repository" value="org.spearce.egit.core.GitProvider">
+ </test>
+ </adapt>
+ </enabledWhen>
<filter
name="projectPersistentProperty"
value="org.eclipse.team.core.repository=org.spearce.egit.core.GitProvider">
--
1.6.1.285.g35d8b
^ permalink raw reply related
* [EGIT PATCH 1/4] Cleanup ui plugin.xml, refer to interface IResource, not Resource
From: Robin Rosenberg @ 2009-01-25 18:52 UTC (permalink / raw)
To: spearce; +Cc: git, Robin Rosenberg
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
org.spearce.egit.ui/plugin.xml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/org.spearce.egit.ui/plugin.xml b/org.spearce.egit.ui/plugin.xml
index e6e3762..0b18f15 100644
--- a/org.spearce.egit.ui/plugin.xml
+++ b/org.spearce.egit.ui/plugin.xml
@@ -170,7 +170,7 @@
</adapter>
</factory>
<factory
- adaptableType="org.eclipse.core.internal.resources.Resource"
+ adaptableType="org.eclipse.core.resources.IResource"
class="org.spearce.egit.ui.internal.factories.GitAdapterFactory">
<adapter
type="org.eclipse.team.ui.history.IHistoryPageSource">
--
1.6.1.285.g35d8b
^ permalink raw reply related
* [EGIT PATCH 3/4] Add the keyword "Git" to the git preferences pages.
From: Robin Rosenberg @ 2009-01-25 18:52 UTC (permalink / raw)
To: spearce; +Cc: git, Robin Rosenberg
In-Reply-To: <1232909538-3279-2-git-send-email-robin.rosenberg@dewire.com>
If the users searches for "Git" in the workspaces preferences, all
git related preferences pages will now be found.
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
org.spearce.egit.ui/plugin.xml | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/org.spearce.egit.ui/plugin.xml b/org.spearce.egit.ui/plugin.xml
index e5c81e5..c2b82fd 100644
--- a/org.spearce.egit.ui/plugin.xml
+++ b/org.spearce.egit.ui/plugin.xml
@@ -187,11 +187,19 @@
<page name="%GitPreferences_HistoryPreferencePage_name"
category="org.eclipse.team.ui.TeamPreferences/org.spearce.egit.ui.GitPreferences"
class="org.spearce.egit.ui.internal.preferences.HistoryPreferencePage"
- id="org.spearce.egit.ui.internal.preferences.HistoryPreferencePage" />
+ id="org.spearce.egit.ui.internal.preferences.HistoryPreferencePage" >
+ <keywordReference
+ id="org.spearce.egit.ui.keyword.git">
+ </keywordReference>
+ </page>
<page name="%GitPreferences_WindowCachePreferencePage_name"
category="org.eclipse.team.ui.TeamPreferences/org.spearce.egit.ui.GitPreferences"
class="org.spearce.egit.ui.internal.preferences.WindowCachePreferencePage"
- id="org.spearce.egit.ui.internal.preferences.WindowCachePreferencePage" />
+ id="org.spearce.egit.ui.internal.preferences.WindowCachePreferencePage" >
+ <keywordReference
+ id="org.spearce.egit.ui.keyword.git">
+ </keywordReference>
+ </page>
</extension>
<extension point="org.eclipse.ui.propertyPages">
@@ -212,6 +220,14 @@
</filter>
</page>
</extension>
+
+ <extension point="org.eclipse.ui.keywords">
+ <keyword
+ id="org.spearce.egit.ui.keyword.git"
+ label="git">
+ </keyword>
+ </extension>
+
<extension point="org.eclipse.ui.decorators">
<decorator
lightweight="true"
--
1.6.1.285.g35d8b
^ permalink raw reply related
* [EGIT PATCH 4/4] Retain Eclipse Git preferences page hierarchy without warnings in plugin.xml
From: Robin Rosenberg @ 2009-01-25 18:52 UTC (permalink / raw)
To: spearce; +Cc: git, Robin Rosenberg
In-Reply-To: <1232909538-3279-3-git-send-email-robin.rosenberg@dewire.com>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
org.spearce.egit.ui/plugin.xml | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/org.spearce.egit.ui/plugin.xml b/org.spearce.egit.ui/plugin.xml
index c2b82fd..869108c 100644
--- a/org.spearce.egit.ui/plugin.xml
+++ b/org.spearce.egit.ui/plugin.xml
@@ -185,7 +185,7 @@
id="org.spearce.egit.ui.GitPreferences" />
<page name="%GitPreferences_HistoryPreferencePage_name"
- category="org.eclipse.team.ui.TeamPreferences/org.spearce.egit.ui.GitPreferences"
+ category="org.spearce.egit.ui.GitPreferences"
class="org.spearce.egit.ui.internal.preferences.HistoryPreferencePage"
id="org.spearce.egit.ui.internal.preferences.HistoryPreferencePage" >
<keywordReference
@@ -193,7 +193,7 @@
</keywordReference>
</page>
<page name="%GitPreferences_WindowCachePreferencePage_name"
- category="org.eclipse.team.ui.TeamPreferences/org.spearce.egit.ui.GitPreferences"
+ category="org.spearce.egit.ui.GitPreferences"
class="org.spearce.egit.ui.internal.preferences.WindowCachePreferencePage"
id="org.spearce.egit.ui.internal.preferences.WindowCachePreferencePage" >
<keywordReference
--
1.6.1.285.g35d8b
^ permalink raw reply related
* Re: Translations in Git release?
From: Jeff King @ 2009-01-25 18:54 UTC (permalink / raw)
To: Dill; +Cc: git
In-Reply-To: <60646ee10901250941s34f7accem1b74fc201e895a41@mail.gmail.com>
On Sun, Jan 25, 2009 at 10:41:02AM -0700, Dill wrote:
> Is there a plan to include translations of the Documentation within
> Git or should they exist outside of the project?
I don't recall seeing any discussion on documentation translations
previously. But there is some precedent for having translations in the
tree, as git-gui's messages are translated into quite a few languages.
-Peff
^ permalink raw reply
* Re: [PATCH v1 3/3] git-gui hooks for new config variable "diff.primer"
From: Keith Cascio @ 2009-01-25 18:58 UTC (permalink / raw)
To: Johannes Schindelin, Shawn O Pearce
Cc: Junio C Hamano, Jeff King, Teemu Likonen, git
In-Reply-To: <alpine.DEB.1.00.0901251918230.14855@racer>
On Sun, 25 Jan 2009, Johannes Schindelin wrote:
> Rather than storing the information about how to call "git diff" as
> diff.primer, why don't you store that information in a config variable
> gui.whiteSpaceMode and teach "git gui" to call "git diff" accordingly?
>
> That would have the further advantage of not breaking other people's
> setups...
This wasn't just for the GUI. Using Git for a project I imported from CVS, I
wanted --ignore-space-at-eol to be in effect at all times on the command line.
Of course, the "alias.dff" approach suggested yesterday by Teemu would work for
that. But I got the feeling this is a more general need. I'll name my primary
inspiration: ExamDiff (a Windows program). ExamDiff lets you specify a wide
range of options that remain in effect over all invocations. Seems like
something a lot of users would find natural. Please comment.
> Please submit git-gui patches without the git-gui prefix, as it makes it
> harder on the maintainer of git-gui, Shawn (who you did not Cc: BTW).
Sorry Shawn, I should have Cc'd you. Please let me know if I can improve the
git-gui code in any way.
-- Keith
^ permalink raw reply
* [PATCH] Makefile: Make 'configure --with-expat=path' actually work
From: Serge van den Boom @ 2009-01-25 19:24 UTC (permalink / raw)
To: git
The prefix specified with the --with-expat option of configure was not
actually used.
Signed-off-by: Serge van den Boom <svdb@stack.nl>
---
diff --git a/Makefile b/Makefile
index b4d9cb4..e7218cb 100644
--- a/Makefile
+++ b/Makefile
@@ -849,7 +849,12 @@ else
endif
endif
ifndef NO_EXPAT
- EXPAT_LIBEXPAT = -lexpat
+ ifdef EXPATDIR
+ BASIC_CFLAGS += -I$(EXPATDIR)/include
+ EXPAT_LIBEXPAT = -L$(EXPATDIR)/$(lib) $(CC_LD_DYNPATH)$(EXPATDIR)/$(lib) -lexpat
+ else
+ EXPAT_LIBEXPAT = -lexpat
+ endif
endif
endif
^ permalink raw reply related
* Re: [PATCH v1 1/3] Introduce config variable "diff.primer"
From: Johannes Schindelin @ 2009-01-25 19:30 UTC (permalink / raw)
To: Keith Cascio; +Cc: Junio C Hamano, Jeff King, git
In-Reply-To: <alpine.GSO.2.00.0901251033160.12651@kiwi.cs.ucla.edu>
Hi,
On Sun, 25 Jan 2009, Keith Cascio wrote:
> On Sun, 25 Jan 2009, Johannes Schindelin wrote:
>
> > That would break existing scripts using "git diff" rather badly. We
> > already did not allow something like "git config alias.diff ..." from
> > changing the behavior of "git diff", so I cannot find a reason why we
> > should let diff.primer (a misnomer BTW) override the behavior.
>
> I took special care to protect all core scripts from the effects.
What about my scripts I have here locally? Do you want to change them,
too?
> I fact, by introducing the cpp macro DIFF_MACHINE_FRIENDLY() and the
> command-line options "--machine-friendly" and "--no-primer", I made such
> protection declarative. Don't you find it preferable that existing
> programs and scripts would explicitly declare their desire for
> machine-friendly output?
No. We made a promise long time ago that plumbing (and "git diff" is
pretty much plumbing, except for the configurable colorness) would not
change behind scripts' backs.
And since Shawn uses plumbing for that very reason, your diff.primer patch
would not be allowed to make a difference. Ever.
Now, if you would have changed only the UI diff things (i.e. git diff, but
not git diff-files), I could have accepted the diff.primer patch for
different applications than "git gui", but from cursory reading of your
patch it does not appear so.
Speaking of appearance (or for that matter, explaining why it was only a
cursory reading): did it not occur to you that your coding style is
utterly different from the surrounding code?
Just to number a few things that would definitely prohibit this patch from
being applied:
- space instead of tabs,
- horrible lengths of spaces within the line,
- no space after if, but after the parenthesis.
Now, this could be good explanation why you need the patch (to ignore
white-space), but that is not a reason of letting us suffer, too.
Besides, it seems you did a lot of "fixes" on the side that I do not like
at all. Simple example: if the original code cleared the
DIRSTAT_CUMULATIVE flag, it is not acceptable for you to introduce an
unnecessary if(), testing if the CUMULATIVE flag was set to begin with.
Ciao,
Dscho
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox