Skip to content

GitConfigParser.set_value should support setting multiple values for an option #717

Description

@craftyguy

GitConfigParser.set_value does not allow for setting multiple values for a given option.
One example of this is in the refspec documentation for git:

remote "origin"]
	url = https://github.com/schacon/simplegit-progit
	fetch = +refs/heads/master:refs/remotes/origin/master
	fetch = +refs/heads/experiment:refs/remotes/origin/experiment

If you try to call set_value twice with the two different refspecs above, only the last one will get set.. which makes sense since set_value seems to only support setting one value for a given option.

Activity

  1. ajdavis commented on Jan 6, 2019

    @ajdavis
    Contributor

    I can make a pull request for this, are the maintainers interested?

  2. Byron commented on Jan 12, 2019

    @Byron
    Member

    @ajdavis Yes, I am absolutely interested. The implementation will certainly require some effort. In order not to break the existing API, it might be easiest to add methods specifically for getting and setting multiple values.

  3. maiamcc commented on Jul 3, 2019

    @maiamcc

    FWIW, tangential to this ticket but I'd also appreciate it if there were a way to GET multiple values for a given option (equivalent to git config --get-all). Should I open a new issue?

  4. added this to the v2.1.12 - Bugfixes milestone on Jul 20, 2019
  5. Byron commented on Jul 20, 2019

    @Byron
    Member

    By now this is implemented thanks to a generous PR.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions