Add log_append to reference. #277

Merged
merged 1 commit into from Nov 13, 2013

Conversation

Projects
None yet
4 participants
Contributor

xtao commented Oct 30, 2013

Add log_append to reference.

Member

jdavid commented Oct 31, 2013

First thanks for your contributions.

Things to change:

  • Rename append_log to log_append
  • Make all parameters positional (so mandatory). If the user does not want a message, then she must pass None.

Question, why you don't take the oid as parameter? do you have a reason?

Also, return None instead of True (it only makes sense to return True if somewhere else you return False, which is not the case).

Contributor

xtao commented Nov 1, 2013

@jdavid I fixed:

  1. rename function name
  2. optional parameter message.
  3. return None

But, use oid as parameter, do you mean take commit as parameter?

Member

jdavid commented Nov 1, 2013

Yes, like:

ref.log_append(oid, signature, message)

And use /* */ style comments, as PEP7 states, http://www.python.org/dev/peps/pep-0007/

alexband commented Nov 1, 2013

PEP7 🍺

tclh123 commented Nov 1, 2013

🍻

Member

jdavid commented Nov 2, 2013

Could you please add unit tests?

Contributor

xtao commented Nov 3, 2013

@jdavid I'll add later :)

jdavid merged commit e345d23 into libgit2:master Nov 13, 2013

1 check passed

default The Travis CI build passed
Details
Member

jdavid commented Nov 13, 2013

Thanks @xtao for contributing!

Note I changed the prototype to make it more consistent with rest of the API.

xtao deleted the xtao:reflog branch Jan 29, 2014

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