{"thread":{"id":"63177","subject":"-w flag of git diff command hide lines which should not be hidden","startedAt":"2025-03-22T22:28:01Z","lastAt":"2025-03-22T22:28:01Z","messageCount":1,"participants":["Eugen Konkov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"514863","messageId":"1582116710.20250322182756@yandex.ru","threadId":"63177","inReplyTo":null,"subject":"-w flag of git diff command hide lines which should not be hidden","fromName":"Eugen Konkov","fromEmail":"kes-kes@yandex.ru","sentAt":"2025-03-22T22:27:56Z","receivedAt":"2025-03-22T22:28:01Z","isPatch":false,"sender":{"key":"kes-kes@yandex.ru","avatar":null},"body":"I  got  merge  conflict and want to see changes ignoring difference in\nwhitespace.\n\n>        -w, --ignore-all-space\n           Ignore whitespace when comparing lines. This ignores differences even if one\n           line has whitespace where the other line has none.\n\nFrom  here  you  can  see that not only white space was changed. It is\n\"name\" -> \"qualified_name\" change.\n\nBut when I add -w flag those lines are hidden from the output.\n\nThose lines should not be hidden.\n\nThank you.\n\n```\n $ git diff -b --ignore-blank-lines --minimal /home/kes/work/projects/github-forks/sql-translator/lib/SQL/Translator/Diff.pm\ndiff --cc lib/SQL/Translator/Diff.pm\nindex 1d9ac40f,6c3e64a9..00000000\n--- a/lib/SQL/Translator/Diff.pm\n+++ b/lib/SQL/Translator/Diff.pm\n@@@ -152,10 -169,10 +152,10 @@@ sub compute_differences \n  \n    my %src_tables_checked = ();\n    my %src_tables_deleted = ();\n-   my @tar_tables         = sort { $a->name cmp $b->name } $target_schema->get_tables;\n+   my @tar_tables         = sort { $a->qualified_name cmp $b->qualified_name } $target_s>\n    ## do original/source tables exist in target?\n -    for my $tar_table ( @tar_tables ) {\n +  for my $tar_table (@tar_tables) {\n-     my $tar_table_name = $tar_table->name;\n+     my $tar_table_name = $tar_table->qualified_name;\n  \n      my $src_table;\n  \n $ git diff -w -b --ignore-blank-lines --minimal /home/kes/work/projects/github-forks/sql-translator/lib/SQL/Translator/Diff.pm\ndiff --cc lib/SQL/Translator/Diff.pm\nindex 1d9ac40f,6c3e64a9..00000000\n--- a/lib/SQL/Translator/Diff.pm\n+++ b/lib/SQL/Translator/Diff.pm\n $ git --version\ngit version 2.49.0\n $ git status\ninteractive rebase in progress; onto 1ef083ed\nLast commands done (13 commands done):\n   pick 354a27a9 Fix multiple arguments handling\n   pick 1bfbcdad Introduce and use Postgres in-database schemas * Add CREATE SCHEMA to DDL * Use table schema-qualified names where possible * Support for diffs on in-db schemas\n  (see more in file .git/rebase-merge/done)\nNext commands to do (4 remaining commands):\n   pick 5535f6a3 Fix tests after new layout for created functions\n   pick 3c08c7c8 Add qualified_name's to MySQL producer - after table name parsing changes\n  (use \"git rebase --edit-todo\" to view and edit)\nYou are currently rebasing.\n  (fix conflicts and then run \"git rebase --continue\")\n  (use \"git rebase --skip\" to skip this patch)\n  (use \"git rebase --abort\" to check out the original branch)\n\nChanges to be committed:\n  (use \"git restore --staged <file>...\" to unstage)\n        modified:   t/13schema.t\n\nUnmerged paths:\n  (use \"git restore --staged <file>...\" to unstage)\n  (use \"git add <file>...\" to mark resolution)\n        both modified:   lib/SQL/Translator/Diff.pm\n        both modified:   lib/SQL/Translator/Parser/PostgreSQL.pm\n        both modified:   lib/SQL/Translator/Producer/PostgreSQL.pm\n        both modified:   lib/SQL/Translator/Schema.pm\n        both modified:   lib/SQL/Translator/Schema/Table.pm\n        both modified:   lib/SQL/Translator/Schema/Trigger.pm\n        both modified:   t/14postgres-parser.t\n```\n\n\n-- \nBest regards,\nEugen Konkov\n\n"}]}