Commit Graph

7 Commits

Author SHA1 Message Date
Carlos Martín Nieto
659cf2029f Remove the signature from ref-modifying functions
The signature for the reflog is not something which changes
dynamically. Almost all uses will be NULL, since we want for the
repository's default identity to be used, making it noise.

In order to allow for changing the identity, we instead provide
git_repository_set_ident() and git_repository_ident() which allow a user
to override the choice of signature.
2015-03-03 14:40:50 +01:00
Edward Thomson
0cee70ebb7 Introduce cl_assert_equal_oid 2014-07-01 14:40:16 -04:00
Carlos Martín Nieto
0b28217bda refs: remove the _with_log differentiation
Any well-behaved program should write a descriptive message to the
reflog whenever it updates a reference. Let's make this more prominent
by removing the version without the reflog parameters.
2014-01-15 13:32:43 +01:00
Carlos Martín Nieto
a57dd3b7a4 reflog: integrate into the ref writing
Whenever a reference is created or updated, we need to write to the
reflog regardless of whether the user gave us a message, so we shouldn't
leave that to the ref frontend, but integrate it into the backend.

This also eliminates the race between ref update and writing to the
reflog, as we protect the reflog with the ref lock.

As an additional benefit, this reflog append on the backend happens by
appending to the file instead of parsing and rewriting it.
2013-11-23 14:55:02 +01:00
Carlos Martín Nieto
a6b508080c refs: adjust to the new reflog API 2013-11-23 13:35:53 +01:00
nulltoken
56ad3782e0 refs: Introduce git_reference_symbolic_create_with_log() 2013-11-23 13:34:51 +01:00
nulltoken
bba25f39a2 refs: Introduce git_reference_create_with_log() 2013-11-23 13:34:46 +01:00