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

error: you need to resolve your current index first #10

Open
andry81 opened this issue Jan 7, 2023 · 0 comments
Open

error: you need to resolve your current index first #10

andry81 opened this issue Jan 7, 2023 · 0 comments

Comments

@andry81
Copy link

andry81 commented Jan 7, 2023

If try to gil update w/o Administrator privileges then, the recursed external directories won't be created (because links creation required Administrator privileges). In that state all such external directories treated as altered or locally changed, and the gil pull together with the git status would report the working copy external directories as changed.

...\tacklelib>gil pull
Working path: ...\tacklelib
Discover git links: ...\tacklelib\.gitlinks
Discover git links: ...\tacklelib\_externals\contools\.gitlinks
Discover git links: ...\tacklelib\_externals\contools\_externals\svncmd\.gitlinks
Discover git links: ...\tacklelib\_externals\contools\_externals\tacklelib\.gitlinks
Running: git pull in ...\tacklelib
Already up to date.
Running: git checkout branch "master" in ...\tacklelib\_externals\contools
error: you need to resolve your current index first
_externals/svncmd: needs merge
_externals/tacklelib: needs merge
Traceback (most recent call last):
  File "C:\Python\x64\310\Scripts\gil.py", line 419, in <module>
    sys.exit(main())
  File "C:\Python\x64\310\Scripts\gil.py", line 411, in main
    context.command(sys.argv[1], sys.argv[2:])
  File "C:\Python\x64\310\Scripts\gil.py", line 261, in command
    self.git_checkout(record.path, record.branch)
  File "C:\Python\x64\310\Scripts\gil.py", line 328, in git_checkout
    raise Exception("Failed to run git checkout branch \"%s\" in %s" % (branch, path))
Exception: Failed to run git checkout branch "master" in ...\tacklelib\_externals\contools
...\tacklelib>gil status
Working path: ...\tacklelib
Discover git links: ...\tacklelib\.gitlinks
Discover git links: ...\tacklelib\_externals\contools\.gitlinks
Discover git links: ...\tacklelib\_externals\contools\_externals\svncmd\.gitlinks
Discover git links: ...\tacklelib\_externals\contools\_externals\tacklelib\.gitlinks
Running: git status in ...\tacklelib
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)
        modified:   _externals/contools (modified content)

no changes added to commit (use "git add" and/or "git commit -a")
Running: git checkout branch "master" in ...\tacklelib\_externals\contools
error: you need to resolve your current index first
_externals/svncmd: needs merge
_externals/tacklelib: needs merge
Traceback (most recent call last):
  File "C:\Python\x64\310\Scripts\gil.py", line 419, in <module>
    sys.exit(main())
  File "C:\Python\x64\310\Scripts\gil.py", line 411, in main
    context.command(sys.argv[1], sys.argv[2:])
  File "C:\Python\x64\310\Scripts\gil.py", line 261, in command
    self.git_checkout(record.path, record.branch)
  File "C:\Python\x64\310\Scripts\gil.py", line 328, in git_checkout
    raise Exception("Failed to run git checkout branch \"%s\" in %s" % (branch, path))
Exception: Failed to run git checkout branch "master" in ...\tacklelib\_externals\contools

To avoid that again needs to all externals erase and run gil update which triggers externals complete redownload and is not acceptable.

So without links creation (non Administrative mode) gil pull and gil status treats working copy as changed and git pull does not work w/o externals merge.

Conclusion: #6 (comment)

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

1 participant