Skip to content

config: add missing functions for completeness - #112

Merged
mcuadros merged 2 commits into
go-git:masterfrom
MichaelMure:complete-config
Oct 9, 2020
Merged

mcuadros merged 2 commits into
go-git:masterfrom
MichaelMure:complete-config

Conversation

@MichaelMure

Copy link
Copy Markdown
Contributor

This PR complete the Config functions.

Add Options.Has to check if an Option exist.

Wherever a collection of Option exist, make sure that the following functions exists as well:

  • Option
  • OptionAll (new, return all values)
  • HasOption (new)
  • AddOption
  • SetOption
  • RemoveOption

For Config and Section, make sure that the following exist to access the sublevel:

  • X
  • HasX (HasSection was missing)
  • RemoveX (RemoveSubsection was missing)

This PR also does some shuffling to have a consistent ordering of functions.

@mcuadros

mcuadros commented Jul 1, 2020

Copy link
Copy Markdown
Member

This is awesome can you add tests for this?

@MichaelMure

Copy link
Copy Markdown
Contributor Author

Holiday is over, not sure I'll have the freedom anytime soon :-|

@MichaelMure

Copy link
Copy Markdown
Contributor Author

@mcuadros

@Invincibot added the needed tests, can we merge ?

@MichaelMure

Copy link
Copy Markdown
Contributor Author

CI failure is unrelated to this PR.

@MichaelMure

Copy link
Copy Markdown
Contributor Author

Anyone?

@mcuadros
mcuadros merged commit b5b59f5 into go-git:master Oct 9, 2020
@mcuadros

mcuadros commented Oct 9, 2020

Copy link
Copy Markdown
Member

Sorry for the delay, weird times.

@MichaelMure

Copy link
Copy Markdown
Contributor Author

Thank you :-)

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