git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Lehmann <Jens.Lehmann@web.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	"Shawn O. Pearce" <spearce@spearce.org>,
	Heiko Voigt <hvoigt@hvoigt.net>, Lars Hjemli <hjemli@gmail.com>
Subject: Re: [PATCH] Show submodules as modified when they contain a dirty work tree
Date: Thu, 14 Jan 2010 09:32:13 +0100	[thread overview]
Message-ID: <4B4ED68D.1060402@web.de> (raw)
In-Reply-To: <7v6375lkpj.fsf@alter.siamese.dyndns.org>

Am 13.01.2010 23:10, schrieb Junio C Hamano:
> Jens Lehmann <Jens.Lehmann@web.de> 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.

  reply	other threads:[~2010-01-14  8:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11 22:05 [RFC PATCH (WIP)] Show a dirty working tree and a detached HEAD in status for submodule Jens Lehmann
2010-01-11 22:45 ` Junio C Hamano
2010-01-12 16:20   ` Jens Lehmann
2010-01-13  7:09     ` Junio C Hamano
2010-01-13 18:59       ` [PATCH] Show submodules as modified when they contain a dirty work tree Jens Lehmann
2010-01-13 22:10         ` Junio C Hamano
2010-01-14  8:32           ` Jens Lehmann [this message]
2010-01-14 21:38           ` Jens Lehmann
2010-01-14 23:13             ` Junio C Hamano
2010-01-15  0:24               ` Jens Lehmann
2010-01-17 19:01               ` [PATCH] Performance optimization for detection of modified submodules Jens Lehmann
2010-01-17 20:01                 ` Junio C Hamano
2010-01-17 20:33                   ` Jens Lehmann
2010-01-15 13:32         ` [PATCH] Show submodules as modified when they contain a dirty work tree Nanako Shiraishi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B4ED68D.1060402@web.de \
    --to=jens.lehmann@web.de \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hjemli@gmail.com \
    --cc=hvoigt@hvoigt.net \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).