mhutchie / vscode-git-graph

View a Git Graph of your repository in Visual Studio Code, and easily perform Git actions from the graph.
https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph
Other
2k stars 265 forks source link

cannot load all commits #641

Open i11010520 opened 2 years ago

i11010520 commented 2 years ago

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

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.

TheBrenny commented 2 years ago

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.

i11010520 commented 2 years ago

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

TheBrenny commented 2 years ago

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';
i11010520 commented 2 years ago

Got it. @TheBrenny Thx very much!

teaserrr commented 2 years ago

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.