From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Lehmann Subject: Re: [PATCH] commit: configure submodules Date: Mon, 24 Sep 2012 21:56:11 +0200 Message-ID: <5060BADB.2000505@web.de> References: <1348385867-17359-1-git-send-email-orgads@gmail.com> <7vr4pt16ep.fsf@alter.siamese.dyndns.org> <505F5151.2080208@web.de> <7vmx0g0xpm.fsf@alter.siamese.dyndns.org> <7v39271j3n.fsf@alter.siamese.dyndns.org> <5060A32D.1060902@web.de> <7vlifzz2vo.fsf@alter.siamese.dyndns.org> <7vy5jzxmts.fsf@alter.siamese.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Junio C Hamano , git@vger.kernel.org To: Orgad Shaneh X-From: git-owner@vger.kernel.org Mon Sep 24 21:56:30 2012 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TGElY-0003Rr-Vz for gcvg-git-2@plane.gmane.org; Mon, 24 Sep 2012 21:56:29 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757952Ab2IXT4U (ORCPT ); Mon, 24 Sep 2012 15:56:20 -0400 Received: from mout.web.de ([212.227.17.11]:63563 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757873Ab2IXT4T (ORCPT ); Mon, 24 Sep 2012 15:56:19 -0400 Received: from [192.168.178.41] ([91.3.184.50]) by smtp.web.de (mrweb002) with ESMTPA (Nemesis) id 0M5fhI-1TeL9K0Gu8-00xVlM; Mon, 24 Sep 2012 21:56:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 In-Reply-To: X-Provags-ID: V02:K0:VoKmM7eeW/QkSnvCqzlD5UNgA1L3DC2vmiqhzgbv4/U oWRKc1O0ekhP5Qo6k/gPuD9b+oJ1OtU4T80LNl2XmPnEqjPWLW I1f5o5dOMh9yp9Qt2QFi2KiKOdeAZhevK6pDCY/USjgwDcDwRW +7LyWREFZyawPVKZGtkMNE9810zhMZzWLKCtawSPL3epoj4rgC kCvgUzR6ojD2cvbZjdoUw== Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Am 24.09.2012 21:16, schrieb Orgad Shaneh: > On Mon, Sep 24, 2012 at 9:06 PM, Junio C Hamano wrote: >> Orgad Shaneh writes: >> >>> That is not correct. git-config is ignored as well for commit. >> >> What do you mean? As far as I can tell, if you have >> >> [submodule "var"] >> path = var >> ignore = dirty >> >> in $GIT_DIR/config, a work-tree-dirty submodule "var" is not >> reported by "git status" and "git commit" without your patch, and >> your patch does not seem to break that. The only difference your >> patch makes is that if you had the above three-line block in >> the .gitmodules file and not in $GIT_DIR/config, "git status" >> ignored the dirtyness in the working tree, but "git commit" did >> notice and report it. >> >> What am I missing? >> >> > > I have: > [submodule "mod"] > url = [...] > ignore = dirty > > in .git/config, and I removed the ignore part from .gitmodules to be even. > > I made a change inside mod, git status doesn't report its dirtiness, > while git commit does. > > git status: > # On branch master > # Changes to be committed: > # (use "git reset HEAD ..." to unstage) > # > # modified: foo > # > # Changes not staged for commit: > # (use "git add ..." to update what will be committed) > # (use "git checkout -- ..." to discard changes in working directory) > # > # modified: .gitmodules > # > > git commit: > # Please enter the commit message for your changes. Lines starting > # with '#' will be ignored, and an empty message aborts the commit. > # On branch master > # Changes to be committed: > # (use "git reset HEAD ..." to unstage) > # > # modified: foo > # > # Changes not staged for commit: > # (use "git add ..." to update what will be committed) > # (use "git checkout -- ..." to discard changes in working directory) > # (commit or discard the untracked or modified content in submodules) > # > # modified: .gitmodules > # modified: mod (modified content) > # > > Now I get it! That's because I don't have submodule.mod.path! > config_name_for_path only gets initialized if path exists. Apparently > git submodule init doesn't configure 'path', so it stays > uninitialized. But submodule.mod.path should only be set in .gitmodules, not in $GIT_DIR/config. Did you just remove the ignore setting from .gitmodules or the path too?