Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git storage: disable color.ui #6014

Merged
merged 1 commit into from
Jan 13, 2023
Merged

Conversation

EricFromCanada
Copy link
Contributor

If Git's color.ui has been set to "always" globally, the git storage module will fail to sync because branches.all will contain "\u001b[31mremotes/origin/master\u001b[m" instead of "remotes/origin/master", as revealed by WIKI.logger.info(JSON.stringify(branches.all[0])).

@NGPixel NGPixel merged commit 41454cf into requarks:main Jan 13, 2023
@EricFromCanada EricFromCanada deleted the git-color branch February 8, 2023 16:01
@Nyxtorm
Copy link
Contributor

Nyxtorm commented Feb 20, 2023

Hi,

It seems to me that this PR should have corrected my problem mentioned here #6112 but it is not the case. (if I apply my workaround with color.ui instead of color.branch it doesn't work, I must absolutely indicate color.branch = false as indicated in my discussion in ~/.gitconfig for dedicated WikiJS user.

And if I add in server/modules/storage/git/storage.js :

await this.git.raw(['config', '--local', 'color.branch', false])

it doesn't seem to be taken into account.

What could cause these parameters to be ignored?

Sorry for my english and thanks for your help!


EDIT: Actually, adding :

await this.git.raw(['config', '--local', 'color.branch', false])

in server/modules/storage/git/storage.js works well after a restart. 😅

davidflypei pushed a commit to davidflypei/wiki that referenced this pull request Jun 13, 2023
jionggyu pushed a commit to jionggyu/wiki-2.5.302-patch that referenced this pull request Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants