Skip to content

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

@andry81

Description

@andry81

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions