gollum / rugged_adapter

Adapter to make gollum use Rugged (libgit2) at the backend.
MIT License
36 stars 27 forks source link

`Gollum::Git::Index#commit` does not set `:committer` #11

Closed jhominal closed 9 years ago

jhominal commented 9 years ago

As the title indicates, Gollum::Git::Index#commit does not set the :committer option.

As a comparison, Grit sets committer in Grit::Index#commit to the same value as author.

I have only hit that issue because, as the :committer value is not set, Rugged attempted to use the configured value, which was empty in my situation, and thus threw an exception:

Rugged::ConfigError - Config value 'user.name' was not found

What is the target behavior?

If the behavior changes, how should it be specced?

Yes, I know I am writing far too much for a one-line change...

bartkamphorst commented 9 years ago

I know I am writing far too much for a one-line change...

No, this is great; I'm happy to have the rugged adapter scrutinized carefully. My initial reaction is to make the rugged adapter follow the grit adapter as closely as possible, unless we think that behavior makes no sense either.

jhominal commented 9 years ago

Thank you.

I will add that RJGit also sets both author and committer to the same value. So, I guess we should just agree to implement the same behavior in rugged_adapter.

The only question remaining for me then, is whether, and how, to spec that change.

bartkamphorst commented 9 years ago

The only question remaining for me then, is whether, and how, to spec that change.

Best is probably to add a test to gollum-lib's test suite. That way, we have one test for all adapters.

gerwitz commented 9 years ago

@jhominal I owe you a drink for fixing this.