Skip to content

Fix hash keys in #describe #415

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

Merged
merged 5 commits into from
Apr 5, 2020
Merged

Fix hash keys in #describe #415

merged 5 commits into from
Apr 5, 2020

Conversation

muellerj
Copy link
Contributor

@muellerj muellerj commented Jun 24, 2019

Currently, the symbolized key is checked for presence and then the value for the non-symbolized one is used. This works for Hashes with indifferent access (like in rails etc.) but fails for a simple example like

Git.open(".").describe("HEAD", abbrev: 0)

=> Git::GitExecuteError (git '--git-dir=/folder/to/repo/.git' '--work-tree=/folder/to/repo' describe '--abbrev=' 'HEAD'  2>&1:error: option `abbrev' expects a numerical value)

Changed all references to the symbolized version (since the method signature suggests @param [{Symbol=>Object}]).

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

Please describe your pull request.

@muellerj
Copy link
Contributor Author

Anyone? Please let me know if you need further input - this should be an easy fix.

Currently, the symbolized key is checked for presence and then the value for the non-symbolized one is used. This works for Hashes with indifferent access (like in rails etc.) but fails for a simple example like

```ruby
Git.open(".").describe("HEAD", abbrev: 0)

=> Git::GitExecuteError (git '--git-dir=/folder/to/repo/.git' '--work-tree=/folder/to/repo' describe '--abbrev=' 'HEAD'  2>&1:error: option `abbrev' expects a numerical value)
```

Changed all references to the symbolized version (since the method signature suggests `@param [{Symbol=>Object}]`).

Signed-off-by: Jonas Mueller <jonas-mueller@mailbox.org>
@muellerj
Copy link
Contributor Author

Ping?!

@muellerj
Copy link
Contributor Author

Is this repository still maintained?

cdchapman added a commit to pentandra/lifepreserver that referenced this pull request Oct 8, 2019
@muellerj
Copy link
Contributor Author

Ping

@muellerj
Copy link
Contributor Author

Monthly ping

@stale
Copy link

stale bot commented Jan 13, 2020

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 Jan 13, 2020
@muellerj
Copy link
Contributor Author

Ping

@stale stale bot removed the wontfix label Jan 13, 2020
Implementation and tests required to ensure that command output encod…
@muellerj
Copy link
Contributor Author

Ping

Copy link
Member

@jcouball jcouball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this change was already merged to master.

@jcouball jcouball merged commit f3b439d into ruby-git:master Apr 5, 2020
@jcouball jcouball mentioned this pull request Apr 19, 2020
3 tasks
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