git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Re: [RFC/WIP PATCH 0/4] less ignorance of submodules for ignore=all

From
Heiko Voigt <hvoigt@hvoigt.net>
Date
Dec 4, 2013, 23:19 UTC
Message-ID
<20131204231932.GG7326@sandbox-ub>
In-Reply-To
<xmqq7gbkjlgx.fsf@gitster.dls.corp.google.com>
On Wed, Dec 04, 2013 at 02:32:46PM -0800, Junio C Hamano wrote:
Show 17 quoted lines
> Heiko Voigt <hvoigt@hvoigt.net> writes:
> 
> > This is my current work in progress. Sergey it would be awesome if you
> > could test these and tell me whether the behaviour is what you would
> > expect. Once that is settled I will add some tests and possibly clean up
> > some code.
> >
> > Since nobody spoke against this change of behavior I assume that we
> > agree on the general approach I am taking here. If not please speak up
> > now so we can work something out and save me implementation time ;-)
> >
> > Whats still missing is:
> 
> Before listing what's missing, can you describe what "the general
> approach" is?  After all, that is what you are assuming that has got
> a silent concensus, but without getting it spelled out, others would
> easily miss what they "agreed" to.
Definitely, sorry I missed that (isn't it obvious ;-)):

This series tries to achieve the following goals for the submodule.<name>.ignore=all configuration or the --ignore-submodules=all command line switch.

 * Make git status never ignore submodule changes that got somehow in the
   index. Currently when ignore=all is specified they are and thus
   secretly committed. Basically always show exactly what will be
   committed.
 * Make add ignore submodules that have the ignore=all configuration when
   not explicitly naming a certain submodule (i.e. using git add .).
   That way ignore=all submodules are not added to the index by default.
   That can be overridden by using the -f switch so it behaves the same
   as with untracked files specified in one of the ignore files except
   that submodules are actually tracked.
 * Let diff always show submodule changes between revisions or
   between a revision and the index. Only worktree changes should be
   ignored with ignore=all.
 * Generally speaking: Make everything that displays diffs in history,
   diffs between revisions or between a revision and the index always
   show submodules changes (only the commit ids) even if a submodule is
   specified as ignore=all.
 * If ignore=all for a submodule and a diff would usually involve the
   worktree we will show the diff of the commit ids between the current
   index and the requested revision.
Show 7 quoted lines
> I do think that it is a good thing to make what "git add ." does and
> what "git status ." reports consistent, and "git add ." that does
> not add everything may be a good step in that direction (another
> possible solution may be to admit that ignore=all was a mistake and
> remove that special case altogether, so that "git status" will
> always report a submodule that does not match what is in the HEAD
> and/or index).

I think it was too early to add ignore=all back then when the ignoring was implemented. We did not think through all implications. Since people have always been requesting the floating model and as it seems started using it I am not so sure whether there is not a valid use case. Maybe Sergey can shed some light on their actual use case and why they do not care about the precise revision most of the time.

For example the case that all developers always want to work with some HEAD revision of all submodules and the build system then integrates their changes on a regular basis. When all went well it creates commits with the precise revisions. This way they have some stable points as fallback or for releases. Thats at least the use case I can think of but maybe there are others.

Cheers Heiko
Previous: Junio C HamanoNext: Jens Lehmann
Message 31 of 51 in “Git issues with submodules”
  1. Sergey SharybinNov 22, 2013
  2. Ramkumar RamachandraNov 22, 2013
  3. Sergey SharybinNov 22, 2013
  4. Ramkumar RamachandraNov 22, 2013
  5. Jeff KingNov 22, 2013
  6. Sergey SharybinNov 22, 2013
  7. Ramkumar RamachandraNov 22, 2013
  8. Sergey SharybinNov 22, 2013
  9. Sergey SharybinNov 22, 2013
  10. Ramkumar RamachandraNov 22, 2013
  11. Jens LehmannNov 22, 2013
  12. Sergey SharybinNov 22, 2013
  13. Heiko VoigtNov 22, 2013
  14. Jonathan NiederNov 22, 2013
  15. Jens LehmannNov 23, 2013
  16. Heiko VoigtNov 24, 2013
  17. Jens LehmannNov 24, 2013
  18. Sergey SharybinNov 25, 2013
  19. Heiko VoigtNov 25, 2013
  20. Sergey SharybinNov 25, 2013
  21. Heiko VoigtNov 25, 2013
  22. 0/4 less ignorance of submodules for ignore=allHeiko Voigt, Dec 4, 2013
  23. 1/4 disable complete ignorance of submodules for index <-> HEAD diffHeiko Voigt, Dec 4, 2013
  24. 2/4 fix 'git add' to skip submodules configured as ignoredHeiko Voigt, Dec 4, 2013
  25. 3/4 teach add -f option for ignored submodulesHeiko Voigt, Dec 4, 2013
  26. Junio C HamanoDec 6, 2013
  27. Heiko VoigtDec 9, 2013
  28. 4/4 always show committed submodules in summary after commitHeiko Voigt, Dec 4, 2013
  29. Heiko VoigtDec 4, 2013
  30. Junio C HamanoDec 4, 2013
  31. Heiko VoigtDec 4, 2013
  32. Jens LehmannDec 5, 2013
  33. Heiko VoigtDec 9, 2013
  34. Junio C HamanoDec 9, 2013
  35. Junio C HamanoNov 25, 2013
  36. Jens LehmannNov 26, 2013
  37. Junio C HamanoNov 26, 2013
  38. Jonathan NiederNov 26, 2013
  39. Junio C HamanoNov 26, 2013
  40. disable complete ignorance of submodules for index <-> HEAD diffHeiko Voigt, Nov 23, 2013
  41. Sergey SharybinNov 25, 2013
  42. Heiko VoigtNov 28, 2013
  43. disable complete ignorance of submodules for index <-> HEAD diffHeiko Voigt, Nov 29, 2013
  44. Ramkumar RamachandraNov 23, 2013
  45. Jens LehmannNov 23, 2013
  46. Heiko VoigtNov 24, 2013
  47. Junio C HamanoNov 25, 2013
  48. Heiko VoigtNov 29, 2013
  49. Ramkumar RamachandraNov 23, 2013
  50. Ramkumar RamachandraNov 22, 2013
  51. Jens LehmannNov 22, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.