Re: [PATCH] Show submodules as modified when they contain a dirty work tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 13.01.2010 23:10, schrieb Junio C Hamano:
> Jens Lehmann <Jens.Lehmann@xxxxxx> writes:
> I had to squash in '#include "submodule.h"' in diff-lib.c just after it
> includes "refs.h", though.

Sorry, i seem to repeatedly have missed the compiler warning :-(


> And a patch to add:
> 
>>> * It doesn't give detailed output when doing a "git diff* -p" with or
>>>   without the --submodule option. It should show something like
>>>
>>>     diff --git a/sub b/sub
>>>     index 5431f52..3f35670 160000
>>>     --- a/sub
>>>     +++ b/sub
>>>     @@ -1 +1 @@
>>>     -Subproject commit 5431f529197f3831cdfbba1354a819a79f948f6f
>>>     +Subproject commit 3f356705649b5d566d97ff843cf193359229a453-dirty
>>>
> 
> would look like the attached.

Thanks!


> I think a reasonable next step would be
> 
>  - Move the check for your condition (c) that we dropped from this round
>    to wt-status.c;
> 
>  - Add wt_status_print_dangling_submodules() to wt-status.c, and use the
>    above logic to produce a section "Submodules with Dangling HEAD" or
>    something.
> 
>  - Call it in wt_status_print(), immediately before we check s->verbose
>    and show the patch text under -v option.  "git status" now will warn
>    about the condition (c).
> 
>  - Add a similar wt_shortstatus_print_dangling_submodules() and call it at
>    the end of wt_shortstatus_print().
> 
>  - Update is_submodule_modified() in your patch thats reads the output
>    from "status --porcelain", to *ignore* information about dangling
>    submodules.  As we discussed, dangling submodules may be something the
>    user cares about, but that is not something "diff" should.

Great, i will send patches when i have something to show.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]