{"thread":{"id":"53112","subject":"Bug Report","startedAt":"2020-03-27T11:54:05Z","lastAt":"2020-03-31T07:27:00Z","messageCount":4,"participants":["James Yeoman","Pratyush Yadav"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"394165","messageId":"CAJ+U58yrKi=4VHRCAw68yAste=j3vzrvd2DoEW6QL-_sRWO2Aw@mail.gmail.com","threadId":"53112","inReplyTo":null,"subject":"Bug Report","fromName":"James Yeoman","fromEmail":"james.yeoman@appsbroker.com","sentAt":"2020-03-27T11:53:52Z","receivedAt":"2020-03-27T11:54:05Z","isPatch":false,"sender":{"key":"james.yeoman@appsbroker.com","avatar":null},"body":"gitk and git-gui are both not respecting git config.\n\nWhen I set the diff.algorithm global config to patience, the command\nline git respects the config. However, both gitk and git-gui don't.\nWhen I use \"git status -vv\" to get a diff of the working directory,\nthe diff produced respects the algorithm choice. The diff of the\nworking directory in gitk and git-gui both still use the default diff\nalgorithm, rather than the algorithm from the config.\n\n-- \n\n\n\n"},{"id":"394166","messageId":"20200327124140.643uxbt2kvjwfxri@yadavpratyush.com","threadId":"53112","inReplyTo":"CAJ+U58yrKi=4VHRCAw68yAste=j3vzrvd2DoEW6QL-_sRWO2Aw@mail.gmail.com","subject":"Re: Bug Report","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2020-03-27T12:59:13Z","receivedAt":"2020-03-27T12:59:19Z","isPatch":false,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"Hi James,\n\nOn 27/03/20 11:53AM, James Yeoman wrote:\n> gitk and git-gui are both not respecting git config.\n> \n> When I set the diff.algorithm global config to patience, the command\n> line git respects the config. However, both gitk and git-gui don't.\n> When I use \"git status -vv\" to get a diff of the working directory,\n> the diff produced respects the algorithm choice. The diff of the\n> working directory in gitk and git-gui both still use the default diff\n> algorithm, rather than the algorithm from the config.\n \nThanks for reporting. Can you please send steps to produce a simple \nscenario where the diff from two algorithms is different so I can test \nwhy git-gui is not respecting the config. Make them as minimal as \npossible.\n\nAlso, +Cc Paul, the gitk maintainer.\n\n-- \nRegards,\nPratyush Yadav\n"},{"id":"394330","messageId":"CAJ+U58zvMCxuL6a8yfdNHCfsBkivybWxTioPU-p_PtekAAOWuA@mail.gmail.com","threadId":"53112","inReplyTo":"CAJ+U58wHszg6amZivFEh=08N0ZNTcLHVFVyaCv0nQrzi_nx-UA@mail.gmail.com","subject":"Fwd: Bug Report","fromName":"James Yeoman","fromEmail":"james.yeoman@appsbroker.com","sentAt":"2020-03-30T08:18:18Z","receivedAt":"2020-03-30T08:18:32Z","isPatch":false,"sender":{"key":"james.yeoman@appsbroker.com","avatar":null},"body":"Sorry, my message got rejected because Gmail added html to the\nmessage, and when I went to resend my response (making sure it was in\nplain text mode), I must have clicked the wrong reply button\n\n---------- Forwarded message ---------\nFrom: James Yeoman <james.yeoman@appsbroker.com>\nDate: Fri, 27 Mar 2020 at 14:31\nSubject: Re: Bug Report\nTo: Pratyush Yadav <me@yadavpratyush.com>\n\n\nHi, of course\n\n=== File at commit 1 ===\nimport java.util.List;\n\npublic class Foo {\n    private int id;\n    private String name;\n    private List<Programme> programmes;\n\n    public Foo() {\n\n    }\n\n    public Foo(int id, String name, List<Programme> programmes) {\n        this.id = id;\n        this.name = name;\n        this.programmes = programmes;\n    }\n\n    // getters and setters\n}\n\n=== File in working area ===\n\nimport java.util.List;\n\npublic class Foo {\n    private int id;\n    private String name;\n    private List<Programme> programmes;\n\n    public Foo() {\n\n    }\n\n    public Foo(int id, String name) {\n        this.id = id;\n        this.name = name;\n    }\n\n    public Foo(int id, String name, List<Programme> programmes) {\n        this(id, name);\n        this.programmes = programmes;\n    }\n\n    // getters and setters\n}\n\n=== diff with default ===\n-    public Foo(int id, String name, List<Programme> programmes) {\n+    public Foo(int id, String name) {\n         this.id = id;\n         this.name = name;\n+    }\n+\n+    public Foo(int id, String name, List<Programme> programmes) {\n+        this(id, name);\n         this.programmes = programmes;\n     }\n\n=== diff with patience ===\n    public Foo(int id, String name) {\n+        this.id = id;\n+        this.name = name;\n+    }\n+\n     public Foo(int id, String name, List<Programme> programmes) {\n-        this.id = id;\n-        this.name = name;\n+        this(id, name);\n         this.programmes = programmes;\n     }\n\n\nOn Fri, 27 Mar 2020 at 12:59, Pratyush Yadav <me@yadavpratyush.com> wrote:\n>\n> Hi James,\n>\n> On 27/03/20 11:53AM, James Yeoman wrote:\n> > gitk and git-gui are both not respecting git config.\n> >\n> > When I set the diff.algorithm global config to patience, the command\n> > line git respects the config. However, both gitk and git-gui don't.\n> > When I use \"git status -vv\" to get a diff of the working directory,\n> > the diff produced respects the algorithm choice. The diff of the\n> > working directory in gitk and git-gui both still use the default diff\n> > algorithm, rather than the algorithm from the config.\n>\n> Thanks for reporting. Can you please send steps to produce a simple\n> scenario where the diff from two algorithms is different so I can test\n> why git-gui is not respecting the config. Make them as minimal as\n> possible.\n>\n> Also, +Cc Paul, the gitk maintainer.\n>\n> --\n> Regards,\n> Pratyush Yadav\n\n-- \n\n\n\n"},{"id":"394406","messageId":"20200331072647.vprlkjczj5c7oo7p@yadavpratyush.com","threadId":"53112","inReplyTo":"CAJ+U58zvMCxuL6a8yfdNHCfsBkivybWxTioPU-p_PtekAAOWuA@mail.gmail.com","subject":"Re: Fwd: Bug Report","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2020-03-31T07:26:47Z","receivedAt":"2020-03-31T07:27:00Z","isPatch":false,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"Hi James,\n\nOn 30/03/20 09:18AM, James Yeoman wrote:\n> Hi, of course\n> \n> === File at commit 1 ===\n> import java.util.List;\n> \n> public class Foo {\n>     private int id;\n>     private String name;\n>     private List<Programme> programmes;\n> \n>     public Foo() {\n> \n>     }\n> \n>     public Foo(int id, String name, List<Programme> programmes) {\n>         this.id = id;\n>         this.name = name;\n>         this.programmes = programmes;\n>     }\n> \n>     // getters and setters\n> }\n> \n> === File in working area ===\n> \n> import java.util.List;\n> \n> public class Foo {\n>     private int id;\n>     private String name;\n>     private List<Programme> programmes;\n> \n>     public Foo() {\n> \n>     }\n> \n>     public Foo(int id, String name) {\n>         this.id = id;\n>         this.name = name;\n>     }\n> \n>     public Foo(int id, String name, List<Programme> programmes) {\n>         this(id, name);\n>         this.programmes = programmes;\n>     }\n> \n>     // getters and setters\n> }\n> \n> === diff with default ===\n> -    public Foo(int id, String name, List<Programme> programmes) {\n> +    public Foo(int id, String name) {\n>          this.id = id;\n>          this.name = name;\n> +    }\n> +\n> +    public Foo(int id, String name, List<Programme> programmes) {\n> +        this(id, name);\n>          this.programmes = programmes;\n>      }\n\nI see this diff with both the default and patience algorithms on the \ncommand line tool.\n\nI ran:\n  $ git diff --diff-algorithm=default\nand\n  $ git diff --diff-algorithm=patience\n\nBoth yield the above diff. In fact, all 4 of \"default\", \"patience\", \n\"minimal\", and \"histogram\" yield the above diff.  Which version of Git \nare you running? I am on v2.25.2.\n\nPS: Please don't top post on the mailing list.\n \n> === diff with patience ===\n>     public Foo(int id, String name) {\n> +        this.id = id;\n> +        this.name = name;\n> +    }\n> +\n>      public Foo(int id, String name, List<Programme> programmes) {\n> -        this.id = id;\n> -        this.name = name;\n> +        this(id, name);\n>          this.programmes = programmes;\n>      }\n> \n> \n> On Fri, 27 Mar 2020 at 12:59, Pratyush Yadav <me@yadavpratyush.com> wrote:\n> >\n> > Hi James,\n> >\n> > On 27/03/20 11:53AM, James Yeoman wrote:\n> > > gitk and git-gui are both not respecting git config.\n> > >\n> > > When I set the diff.algorithm global config to patience, the command\n> > > line git respects the config. However, both gitk and git-gui don't.\n> > > When I use \"git status -vv\" to get a diff of the working directory,\n> > > the diff produced respects the algorithm choice. The diff of the\n> > > working directory in gitk and git-gui both still use the default diff\n> > > algorithm, rather than the algorithm from the config.\n> >\n> > Thanks for reporting. Can you please send steps to produce a simple\n> > scenario where the diff from two algorithms is different so I can test\n> > why git-gui is not respecting the config. Make them as minimal as\n> > possible.\n> >\n> > Also, +Cc Paul, the gitk maintainer.\n> >\n> > --\n> > Regards,\n> > Pratyush Yadav\n\n-- \nRegards,\nPratyush Yadav\n"}]}