Skip to content

Allow creating new config entries #398

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

Conversation

mpapis
Copy link
Contributor

@mpapis mpapis commented Jan 21, 2019

Your checklist for this pull request

🚨Please review the guidelines for contributing to this repository.

  • Ensure all commits include DCO sign-off.
  • Ensure that your contributions pass unit testing.
  • Ensure that your contributions contain documentation if applicable.

Description

Git 2.1.2 introduced setting values even if they did not previously exist.
The git-ruby library keeps compatibility with Git 1.6, this fixes the
problem of older versions not being able to create new values.

Other options

  • bump the minimal required git version to 2.1.2

@mpapis mpapis force-pushed the allow_config_set_for_empty_values_older_git branch 2 times, most recently from c96907f to 0f2a646 Compare January 21, 2019 11:35
@stale
Copy link

stale bot commented Mar 22, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added wontfix and removed wontfix labels Mar 22, 2019
Git 2.1.2 introduced setting values even if they did not previously exist.
The git-ruby library keeps compatibility with Git 1.6, this fixes the
problem of older versions not being able to create new values.

Signed-off-by: Michal Papis <michal.papis@toptal.com>
@mpapis mpapis force-pushed the allow_config_set_for_empty_values_older_git branch from 0f2a646 to 1ac6ce3 Compare March 25, 2019 12:58
@mpapis
Copy link
Contributor Author

mpapis commented Mar 25, 2019

tests are passing, the code is rebased, anything else I should do?

@stale
Copy link

stale bot commented May 24, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 24, 2019
@mpapis
Copy link
Contributor Author

mpapis commented May 28, 2019

still waiting for the review

@stale stale bot removed the wontfix label May 28, 2019
@stale
Copy link

stale bot commented Jul 27, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 27, 2019
@mpapis
Copy link
Contributor Author

mpapis commented Jul 30, 2019

still waiting for the review

@stale stale bot removed the wontfix label Jul 30, 2019
@stale
Copy link

stale bot commented Sep 28, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 28, 2019
@mpapis
Copy link
Contributor Author

mpapis commented Sep 30, 2019

still waiting for the review

@stale stale bot removed the wontfix label Sep 30, 2019
@stale
Copy link

stale bot commented Nov 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Nov 29, 2019
@mpapis
Copy link
Contributor Author

mpapis commented Nov 29, 2019

still waiting for the review

@stale stale bot removed the wontfix label Nov 29, 2019
@jcouball
Copy link
Member

jcouball commented Dec 1, 2019

I suspect that requiring 2.1.2 as the minimum git version might be burdensome to users. According to this page, 2.1.2 was released in 2017. I am interested in hearing what others think.

Looks like the implementation is to try the git config command without the --add switch first and then try using the --add switch if that fails. While it works, it seems a bit sloppy since the initial command could have failed for other reasons. That said, I can offer no better alternative at the moment.

Some things to consider as we evolve ruby-git further:

  • Maybe the library should discover what version of git is being used and act more purposefully on what features are supported by the git client and which are not.
  • It would be nice to be able to test with multiple versions of git so ruby-git's interaction with each version can be validated.

@jcouball
Copy link
Member

jcouball commented Dec 2, 2019

Have you thought about adding a test for the situation covered by the change? Is it possible with the existing state of the testing framework?

@mpapis
Copy link
Contributor Author

mpapis commented Dec 2, 2019

I think it was to hard, the two other PR's from this time got tests (#399, #400), I'm moved already to other company, keeping the PR's alive as a courtesy to other OSS users.

@stale
Copy link

stale bot commented Jan 31, 2020

A friendly reminder that this issue had no activity for 60 days.

@stale stale bot added the stale label Jan 31, 2020
@jcouball
Copy link
Member

jcouball commented Mar 9, 2023

I am closing this PR to have a broader discussion about how git config should work in this gem in the next major release in #656.

@jcouball jcouball closed this Mar 9, 2023
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.

2 participants