git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Sergey Sharybin <sergey.vfx@gmail.com>
To: git@vger.kernel.org
Subject: Git issues with submodules
Date: Fri, 22 Nov 2013 13:53:33 +0600	[thread overview]
Message-ID: <CAErtv26Q_YN+U+trjNac1aKLi9BvNHNNuaUkrr2RE0nB+yxWsw@mail.gmail.com> (raw)

Hey everyone from Blender developers!

As you might already know, we've recently switched from SVN to Git to
host Blender sources. In general it works really awesome, but we've
got some issues with submodules.

in SVN we had separate repositories for addons and translations which
were attached to main tree as svn:external. The reason for this was:

1. Separate commit access between core sources and addons so nobody
accidentally breaks anything in the core.
2. Separate commit history to help tracking issues down.

For the most developers and all artists (yes, we've got loads of
artists who builds blender on their own) it makes sense to always
checkout latest versions of addons and translations when updating
working tree.

We used Git submodules as a replacement for svn:external, with some
tweaks and specific of update procedure.

Namely, we always do `git submodule update --remote` to pull all the
latest changes from submodules. This will mark checkout as modified
because submodule hash changes. To avoid infinite commits of submodule
hash we've added ignore=all to their configuration.

In most cases it works fine, but there're some circumstances when it
gives weirdo issues.

Namely, `git ls-files -m` will show addons as modified, regardless
ignore=all configuration. In the same time `git diff-index --name-only
HEAD --` will show no changes at all.

This leads to issues with Arcanist (which is a Phabricator's tool) who
considers addons as uncommited changes and either complains on this or
just adds this to commits.

This issue i might easily reproduce on my laptop with latest Git
1.8.4.3. There're also some more issues which happens to our
developers and which i can not quite reproduce.

Sometimes it happens so git checkout to another branch yields about
uncommited changes to addons and doesn't checkout to another branch.

My guess here is that submodule hash in master and branch was
different and having hash modified in master somehow prevented changes
from another branch to be checked out. In this case question would be:
what would be the proper way to checkout branches when having
submodules configured this way?

Second issue is that some developers still manages to commit changes
to submodule hash, which i have totally no idea why Git allows to
include such a changes. I could not do such a commits on purpose even.

Here're some links to help understanding what's going on:

- Blender repository browser: http://developer.blender.org/diffusion/B/
- Task in our tracker about issues we've got with Git:
http://developer.blender.org/T37528
- History of changes to addons hash:
http://developer.blender.org/diffusion/B/history/master/release/scripts/addons

We're totally new to git submodules and clarification (and maybe even
confirmed bug with ls-files -m :) would really be appreciated. We're
also open for suggestions about re-configuring our submodules so they
works in a way we'd expect this.

Thanks in advance!

-- 
With best regards, Sergey Sharybin

             reply	other threads:[~2013-11-22  7:53 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22  7:53 Sergey Sharybin [this message]
2013-11-22 11:16 ` Git issues with submodules Ramkumar Ramachandra
2013-11-22 11:35   ` Sergey Sharybin
2013-11-22 13:08     ` Ramkumar Ramachandra
2013-11-22 15:11       ` Jeff King
2013-11-22 15:42         ` Sergey Sharybin
2013-11-22 16:35           ` Ramkumar Ramachandra
2013-11-22 17:01             ` Sergey Sharybin
2013-11-22 17:40               ` Sergey Sharybin
2013-11-22 18:11                 ` Ramkumar Ramachandra
2013-11-22 21:01                   ` Jens Lehmann
2013-11-22 21:46                     ` Sergey Sharybin
2013-11-22 21:54                     ` Heiko Voigt
2013-11-22 22:09                       ` Jonathan Nieder
2013-11-23 20:10                         ` Jens Lehmann
2013-11-24  0:52                           ` Heiko Voigt
2013-11-24 16:29                             ` Jens Lehmann
2013-11-25  9:02                               ` Sergey Sharybin
2013-11-25 17:49                                 ` Heiko Voigt
2013-11-25 17:57                                   ` Sergey Sharybin
2013-11-25 18:15                                     ` Heiko Voigt
2013-12-04 22:16                                     ` [RFC/WIP PATCH 0/4] less ignorance of submodules for ignore=all Heiko Voigt
2013-12-04 22:19                                       ` [RFC/WIP PATCH 1/4] disable complete ignorance of submodules for index <-> HEAD diff Heiko Voigt
2013-12-04 22:21                                       ` [RFC/WIP PATCH 2/4] fix 'git add' to skip submodules configured as ignored Heiko Voigt
2013-12-04 22:21                                       ` [RFC/WIP PATCH 3/4] teach add -f option for ignored submodules Heiko Voigt
2013-12-06 23:10                                         ` Junio C Hamano
2013-12-09 21:51                                           ` Heiko Voigt
2013-12-04 22:23                                       ` [RFC/WIP PATCH 4/4] always show committed submodules in summary after commit Heiko Voigt
2013-12-04 22:26                                       ` [RFC/WIP PATCH 0/4] less ignorance of submodules for ignore=all Heiko Voigt
2013-12-04 22:32                                       ` Junio C Hamano
2013-12-04 23:19                                         ` Heiko Voigt
2013-12-05 20:51                                           ` Jens Lehmann
2013-12-09 21:41                                             ` Heiko Voigt
2013-12-09 22:25                                             ` Junio C Hamano
2013-11-25 21:01                               ` Git issues with submodules Junio C Hamano
2013-11-26 18:44                                 ` Jens Lehmann
2013-11-26 19:33                                   ` Junio C Hamano
2013-11-26 19:51                                     ` Jonathan Nieder
2013-11-26 22:19                                       ` Junio C Hamano
2013-11-23  1:11                       ` [RFC PATCH] disable complete ignorance of submodules for index <-> HEAD diff Heiko Voigt
2013-11-25  9:01                         ` Sergey Sharybin
2013-11-28  7:10                           ` Heiko Voigt
2013-11-29 23:11                             ` [RFC/WIP PATCH v2] " Heiko Voigt
2013-11-23  7:04                       ` Re: Git issues with submodules Ramkumar Ramachandra
2013-11-23 20:32                       ` Jens Lehmann
2013-11-24  1:06                         ` Heiko Voigt
2013-11-25 20:53                       ` Junio C Hamano
2013-11-29 22:50                         ` Heiko Voigt
2013-11-23  6:53                     ` Ramkumar Ramachandra
2013-11-22 16:12         ` Ramkumar Ramachandra
2013-11-22 20:20           ` Jens Lehmann

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=CAErtv26Q_YN+U+trjNac1aKLi9BvNHNNuaUkrr2RE0nB+yxWsw@mail.gmail.com \
    --to=sergey.vfx@gmail.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).