Skip to content

Repo.submodule_update throws BadName error #864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
keestux opened this issue Apr 23, 2019 · 2 comments
Open

Repo.submodule_update throws BadName error #864

keestux opened this issue Apr 23, 2019 · 2 comments

Comments

@keestux
Copy link

keestux commented Apr 23, 2019

The function submodule_update gets confused when there are multiple submodules, especially when one of the submodules has an update. In that case the commit hash is used for the wrong submodule. It is hard to debug, because running the same update again does not show the error.

With debug logging you'll see that update info lines are accumulated, but the code isn't expecting this to be the case.

[10:16.56] git.cmd      DEBUG    Popen(['git', 'fetch', '--prune', '-v', 'origin'], cwd=/foo/mainrepo, universal_newlines=True, shell=None)
[10:16.56] git.cmd      DEBUG    Popen(['git', 'tag', '-d'], cwd=/foo/mainrepo, universal_newlines=False, shell=None)
[10:16.56] git.cmd      DEBUG    Popen(['git', 'fetch', '--prune', '--tags', '-v', 'origin'], cwd=/foo/mainrepo, universal_newlines=True, shell=None)
[10:16.57] git.cmd      DEBUG    Popen(['git', 'diff', '--cached', '--abbrev=40', '--full-index', '--raw'], cwd=/foo/mainrepo, universal_newlines=False, shell=None)
[10:16.57] git.cmd      DEBUG    Popen(['git', 'diff', '--abbrev=40', '--full-index', '--raw'], cwd=/foo/mainrepo, universal_newlines=False, shell=None)
[10:16.57] git.cmd      DEBUG    Popen(['git', 'reset', '--hard', 'origin/master', '--'], cwd=/foo/mainrepo, universal_newlines=False, shell=None)
[10:16.57] git.cmd      DEBUG    Popen(['git', 'cat-file', '--batch-check'], cwd=/foo/mainrepo, universal_newlines=False, shell=None)
[10:16.57] git.cmd      DEBUG    Popen(['git', 'cat-file', '--batch'], cwd=/foo/mainrepo, universal_newlines=False, shell=None)
[10:16.57] git.cmd      DEBUG    Popen(['git', 'version'], cwd=/foo/mainrepo/sub1, universal_newlines=False, shell=None)
[10:16.57] git.cmd      DEBUG    Popen(['git', 'fetch', '--progress', '-v', 'origin'], cwd=/foo/mainrepo/sub1, universal_newlines=True, shell=None)
[10:16.58] git.cmd      DEBUG    Popen(['git', 'cat-file', '--batch-check'], cwd=/foo/mainrepo/sub1, universal_newlines=False, shell=None)
[10:16.58] git.cmd      DEBUG    Popen(['git', 'cat-file', '--batch-check'], cwd=/foo/mainrepo/sub1, universal_newlines=False, shell=None)
[10:16.58] git.cmd      DEBUG    Popen(['git', 'cat-file', '--batch'], cwd=/foo/mainrepo/sub1, universal_newlines=False, shell=None)
[10:16.58] git.cmd      DEBUG    Popen(['git', 'version'], cwd=/foo/mainrepo/sub2, universal_newlines=False, shell=None)
[10:16.58] git.cmd      DEBUG    Popen(['git', 'fetch', '--progress', '-v', 'origin'], cwd=/foo/mainrepo/sub2, universal_newlines=True, shell=None)
[10:16.58] git.remote   DEBUG    Fetch head lines do not match lines provided via progress information
length of progress lines 80 should be equal to lines in FETCH_HEAD file 19
Will ignore extra progress lines or fetch head lines.
[10:16.58] git.cmd      DEBUG    Popen(['git', 'cat-file', '--batch-check'], cwd=/foo/mainrepo/sub2, universal_newlines=False, shell=None)
[10:16.58] git.cmd      DEBUG    Popen(['git', 'cat-file', '--batch-check'], cwd=/foo/mainrepo/sub2, universal_newlines=False, shell=None)
[10:16.58] git.cmd      DEBUG    Popen(['git', 'cat-file', '--batch'], cwd=/foo/mainrepo/sub2, universal_newlines=False, shell=None)
[10:16.58] git.cmd      DEBUG    Popen(['git', 'version'], cwd=/foo/mainrepo/sub3, universal_newlines=False, shell=None)
[10:16.58] git.cmd      DEBUG    Popen(['git', 'fetch', '--progress', '-v', 'origin'], cwd=/foo/mainrepo/sub3, universal_newlines=True, shell=None)
[10:16.58] git.remote   DEBUG    Fetch head lines do not match lines provided via progress information
length of progress lines 85 should be equal to lines in FETCH_HEAD file 5
Will ignore extra progress lines or fetch head lines.
[10:16.58] git.cmd      DEBUG    Popen(['git', 'cat-file', '--batch-check'], cwd=/foo/mainrepo/sub3, universal_newlines=False, shell=None)
[10:16.58] git.cmd      DEBUG    Popen(['git', 'cat-file', '--batch-check'], cwd=/foo/mainrepo/sub3, universal_newlines=False, shell=None)
[10:16.58] git.cmd      DEBUG    Popen(['git', 'cat-file', '--batch'], cwd=/foo/mainrepo/sub3, universal_newlines=False, shell=None)
[10:16.58] git.cmd      DEBUG    Popen(['git', 'version'], cwd=/foo/mainrepo/sub4, universal_newlines=False, shell=None)
[10:16.58] git.cmd      DEBUG    Popen(['git', 'fetch', '--progress', '-v', 'origin'], cwd=/foo/mainrepo/sub4, universal_newlines=True, shell=None)
[10:16.59] git.remote   DEBUG    Fetch head lines do not match lines provided via progress information
length of progress lines 92 should be equal to lines in FETCH_HEAD file 7
Will ignore extra progress lines or fetch head lines.
[10:16.59] git.cmd      DEBUG    Popen(['git', 'cat-file', '--batch-check'], cwd=/foo/mainrepo/sub4, universal_newlines=False, shell=None)
[10:16.59] git.cmd      DEBUG    Popen(['git', 'cat-file', '--batch-check'], cwd=/foo/mainrepo/sub4, universal_newlines=False, shell=None)
[10:16.59] git.cmd      DEBUG    Popen(['git', 'cat-file', '--batch'], cwd=/foo/mainrepo/sub4, universal_newlines=False, shell=None)
[10:16.59] git.cmd      DEBUG    Popen(['git', 'version'], cwd=/foo/mainrepo/sub4/shared/gcomponent, universal_newlines=False, shell=None)
[10:16.59] git.cmd      DEBUG    Popen(['git', 'fetch', '--progress', '-v', 'origin'], cwd=/foo/mainrepo/sub4/shared/gcomponent, universal_newlines=True, shell=None)
[10:16.59] git.remote   DEBUG    Fetch head lines do not match lines provided via progress information
length of progress lines 95 should be equal to lines in FETCH_HEAD file 3
Will ignore extra progress lines or fetch head lines.
[10:16.59] git.cmd      DEBUG    Popen(['git', 'cat-file', '--batch-check'], cwd=/foo/mainrepo/sub4/shared/gcomponent, universal_newlines=False, shell=None)
[10:16.59] git.cmd      DEBUG    Popen(['git', 'cat-file', '--batch-check'], cwd=/foo/mainrepo/sub4/shared/gcomponent, universal_newlines=False, shell=None)
[10:16.59] git.cmd      DEBUG    Popen(['git', 'cat-file', '--batch'], cwd=/foo/mainrepo/sub4/shared/gcomponent, universal_newlines=False, shell=None)
[10:16.59] git.cmd      DEBUG    Popen(['git', 'version'], cwd=/foo/mainrepo/sub5, universal_newlines=False, shell=None)
[10:16.59] git.cmd      DEBUG    Popen(['git', 'fetch', '--progress', '-v', 'origin'], cwd=/foo/mainrepo/sub5, universal_newlines=True, shell=None)
[10:16.59] git.remote   DEBUG    Fetch head lines do not match lines provided via progress information
length of progress lines 99 should be equal to lines in FETCH_HEAD file 4
Will ignore extra progress lines or fetch head lines.
[10:16.59] git.cmd      DEBUG    Popen(['git', 'cat-file', '--batch-check'], cwd=/foo/mainrepo/sub5, universal_newlines=False, shell=None)
[10:17.00] git.cmd      DEBUG    Popen(['git', 'cat-file', '--batch-check'], cwd=/foo/mainrepo/sub5, universal_newlines=False, shell=None)
[10:17.00] git.cmd      DEBUG    Popen(['git', 'cat-file', '--batch'], cwd=/foo/mainrepo/sub5, universal_newlines=False, shell=None)
[10:17.00] git.cmd      DEBUG    Popen(['git', 'diff', '--cached', '--abbrev=40', '--full-index', '--raw'], cwd=/foo/mainrepo, universal_newlines=False, shell=None)
[10:17.00] git.cmd      DEBUG    Popen(['git', 'diff', '--abbrev=40', '--full-index', '--raw'], cwd=/foo/mainrepo, universal_newlines=False, shell=None)
@Byron
Copy link
Member

Byron commented Jul 20, 2019

Thanks for letting me know. I acknowledge it on behalf of knowing that the submodule capabilities are quite buggy :/.

@Flow86
Copy link

Flow86 commented Apr 21, 2021

is there any workaround or fix already?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants