From: Orgad Shaneh <orgads@gmail.com>
To: Brandon Williams <bmwill@google.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
git <git@vger.kernel.org>
Subject: Re: Regression[2.14.3->2.15]: Interactive rebase fails if submodule is modified
Date: Mon, 6 Nov 2017 22:36:18 +0200 [thread overview]
Message-ID: <CAGHpTBJ9QpEeumzZuO2DeNS-6a6oL2Vn0WNZrm1nt0qFcLfJyw@mail.gmail.com> (raw)
In-Reply-To: <20171106183702.GA131418@google.com>
On Mon, Nov 6, 2017 at 8:37 PM, Brandon Williams <bmwill@google.com> wrote:
> After reading your bug report and the fact that you weren't able to
> reproduce it outside of your project I think i figured out what is
> happening. Before ff6f1f564c the gitmodules file wasn't being loaded
> unless a codepath explicitly wanted to work with submodules. Now they
> are being lazy-loaded so if you call into the submodule config subsystem
> it'll work without having to have initialized it before. I suspect
> that the submodule which is causing the failure has a
> "submodule.<name>.ignore" entry in the .gitmodules file or somewhere in
> your repositories config (I actually suspect the latter based on the
> code path).
>
> When rebase calls into the diff machinery to see if there are unstaged
> changes it explicitly requests that submodule's be ignored, but this
> desired gets overridden by your repository's config, clearing the
> ignored flag and making rebase actually pay attention to the fact that
> the submodule has changes in it.
>
> I don't have a patch available to for you to test just yet (but I'll
> have some time later today to write one up) but could you verify that
> (1) you have an ignore entry for the submodule in question in your
> config and (2) removing it from your config avoids the failure? If
> that's the case then we would be able to put together a reproducible
> recipe for this failure.
You're right. Thanks for the info. I have ignore = dirty, and removing
it from the config solves the problem indeed.
The following script reproduces the bug (it's the same as before, only
added git config):
rm -rf super sub
mkdir sub; cd sub; git init
git commit --allow-empty -m 'Initial commit'
mkdir ../super; cd ../super
git init
git submodule add ../sub
git config submodule.sub.ignore dirty
touch foo; git add foo sub
git commit -m 'Initial commit'
touch a; git add a; git commit -m 'a'
touch b; git add b; git commit -m 'b'
cd sub; git commit --allow-empty -m 'New commit'; cd ..
git rebase -i HEAD^^
- Orgad
prev parent reply other threads:[~2017-11-06 20:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-02 8:30 Regression[2.14.3->2.15]: Interactive rebase fails if submodule is modified Orgad Shaneh
2017-11-02 18:34 ` Stefan Beller
2017-11-02 21:45 ` Orgad Shaneh
2017-11-03 16:06 ` Johannes Schindelin
2017-11-03 16:20 ` Johannes Schindelin
2017-11-04 18:04 ` Orgad Shaneh
2017-11-05 7:30 ` Orgad Shaneh
2017-11-06 18:37 ` Brandon Williams
2017-11-06 20:36 ` Orgad Shaneh [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGHpTBJ9QpEeumzZuO2DeNS-6a6oL2Vn0WNZrm1nt0qFcLfJyw@mail.gmail.com \
--to=orgads@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=bmwill@google.com \
--cc=git@vger.kernel.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).