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

[NBug] Unexpected artificial commit in Git command: 11111111111111... #6535

Closed
xinfli opened this issue May 6, 2019 · 9 comments · Fixed by #6536
Closed

[NBug] Unexpected artificial commit in Git command: 11111111111111... #6535

xinfli opened this issue May 6, 2019 · 9 comments · Fixed by #6536

Comments

@xinfli
Copy link

xinfli commented May 6, 2019

Current behaviour

Open GitExtensions, and it loaded a local code repository by default, then I switched to another repository selected from repository list.

Expected behaviour

It should open the target repository correctly.

Steps to reproduce

Thrown random, I did not find how to reproduce it.

Error Details

System.ArgumentException: Unexpected artificial commit in Git command: 1111111111111111111111111111111111111111
   at GitCommands.ArgumentBuilderExtensions.Add(ArgumentBuilder builder, ObjectId objectId)
   at GitCommands.GitModule.GetDescribe(ObjectId commitId)
   at GitCommands.Git.GitDescribeProvider.Get(ObjectId revision)
   at GitUI.CommitInfo.CommitInfo.<ReloadCommitInfo>g__GetDescribeInfoForRevision|56_14(<>c__DisplayClass56_3& )
   at GitUI.CommitInfo.CommitInfo.<>c__DisplayClass56_0.<<ReloadCommitInfo>g__LoadDescribeInfoAsync|9>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitUI.CommitInfo.CommitInfo.<>c__DisplayClass56_0.<<ReloadCommitInfo>b__3>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitUI.ThreadHelper.<>c__DisplayClass13_0.<<FileAndForget>b__0>d.MoveNext()

Environment

  • Git Extensions 3.1.0.5766-RC1
  • Build 497059b (Dirty)
  • Git 2.21.0.windows.1
  • Microsoft Windows NT 10.0.17134.0
  • .NET Framework 4.8.3761.0
  • DPI 96dpi (no scaling)
@vbjay
Copy link
Contributor

vbjay commented May 6, 2019 via email

@mstv
Copy link
Member

mstv commented May 6, 2019

I've also seen this once in the past days.

@mstv
Copy link
Member

mstv commented May 6, 2019

Race condition from old repo?

Yes, Jay, I can reproduce it:

  • switch back to the GE repo
  • click a virtual commit Working directory or Commit index quickly (accidental double click or bouncing mouse button as in my case)
2019-05-06T21:48:29.4833942+02:00	73	12944		128	git	describe --tags --first-parent --abbrev=40 7182286a4ab90f799c9b6ec30c935d4303822bcb	F:\Build\gitextensions-test1a\
2019-05-06T21:48:36.1972468+02:00	73	13756	UI	0	git	rev-parse --git-common-dir	F:\Build\gitextensions\
2019-05-06T21:48:36.2712562+02:00	105	12672		0	git	for-each-ref --sort=-committerdate --sort=-taggerdate --format="%(refname)" refs/	F:\Build\gitextensions\
2019-05-06T21:48:36.2717562+02:00	168	7924		0	git	--no-optional-locks show-ref --dereference	F:\Build\gitextensions\
2019-05-06T21:48:36.2717562+02:00	133	12764		0	git	--no-optional-locks for-each-ref --sort=-committerdate refs/heads/ --format="%(objectname) %(refname)"	F:\Build\gitextensions\
2019-05-06T21:48:36.2727563+02:00	181	1012	UI	0	git	rev-parse HEAD	F:\Build\gitextensions\
2019-05-06T21:48:36.4062733+02:00	122	1640		0	git	for-each-ref --format="%(push:track)::%(upstream:track)::%(refname:short)" refs/heads/	F:\Build\gitextensions\
2019-05-06T21:48:36.4422779+02:00	96	8236		0	git	remote -v	F:\Build\gitextensions\
2019-05-06T21:48:36.4717816+02:00	107	10300	UI	0	git	rev-parse HEAD	F:\Build\gitextensions\
2019-05-06T21:48:36.5387901+02:00	108	12068		0	git	show-ref --dereference	F:\Build\gitextensions\
2019-05-06T21:48:36.5792953+02:00	93	14348	UI	0	git	show-ref --dereference	F:\Build\gitextensions\
2019-05-06T21:48:36.6503043+02:00	88	12232		0	git	remote	F:\Build\gitextensions\
2019-05-06T21:48:36.6923096+02:00	464	11096			git	-c log.showSignature=false log -z --pretty=format:"%H%T%P%n%at%n%ct%n%e%n%aN%n%aE%n%cN%n%cE%n%s%n%n%b" --all --boundary --max-count=100000 --	F:\Build\gitextensions\
2019-05-06T21:48:36.7023109+02:00	133	10356		0	git	for-each-ref --sort=-committerdate refs/heads/ --format="%(objectname) %(refname)"	F:\Build\gitextensions\
2019-05-06T21:48:36.7108120+02:00	148	10736		0	git	ls-files -z --unmerged	F:\Build\gitextensions\
2019-05-06T21:48:36.7198131+02:00	162	9408	UI	0	git	for-each-ref --format="%(push:track)::%(upstream:track)::%(refname:short)" refs/heads/6244_always_keep_manually_entered_commit_message	F:\Build\gitextensions\
2019-05-06T21:48:37.1263647+02:00	274	14728	UI	0	git	--no-optional-locks status --porcelain=2 -z --untracked-files --ignore-submodules=none	F:\Build\gitextensions\
2019-05-06T21:48:37.1658698+02:00	78	10896	UI	0	git	-c log.showSignature=false log -1 --pretty="format:%H%n%e%n%B%nNotes:%n%-N" c8a036d5b3d262e77bcd3b7886ec3f32294fe59f	F:\Build\gitextensions\
2019-05-06T21:48:37.2493804+02:00	238	12108		0	git	branch -a --contains c8a036d5b3d262e77bcd3b7886ec3f32294fe59f	F:\Build\gitextensions\
2019-05-06T21:48:37.4924112+02:00	193	14476		0	git	tag --contains c8a036d5b3d262e77bcd3b7886ec3f32294fe59f	F:\Build\gitextensions\
2019-05-06T21:48:37.4934114+02:00	293	7788	UI	0	git	-c diff.submodule=short -c diff.noprefix=false diff --no-color -M -C -z --name-status	F:\Build\gitextensions\
2019-05-06T21:48:37.7864486+02:00	255	9908	UI	0	git	status --porcelain=2 -z --untracked-files --ignore-submodules=none	F:\Build\gitextensions\
2019-05-06T21:48:40.1912539+02:00	253	14692	UI	0	git	--no-optional-locks status --porcelain=2 -z --untracked-files --ignore-submodules=none	F:\Build\gitextensions\
2019-05-06T21:48:41.5379249+02:00	72	10696		0	git	ls-files -z --unmerged	F:\Build\gitextensions\
2019-05-06T21:48:43.2501424+02:00	255	14936	UI	0	git	--no-optional-locks status --porcelain=2 -z --untracked-files --ignore-submodules=none	F:\Build\gitextensions\

@RussKie
Copy link
Member

RussKie commented May 6, 2019

@mstv do you think you could look at it?

@mstv
Copy link
Member

mstv commented May 6, 2019

I had the hope that a Git command expert sees the cause.

@RussKie
Copy link
Member

RussKie commented May 6, 2019

👀 @gerhardol

@gerhardol
Copy link
Member

Artificial commits are my area but i am travelling this week.

@vbjay
Copy link
Contributor

vbjay commented May 6, 2019 via email

@mstv
Copy link
Member

mstv commented May 6, 2019

CommitInfo.LoadDescribeInfoAsync() is called for the virtual commit, which is not done anymore when the loading has finished.
The call originates from StartAsyncDataLoad() which uses CommitInfo._revision. This has been set to the virtual commit by the OnClick handler before LoadDescribeInfoAsync() is called. At least this function seems to expect that StartAsyncDataLoad() is executed for a real commit.

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

Successfully merging a pull request may close this issue.

5 participants