git config option color.diff can break diff and commit graph #3220
Labels
issue/confirmed
Issue has been reviewed and confirmed to be present or accepted to be implemented
type/bug
[x]
):n/a
Description
I've just discovered why my gitea wasn't working correctly. I raised a panic issue here yesterday which @bkcsoft submitted a patch for (pull/3156). After pulling down the latest master build that then revealed that I was unable to view any diffs. After scratching my head and walking through the git_diff.go source, I discovered my issue was shared config where I had been trying to improve my command line diffs in ~/.gitconfig but this clashed with gitea's use of git diff. Specifically I'd set
color.diff=always
in my ~/.gitconfig. Removing this has brought back my diff output and also the commit graph. Potentially gitea could specify--no-color
however I think this is a case of user error (Lafriks asked I submit this as an issue from discord chat).This issue would only affect people running gitea and git with the same user id. I have this in an environment where we are using the windows executable in a portable mode.
Symptoms: Panic, until pull/3156 was merged then a Diff content unavailable message. The commit graph was also missing the visual representation or "train tracks".
Edit: fixed @ mention.
The text was updated successfully, but these errors were encountered: