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 plugin changes my gitconfig #247

Closed
aspyatkin opened this Issue Mar 18, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@aspyatkin

aspyatkin commented Mar 18, 2015

Hello, I would like to report about a small problem.

I have Babun with an updated Git (2.1.4), which was installed according to the solution provided in #232. I felt good with using preconfigured options for Git, but then I decided to make my own dotfiles to keep things the same across several computers. So, I have push.default = simple option in my .gitconfig, and now, when I start Babun shell, it reports
WARNING: Git push strategy set to 'simple' which is unsupported - changing to 'matching'
and changes my .gitconfig.

I think an additional check should be added to babun-core/plugins/git/start.sh to ensure that Git version is failrly old (< 2.0) before overwriting push.default option.

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 18, 2015

Contributor

That's a good point! We will be preparing a new release today. I'll try to fix it on the way...

Contributor

tombujok commented Mar 18, 2015

That's a good point! We will be preparing a new release today. I'll try to fix it on the way...

@tombujok tombujok closed this in e135115 Mar 18, 2015

tombujok added a commit that referenced this issue Mar 18, 2015

@tombujok

This comment has been minimized.

Show comment
Hide comment
@tombujok

tombujok Mar 31, 2015

Contributor

Fixed in 1.1.0.
Release status: #266

Contributor

tombujok commented Mar 31, 2015

Fixed in 1.1.0.
Release status: #266

@grant-humphries

This comment has been minimized.

Show comment
Hide comment
@grant-humphries

grant-humphries Aug 15, 2016

I'd like to request that this ticket be reopened. I also have my dotfiles in a git repo and the .gitconfig that I use with Babun deviates in some areas from what is provided by default. My issue is with the core.trustctime setting. I have this set to false in line with the Babun default, but I use spaces in my .gitconfig and that line is overwritten with a leading tab a few times a day (I think it might happen every time a new shell is opened and also when babun check is run). The problem is that git sees that the file has been modified and thinks there are changes to the repo when there essentially have not been.

I'm not sure that automatically modifying a user's .gitconfig is the best idea, perhaps just displaying warnings periodically and until the change is a made would be better.

Also is there more info as to what Babun's 'Git Plugin' is and how it works? Maybe this is an issue that I can handle with some changes to it's settings.

grant-humphries commented Aug 15, 2016

I'd like to request that this ticket be reopened. I also have my dotfiles in a git repo and the .gitconfig that I use with Babun deviates in some areas from what is provided by default. My issue is with the core.trustctime setting. I have this set to false in line with the Babun default, but I use spaces in my .gitconfig and that line is overwritten with a leading tab a few times a day (I think it might happen every time a new shell is opened and also when babun check is run). The problem is that git sees that the file has been modified and thinks there are changes to the repo when there essentially have not been.

I'm not sure that automatically modifying a user's .gitconfig is the best idea, perhaps just displaying warnings periodically and until the change is a made would be better.

Also is there more info as to what Babun's 'Git Plugin' is and how it works? Maybe this is an issue that I can handle with some changes to it's settings.

@grant-humphries

This comment has been minimized.

Show comment
Hide comment
@grant-humphries

grant-humphries Aug 15, 2016

btw I'm on Babun 1.2.0 and Git 2.1.4

grant-humphries commented Aug 15, 2016

btw I'm on Babun 1.2.0 and Git 2.1.4

@grant-humphries

This comment has been minimized.

Show comment
Hide comment
@grant-humphries

grant-humphries Aug 16, 2016

I was able to resolve this by modifying the following file: your/install/dir/.babun/cygwin/usr/local/etc/babun/source/babun-core/tools/git.sh. I just commented out the last line which is:

git config --global core.trustctime false

I still think it would be a better idea to have some sort of check (as is done with push.default setting in that file) and only make the change to core.trustctime false when that configuration is not already in place rather than constantly modifying the users .gitconfig file, which is what the above command does.

grant-humphries commented Aug 16, 2016

I was able to resolve this by modifying the following file: your/install/dir/.babun/cygwin/usr/local/etc/babun/source/babun-core/tools/git.sh. I just commented out the last line which is:

git config --global core.trustctime false

I still think it would be a better idea to have some sort of check (as is done with push.default setting in that file) and only make the change to core.trustctime false when that configuration is not already in place rather than constantly modifying the users .gitconfig file, which is what the above command does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment