vscode-git-graph icon indicating copy to clipboard operation
vscode-git-graph copied to clipboard

cannot load all commits

Open i11010520 opened this issue 3 years ago • 5 comments

Describe the Bug git-graph cannot load all commits.

Steps to Reproduce Steps to reproduce the behaviour:

  1. git clone https://github.com/rusoto/rusoto.git
  2. open rusoto project by VSCode
  3. open GitGraph view and scroll down to the earlist commit
  4. GitGraph view stops at IMG1:
IMG1

Expected Behaviour GITGraph could display all the rusoto commits, till 2015, like IMG2: IMG2

Environment

  • Git Graph Extension Version: V1.30.0

  • Visual Studio Code Version: Version: 1.65.2 Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1 Date: 2022-03-10T14:33:49.188Z Electron: 13.5.2 Chromium: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Darwin x64 19.6.0

Screenshots (optional) Add any screenshots showing the bug.

Additional Context (optional) Add any other context about the problem here.

⚠ Please make sure you complete all of the required sections of this template. Without this required information, it will be harder to replicate this bug, and cause additional delays in resolving it.

i11010520 avatar Mar 30 '22 06:03 i11010520

It's strange that the https://github.com/rusoto/rusoto/commit/80fcb22489034a9fb1d28fc6ede3e9741f31d86e commit message has \rusoto. Turns out that \r is considered a line ending according to GG.

TheBrenny avatar Apr 03 '22 04:04 TheBrenny

Truly appreciate your timely fix! @TheBrenny Is it possible to make it come into effect immediately in VSCode by nightly publishing?

i11010520 avatar Apr 03 '22 07:04 i11010520

Unfortunately, I'm at the mercy of @mhutchie who owns the repo, but if he's happy with my solution (which I expect he might go with the alternative) then it'll be merged and pushed out.

In the meantime you can patch your version of Git Graph by opening ~/.vscode/extensions/mhutchie.git-graph-1.30.0/out/dataSource.js and changing:

  21| const utils_1 = require("./utils");
  22| const disposable_1 = require("./utils/disposable");
  23| const DRIVE_LETTER_PATH_REGEX = /^[a-z]:\//;
- 24| const EOL_REGEX = /\r\n|\r|\n/g;
+ 24| const EOL_REGEX = /\r\n|\n/g;
  25| const INVALID_BRANCH_REGEXP = /^\(.* .*\)$/;
  26| const REMOTE_HEAD_BRANCH_REGEXP = /^remotes\/.*\/HEAD$/;
  27| const GIT_LOG_SEPARATOR = 'XX7Nal-YARtTpjCikii9nJxER19D6diSyk-AWkPb';

TheBrenny avatar Apr 03 '22 09:04 TheBrenny

Got it. @TheBrenny Thx very much!

i11010520 avatar Apr 04 '22 11:04 i11010520

Thanks, this fixed the graph for my repo as well. The graph stopped before a commit where somehow a ^M managed to sneak into the commit message, according to the git log output.

teaserrr avatar Sep 05 '22 13:09 teaserrr