X Tutup
The Wayback Machine - https://web.archive.org/web/20201001020406/https://github.com/git-town/git-town/issues/960
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

fatal on existing lock file #960

Open
aeneasr opened this issue Jun 5, 2017 · 9 comments
Open

fatal on existing lock file #960

aeneasr opened this issue Jun 5, 2017 · 9 comments

Comments

@aeneasr
Copy link

@aeneasr aeneasr commented Jun 5, 2017

git hack fix-introspect-error

[remove-jose] git fetch --prune
remote: Counting objects: 1, done.
remote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), done.
From https://github.com/ory/fosite
   9abdfd0..d26aa4a  master     -> origin/master
 * [new tag]         v0.9.3     -> v0.9.3

cd C:/workspace/go/src/github.com/ory/fosite

[remove-jose] git checkout master
Switched to branch 'master'
Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
  (use "git pull" to update your local branch)

[master] git rebase origin/master
First, rewinding head to replay your work on top of it...
Fast-forwarded master to origin/master.

[master] git checkout -b fix-introspect-error master
Switched to a new branch 'fix-introspect-error'
2017/06/05 16:10:52 Command: git checkout remove-jose
Output: fatal: Unable to create 'C:/workspace/go/src/github.com/ory/fosite/.git/index.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.

Error: exit status 128


@charlierudolph
Copy link
Collaborator

@charlierudolph charlierudolph commented Jun 5, 2017

The error message it gives seems to explain the issue. I'm not certain if we can really plan for that type of failure

@aeneasr
Copy link
Author

@aeneasr aeneasr commented Jun 5, 2017

I would expect git-town to roll back any previous actions if possible

@charlierudolph
Copy link
Collaborator

@charlierudolph charlierudolph commented Jun 5, 2017

Any idea as to why this occurred on git checkout remove-jose (which is being ran at the end to preserve the checkout history) instead of the previous checkout commands?

@aeneasr
Copy link
Author

@aeneasr aeneasr commented Jun 5, 2017

nope, I was not running any parallel git functions which is why this tripped me.

@kevgo
Copy link
Contributor

@kevgo kevgo commented Jun 6, 2017

@arekkas did you have another Git client open, like IntelliJ of Github Desktop? They sometimes perform Git commands in the background. Git isn't thread-safe, it errs out when another Git process is currently doing something in the same repo.

@charlierudolph what do you think about automatically retrying (for like 3 times or so) when we encounter this error (with a 1 second delay in between runs to give the other Git process time to finish)?

@aeneasr
Copy link
Author

@aeneasr aeneasr commented Jun 6, 2017

Yes, IntelliJ was open, maybe that caused the issue!

@charlierudolph
Copy link
Collaborator

@charlierudolph charlierudolph commented Jun 6, 2017

@charlierudolph what do you think about automatically retrying (for like 3 times or so) when we encounter this error (with a 1 second delay in between runs to give the other Git process time to finish)?

@kevgo I'm not certain what commands we would do that with. Not all commands can be retried immediately and many fail for different reasons. I think the better approach would be just to plan for this error and allow abort / continue. This was an unexpected error which caused a panic.

@kevgo
Copy link
Contributor

@kevgo kevgo commented Jun 7, 2017

Okay, allowing abort or continue sounds good as well. Good idea.

@stale
Copy link

@stale stale bot commented Apr 26, 2020

This issue is losing momentum. Please help resolve it.

@stale stale bot added the wontfix label Apr 26, 2020
@kevgo kevgo removed the wontfix label Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.
X Tutup