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

Re: Git issues with submodules

From
Sergey Sharybin <sergey.vfx@gmail.com>
Date
Nov 22, 2013, 17:40 UTC
Message-ID
<CAErtv24P+wyZKvvuuPJJ0oxzMif7XtOwJDtKcTKQdKHZaAUbig@mail.gmail.com>
In-Reply-To
<CAErtv24Lv1JegCBQ=TXvOsgBNHp=Rphk5YVAq2qqRbNmqfNSkw@mail.gmail.com>
Ok, got it now.
To reproduce the issue:
- Run git submodule update --recursive to make sure their SHA is
changed. Then `git add /path/to/changed submodule` or just `git add .`
- Modify any file from the parent repository
- Neither of `git status`, `git diff` and `git diff-files --name-only`
will show changes to a submodule, only changes to that file which was
changed in parent repo.
- Make a git commit. It will not list changes to submodule as wll.
- `git show HEAD` will show changes to both file from and parent
repository (which is expected) and will also show changes to the
submodule hash (which is unexpected i'd say).
On Fri, Nov 22, 2013 at 11:01 PM, Sergey Sharybin <sergey.vfx@gmail.com> wrote:
Show 41 quoted lines
> Ah, didn't notice you're the author of that pull-request Ramkumar :)
>
> So guess issue with arc can be considered solved now. But i'm still
> collecting more details about how to manage to commit change addons
> hash without arc command even (it happens to Campbell Barton really
> often).
>
> Will report back when we'll know something.
>
> On Fri, Nov 22, 2013 at 10:35 PM, Ramkumar Ramachandra
> <artagnon@gmail.com> wrote:
>> Sergey Sharybin wrote:
>>> Ramkumar, not actually sure what you mean?
>>>
>>> For me `git diff --name-only HEAD --` ignores changes to submodules
>>> hash changes.
>>
>> `git diff --name-only HEAD --` compares the worktree to HEAD (listing
>> both staged and unstaged changes); we want `git diff --name-only --`
>> to compare the worktree to the index (listing only unstaged changes),
>> as Peff notes.
>>
>>> Also apparently it became a known TODO for phabricator
>>> developers [1].
>>
>> That was me :)
>>
>>> So, after all is it expected behavior of ls-files or not and if not
>>> shall i report it as a separate thread? :)
>>
>> Actually, I doubt it's worth fixing ls-files. Your problem should be
>> fixed when this is merged (hopefully in a few hours):
>>
>>   https://github.com/facebook/arcanist/pull/121
>>
>> Cheers.
>
>
>
> --
> With best regards, Sergey Sharybin
-- 
With best regards, Sergey Sharybin
Previous: Sergey SharybinNext: Ramkumar Ramachandra
Message 9 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.