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

Crash at adding folder which is git repo by itself #108

Closed
kulik opened this issue Jun 3, 2020 · 4 comments
Closed

Crash at adding folder which is git repo by itself #108

kulik opened this issue Jun 3, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@kulik
Copy link

kulik commented Jun 3, 2020

Describe the bug
it's a crash when you stage folder which has .git folder inside, and still not a git-submodule
To Reproduce
Pre conditions. init repo, with git init, copy the other git repo inside.
Steps to reproduce the behavior:

  1. open gitui
  2. select coursor on folder which is repo
  3. hit enter
    crash

Expected behavior
At least nothing should happend
the best result it's to suggest to add it like git submodule.

Desktop (please complete the following information):

  • OS: Linux ubuntu
  • gitui v0.5.0

Additional context

gitui
Error: git error:invalid path: 'nginx/lua-lib/lua-resty-hmac/'; class=Index (10)

Caused by:
invalid path: 'nginx/lua-lib/lua-resty-hmac/'; class=Index (10)

where lua-resty-hmac/ - it's git repo by itself

@extrawurst
Copy link
Owner

Hey @kulik thanks for reporting this. Indeed this should not crash. but what is the expected behaviour? does the git cli support checking in this repo into the outer repo?

@extrawurst extrawurst added the bug Something isn't working label Jun 3, 2020
@kulik
Copy link
Author

kulik commented Jun 3, 2020

thereis a ugly way - just to comit it straight as it. i wouldn't expect that, probably it's normal for some cases with skiping .git folder. but the briliant way is
https://git-scm.com/book/en/v2/Git-Tools-Submodules
it's possible parse origins of internal git repo, and suggest user to add it as it or as submodule with current HEAD positio of it's parsed origin url, or suggest to enter other url but preserve HEAD

@extrawurst
Copy link
Owner

@kulik I cannot even figure out how to commit a .git subfolder using git-cli. it is simply ignored. so I am tending to simply swallow the error and ignore it in gitui aswell. submodules are a different can of worms

extrawurst pushed a commit that referenced this issue Jun 3, 2020
@extrawurst
Copy link
Owner

this is what should happen now:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants