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

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

Git plugin changes my gitconfig #247

aspyatkin opened this issue Mar 18, 2015 · 5 comments

Comments

@aspyatkin
Copy link

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
Copy link
Contributor

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

tombujok added a commit that referenced this issue Mar 18, 2015
@tombujok
Copy link
Contributor

Fixed in 1.1.0.
Release status: #266

@grant-humphries
Copy link

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
Copy link

btw I'm on Babun 1.2.0 and Git 2.1.4

@grant-humphries
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants