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
1.89k stars 243 forks source link

Bug report: "fatal: unknown field name: commiterdate" #805

Closed nhhung1810 closed 4 months ago

nhhung1810 commented 4 months ago

Describe the Bug One day I open Git Graph and got this message: "Error: Unable to load Repository Info fatal: unknown field name: commiterdate"

Steps to Reproduce Steps to reproduce the behaviour: Just open the Git Graph and got the above message immediately. Did try to restart the computer but have no luck.

Expected Behaviour A normal Git Graph.

Environment

Screenshots (optional)

image

Additional Context (optional) This is the Git Graph log provided by VSCode Task view

[2024-03-01 09:41:51.481] Stopped watching repo: /Users/{REDACTED}/clvision-challenge-2024
[2024-03-01 09:41:53.680] Created Git Graph View
[2024-03-01 09:41:53.808] > git branch -a --no-color
[2024-03-01 09:41:53.809] > git remote
[2024-03-01 09:41:53.809] > git reflog --format=... refs/stash --
[2024-03-01 09:41:53.819] > git rev-parse --show-toplevel
[2024-03-01 09:41:53.828] Started watching repo: /Users/{REDACTED}/clvision-challenge-2024
nhhung1810 commented 4 months ago

From what I check from my terminal, this look like a typo error. If I use commiterdate

$ git for-each-ref --sort=commiterdate
fatal: unknown field name: commiterdate

If I change to committerdate

$ git for-each-ref --sort=committerdate            
6b5176bdb59451b69e089404a6ad8fb123d8ebc6 commit refs/heads/main

But why is this typo occur in my machine? Is there any config I can change to modify this behavior?

nhhung1810 commented 4 months ago

I solve the problem now. It's turn out that when I change the global .gitconfig file, I have some typo:


[branch]
    sort = -committerdate
        # sort = -committerdate -> this is the incorrect one

Sorry for the inconvenience!