git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] Bad coloring
@ 2019-06-26  8:32 Eugen Konkov
  2019-06-26 12:24 ` Derrick Stolee
  0 siblings, 1 reply; 2+ messages in thread
From: Eugen Konkov @ 2019-06-26  8:32 UTC (permalink / raw)
  To: Git Mailing List

[-- Attachment #1: Type: text/plain, Size: 406 bytes --]

Hello,

For next diff the `}` line should not be detected as removed/added.

As  you can see there are differences only at new lines. (see attached
pics)

git version 2.21.0


git diff -b -w --ignore-blank-lines


git config:

[color "diff"]
    old = red bold
    new = green bold

[diff]
    tool = sublimerge
    colorMoved = default
    colorMovedWS = ignore-all-space



-- 
Best regards,
Eugen Konkov

[-- Attachment #2: diff --]
[-- Type: application/octet-stream, Size: 2907 bytes --]

--- a/Service.pm
+++ b/Service.pm
@@ -34,46 +34,4 @@ $X->set_primary_key("id");
 $X->has_many( service_types => $X, 'parent_id' );
 
 
-sub sqlt_deploy_hook {
-    my( $self, $sqlt_table ) =  @_;
-
-    my $sqlt =  $sqlt_table->schema;
-    $sqlt->add_procedure(
-        name =>  'service_level_tree',
-        parameters =>  [
-            { argmode => 'in',  type => 'integer' },
-        ],
-        extra =>  {
-            returns =>  { type => 'table( id int, parent_id int, name text, display text,
-            definitions =>  [
-                { language  =>  'sql' },
-                { attribute =>  'STABLE' },
-                { quote => "\$\$\n",  body => <<'   FUNC' =~ s!^\t!!grm  =~ s!;\n!;/**/\n
-        WITH RECURSIVE service_level_tree (id, parent_id, name, display, depth ) AS (
-            SELECT
-              id,
-              parent_id,
-              name,
-              display,
-              1
-            FROM service_level
-            WHERE id = $1
-            UNION
-            SELECT
-              sl.id,
-              sl.parent_id,
-              sl.name,
-              sl.display,
-              depth +1
-            FROM service_level_tree t
-            INNER JOIN service_level sl ON sl.id = t.parent_id
-            WHERE depth < 10   -- Prohibit deep hierarchy
-        )
-        SELECT * FROM service_level_tree;
-    FUNC
-    ]});
-
-}
-
-
 1;
diff --git a/ServiceLevel.pm b/S
index 73fa9dea..f7da48c8 100644
--- a/ServiceLevel.pm
+++ b/ServiceLevel.pm
@@ -34,4 +34,46 @@ $X->add_unique_constraint([ 'parent_id', 'name' ]);
 
 $X->has_many( service_levels => $X, 'parent_id' );
 
+
+sub sqlt_deploy_hook {
+    my( $self, $sqlt_table ) =  @_;
+
+    my $sqlt =  $sqlt_table->schema;
+    $sqlt->add_procedure(
+        name =>  'service_level_tree',
+        parameters =>  [
+            { argmode => 'in',  type => 'integer' },
+        ],
+        extra =>  {
+            returns =>  { type => 'table( id int, parent_id int, name text, display text,
+            definitions =>  [
+                { language  =>  'sql' },
+                { attribute =>  'STABLE' },
+                { quote => "\$\$\n",  body => <<'   FUNC' =~ s!^\t!!grm  =~ s!;\n!;/**/\n
+        WITH RECURSIVE service_level_tree (id, parent_id, name, display, depth ) AS (
+            SELECT
+              id,
+              parent_id,
+              name,
+              display,
+              1
+            FROM service_level
+            WHERE id = $1
+            UNION
+            SELECT
+              sl.id,
+              sl.parent_id,
+              sl.name,
+              sl.display,
+              depth +1
+            FROM service_level_tree t
+            INNER JOIN service_level sl ON sl.id = t.parent_id
+            WHERE depth < 10   -- Prohibit deep hierarchy
+        )
+        SELECT * FROM service_level_tree;
+    FUNC
+    ]});
+}
+
+
 1;

[-- Attachment #3: _.jpg --]
[-- Type: image/jpeg, Size: 6767 bytes --]

[-- Attachment #4: _2.jpg --]
[-- Type: image/jpeg, Size: 6551 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-26 12:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-26  8:32 [BUG] Bad coloring Eugen Konkov
2019-06-26 12:24 ` Derrick Stolee

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).