Patchwork [3,of,3] subrepo: add partial diff support for git subrepos

login
register
mail settings
Submitter Matt Harbison
Date Dec. 12, 2014, 3:50 a.m.
Message ID <op.xqqky3lfjvu45r@envy>
Download mbox | patch
Permalink /patch/7063/
State Not Applicable
Headers show

Comments

Matt Harbison - Dec. 12, 2014, 3:50 a.m.
On Wed, 10 Dec 2014 04:48:48 -0500, Mathias De Maré  
<mathias.demare@gmail.com> wrote:

> # HG changeset patch
> # User Mathias De Maré <mathias.demare@gmail.com>
> # Date 1418203971 -3600
> #      Mit Dez 10 10:32:51 2014 +0100
> # Node ID 94fe82410ecaa9573c5b54c25e340713eb53b32d
> # Parent  239ccaaed78095a128fde4b1421de3d997068c6f
> subrepo: add partial diff support for git subrepos
>


I'm getting this test diff on Fedora 16 with git 1.7.7.6.  Not sure if  
this varies by git version or something else.
Mathias De Maré - Dec. 12, 2014, 9:05 a.m.
On Fri, Dec 12, 2014 at 4:50 AM, Matt Harbison <matt_harbison@yahoo.com>
wrote:
>
> On Wed, 10 Dec 2014 04:48:48 -0500, Mathias De Maré <
> mathias.demare@gmail.com> wrote:
>
>  # HG changeset patch
>> # User Mathias De Maré <mathias.demare@gmail.com>
>> # Date 1418203971 -3600
>> #      Mit Dez 10 10:32:51 2014 +0100
>> # Node ID 94fe82410ecaa9573c5b54c25e340713eb53b32d
>> # Parent  239ccaaed78095a128fde4b1421de3d997068c6f
>> subrepo: add partial diff support for git subrepos
>>
>>
>
> I'm getting this test diff on Fedora 16 with git 1.7.7.6.  Not sure if
> this varies by git version or something else.
>
> --- /home/matt/hg/tests/test-subrepo-git.t
> +++ /home/matt/hg/tests/test-subrepo-git.t.err
> @@ -773,9 +773,9 @@
>     bar (no-eol)
>
>    $ hg diff --subrepos --stat
> -  barfoo | 1 +
> -   foobar | 2 +-
> -   2 files changed, 2 insertions(+), 1 deletion(-) (no-eol)
> +  barfoo |    1 +
> +   foobar |    2 +-
> +   2 files changed, 2 insertions(+), 1 deletions(-) (no-eol)
>

It looks like there are a few changes in this area.
Git 1.7.10: "git diff --stat" learned to adjust the width of the output on
wider terminals, and give more columns to pathnames as needed.
Git 1.7.11: The output from "diff/log --stat" used to always allocate 4
columns to show the number of modified lines, but not anymore.

What is the advised way of handling such issues? I can use a glob or regex
to allow varying the amount of space.


>  ensure adding include/exclude ignores the subrepo
>    $ hg diff --subrepos -I s/foobar
>
Siddharth Agarwal - Dec. 12, 2014, 7:46 p.m.
On 12/12/2014 01:05 AM, Mathias De Maré wrote:
> What is the advised way of handling such issues? I can use a glob or
> regex to allow varying the amount of space.

A regex with an accompanying comment sounds fine to me.

Patch

--- /home/matt/hg/tests/test-subrepo-git.t
+++ /home/matt/hg/tests/test-subrepo-git.t.err
@@ -773,9 +773,9 @@ 
     bar (no-eol)

    $ hg diff --subrepos --stat
-  barfoo | 1 +
-   foobar | 2 +-
-   2 files changed, 2 insertions(+), 1 deletion(-) (no-eol)
+  barfoo |    1 +
+   foobar |    2 +-
+   2 files changed, 2 insertions(+), 1 deletions(-) (no-eol)

  ensure adding include/exclude ignores the subrepo
    $ hg diff --subrepos -I s/foobar