Skip to content
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

Bug: adding externals with tag reference generates an error #46

Open
francescopitzalis opened this issue Jan 18, 2019 · 1 comment
Open

Comments

@francescopitzalis
Copy link

francescopitzalis commented Jan 18, 2019

Steps to reproduce

mkdir test-git-externals
cd test-git-externals/
git init
echo "test" > README.md
git externals add --tag=v4.4 https://github.com/torvalds/linux.git Makefile Makefile
git add README.md git_externals.json
git commit -m "First commit"
git externals update

Expected outcome

The repository is cloned in .git_externals and the symlink is created in the root dir of the repository

Actual outcome

This stack trace:

Traceback (most recent call last):
  File "/usr/local/bin/git-externals", line 9, in <module>
    load_entry_point('git-externals==0.5.0', 'console_scripts', 'git-externals')()
  File "/Library/Python/2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Library/Python/2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Library/Python/2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Python/2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/git_externals/cli.py", line 106, in gitext_update
    externals_sanity_check()
  File "/Library/Python/2.7/site-packages/git_externals/git_externals.py", line 241, in externals_sanity_check
    foreach_externals(root, registry_add, recursive=True)
  File "/Library/Python/2.7/site-packages/git_externals/git_externals.py", line 156, in foreach_externals
    callback(rel_url, ext_path, externals[rel_url])
  File "/Library/Python/2.7/site-packages/git_externals/git_externals.py", line 239, in registry_add
    registry[url].add(ExtItem(ext['branch'], ext['ref'], path, ext.get('name', '')))
KeyError: u'branch'
@naufraghi
Copy link
Collaborator

Hi @francescopitzalis, thanks for reporting.

git-externals is in frozen mode, we are migrating our internal repos to a new tool that requires some step more (no partial repo support) but has some extra feature too: quark.

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

No branches or pull requests

2 participants