gitHistoryVSCode icon indicating copy to clipboard operation
gitHistoryVSCode copied to clipboard

Don't see any history

Open reuvygroovy opened this issue 6 years ago • 15 comments

I can't see any history for files, despite the fact that I know they exist. How can I troubleshoot this? I enabled verbose logs but don't see anything there.

reuvygroovy avatar Apr 21 '20 06:04 reuvygroovy

I've the same issue, just Loading... forever.

damianfijorek avatar Apr 22 '20 17:04 damianfijorek

Do you have further details about OS and versions? And if possible the git repository (if public)

ole1986 avatar Apr 22 '20 17:04 ole1986

Using VSCode 1.43.2 on Windows 10. Latest version of this extension I believe since I just installed it,

reuvygroovy avatar Apr 22 '20 17:04 reuvygroovy

gitHistory 0.6.3, VSCode 1.44.2, Windows 10. This is not error but looks suspicious [Embedded Page] Uncaught (in promise) #<Object> in vebviewElemetn.ts:261:

this._register(addDisposableListener(this.element!, 'console-message', function (e: { level: number; message: string; line: number; sourceId: string; }) {
			console.log(`[Embedded Page] ${e.message}`);
		}));

I've checked another project, where it works fines and there is no such line in console.

damianfijorek avatar Apr 22 '20 17:04 damianfijorek

Do you have multiple repositories in the project or only a single one? Any special characters in the filename/filepath?

ole1986 avatar Apr 22 '20 17:04 ole1986

I don't know. Don't think so. There are hundreds of files. Hard to remember ya know.

reuvygroovy avatar Apr 22 '20 18:04 reuvygroovy

I've got master and debugged the issue. Our build pipeline tags sources with build number and it seems we reached the limit of what command on Windows could take.

Command is git rev_parse and then over a thousand of tags in args.

const gitShow = spawn(gitPathCommand, args, childProcOptions);

Error: spawn ENAMETOOLONG
	at ChildProcess.spawn (internal/child_process.js:394:11)
	at Object.spawn (child_process.js:553:9)
	at GitCommandExecutor.<anonymous> (gitHistoryVSCode\src\adapter\exec\gitCommandExec.ts:54:25)
	at Generator.next (<anonymous>)
	at fulfilled (gitHistoryVSCode\dist\src\extension.js:28242:58)

damianfijorek avatar Apr 22 '20 19:04 damianfijorek

@reuvygroovy You could download this repository run npm install inside, open in VSCode, hit F5 to debug the extension. Another VSCode will open where you could open your repository and catch the exception in the first VSCode.

damianfijorek avatar Apr 22 '20 19:04 damianfijorek

which repository should I download? how? and when/where do I run npm install? can you provide me some intructions?

reuvygroovy avatar Apr 22 '20 19:04 reuvygroovy

which repository should I download? how? and when/where do I run npm install? can you provide me some intructions?

  • Run you favorite terminal. 😉
  • git clone https://github.com/DonJayamanne/gitHistoryVSCode.git
  • cd gitHistoryVSCode
  • npm install
  • code
  • Hit F5 to debug the Git History extension.
  • Set breakpoints on all exceptions.
  • Reproduce you issue in the new VSCode window.
  • Report an exception you get. Inspect locales in debugger, maybe you will find out why it does not work with your repository. Good luck. 😊

damianfijorek avatar Apr 22 '20 19:04 damianfijorek

I think some path or filename seem to be too long? Error: spawn ENAMETOOLONG

ole1986 avatar Apr 22 '20 20:04 ole1986

So it's weird. Even within the same Repo, seems like it's related to a specific file. I followed the above step. Pressed F5. Within the new vscode window that was opened I opened my code and tried to fetch git history. it had nothing, The previous debug also had no errors.

reuvygroovy avatar Apr 23 '20 05:04 reuvygroovy

Any chance you can figure out the file? That would be really helpful to fix that issue

ole1986 avatar Apr 23 '20 06:04 ole1986

I think some path or filename seem to be too long?

It's not about length of particular file, tag or argument in general but the total length of all of them. See fix for similar issue https://github.com/microsoft/vscode/pull/66095

I will try to make a script to generate a public repository, that would allow you to reproduce this issue, later this week. Then I could try to use the divide and conquer idea to fix it too.

@reuvygroovy Have you tried with all break points? image

damianfijorek avatar Apr 23 '20 06:04 damianfijorek

The repository to reproduce my issue: https://github.com/damianfijorek/thousendTags

damianfijorek avatar Apr 25 '20 10:04 damianfijorek