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

Re: git submodules implementation question

From
USUma Srinivasan <usrinivasan@twitter.com>
Date
Aug 30, 2016, 17:40 UTC
Message-ID
<CAN5XQftCC+TUm2Jx4q3V9oFbXndtFx3H+daoB3TD3eWUs6s54A@mail.gmail.com>
In-Reply-To
<CA+P7+xpGnsKzBPLVgPNSmZ7K00vY7-eJp7kSHWMRHM+cOsL_XQ@mail.gmail.com>

Thanks for the patch. Unfortunately, it doesn't help in my case as it invokes the is_submodule_modified() routine which you didn't modify. Here's my call trace....

#0  is_submodule_modified (path=path@entry=0x17c2f08 "groc", ignore_untracked=0)
    at submodule.c:939
#1  0x00000000004aa4dc in match_stat_with_submodule (
    diffopt=diffopt@entry=0x7fffffffde18, ce=ce@entry=0x17c2eb0,
    st=st@entry=0x7fffffffd840, ce_option=ce_option@entry=0,
    dirty_submodule=dirty_submodule@entry=0x7fffffffd83c) at diff-lib.c:81
#2  0x00000000004ab4f5 in run_diff_files (revs=revs@entry=0x7fffffffd920,
    option=option@entry=0) at diff-lib.c:217
#3  0x000000000054c0d4 in wt_status_collect_changes_worktree
(s=s@entry=0x7de280 <s>)
    at wt-status.c:559
#4  0x000000000054ecf6 in wt_status_collect (s=s@entry=0x7de280 <s>)
at wt-status.c:678
#5  0x0000000000422171 in cmd_status (argc=<optimized out>,
argv=<optimized out>,
    prefix=0x0) at builtin/commit.c:1390
#6  0x0000000000405abe in run_builtin (argv=<optimized out>,
argc=<optimized out>,
    p=<optimized out>) at git.c:352
#7  handle_builtin (argc=1, argv=0x7fffffffe570) at git.c:551
#8  0x0000000000405dd8 in run_argv (argv=0x7fffffffe320, argcp=0x7fffffffe32c)
    at git.c:606
#9  cmd_main (argc=1, argc@entry=2, argv=0x7fffffffe570,
argv@entry=0x7fffffffe568)
    at git.c:678
#10 0x0000000000405060 in main (argc=2, argv=0x7fffffffe568) at common-main.c:40
I think the following fix is still needed to is_submodule_modified():
        strbuf_addf(&buf, "%s/.git", path);
        git_dir = read_gitfile(buf.buf);
        if (!git_dir) {
                git_dir = buf.buf;
 ==>               if (!is_git_directory(git_dir)) {
 ==>                     die("Corrupted .git dir in submodule %s", path);
 ==>               }
        }

Thanks, Uma

On Mon, Aug 29, 2016 at 11:23 PM, Jacob Keller <jacob.keller@gmail.com> wrote:
Show 16 quoted lines
> On Mon, Aug 29, 2016 at 11:09 PM, Jacob Keller <jacob.keller@gmail.com> wrote:
>> On Mon, Aug 29, 2016 at 5:12 PM, Uma Srinivasan <usrinivasan@twitter.com> wrote:
>>> This is great! Thanks Jake. If you happen to have the patch ID it
>>> would be helpful.
>>>
>>> Uma
>>>
>>
>> http://public-inbox.org/git/1472236108.28343.5.camel@intel.com/
>
>
> Actually correct patch is
> http://public-inbox.org/git/20160825233243.30700-6-jacob.e.keller@intel.com/
>
> Thanks,
> Jake
Previous: Jacob KellerNext: Junio C Hamano
Message 13 of 31 in “git submodules implementation question”
  1. Uma SrinivasanAug 28, 2016
  2. Junio C HamanoAug 29, 2016
  3. Uma SrinivasanAug 29, 2016
  4. Junio C HamanoAug 29, 2016
  5. Uma SrinivasanAug 29, 2016
  6. Uma SrinivasanAug 29, 2016
  7. Junio C HamanoAug 29, 2016
  8. Uma SrinivasanAug 29, 2016
  9. Jacob KellerAug 30, 2016
  10. Uma SrinivasanAug 30, 2016
  11. Jacob KellerAug 30, 2016
  12. Jacob KellerAug 30, 2016
  13. Uma SrinivasanAug 30, 2016
  14. Junio C HamanoAug 30, 2016
  15. Uma SrinivasanAug 31, 2016
  16. Junio C HamanoAug 31, 2016
  17. Uma SrinivasanAug 31, 2016
  18. Junio C HamanoAug 31, 2016
  19. Uma SrinivasanAug 31, 2016
  20. Uma SrinivasanSep 1, 2016
  21. Junio C HamanoSep 1, 2016
  22. Uma SrinivasanSep 1, 2016
  23. Junio C HamanoSep 1, 2016
  24. Stefan BellerSep 1, 2016
  25. Junio C HamanoSep 1, 2016
  26. Junio C HamanoSep 1, 2016
  27. Junio C HamanoSep 1, 2016
  28. Stefan BellerSep 1, 2016
  29. Junio C HamanoSep 1, 2016
  30. Uma SrinivasanSep 1, 2016
  31. Junio C HamanoSep 1, 2016

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.