On this page:
git_  signature_  default
git_  signature_  dup
git_  signature_  free
git_  signature_  from_  buffer
git_  signature_  new
git_  signature_  now
8.12

42 Signature🔗ℹ

 (require libgit2/include/signature) package: libgit2

procedure

(git_signature_default repo)  signature?

  repo : repository?
Create a new action signature with default user and now timestamp.

This looks up the user.name and user.email from the configuration and uses the current time as the timestamp, and creates a new signature based on that information. It will return GIT_ENOTFOUND if either the user.name or user.email are not set.

procedure

(git_signature_dup sig)  signature?

  sig : signature?
Create a copy of an existing signature. All internal strings are also duplicated.

Call git_signature_free() to free the data.

procedure

(git_signature_free sig)  void?

  sig : signature?
Free an existing signature.

Because the signature is not an opaque structure, it is legal to free it manually, but be sure to free the "name" and "email" strings in addition to the structure itself.

procedure

(git_signature_from_buffer buf)  signature?

  buf : string?
Create a new signature by parsing the given buffer, which is expected to be in the format "Real Name <email

timestamp tzoffset", where timestamp is the number of seconds since the Unix epoch and tzoffset is the timezone offset in hhmm format (note the lack of a colon separator).

procedure

(git_signature_new name email time offset)  signature?

  name : string?
  email : string?
  time : git_time_t
  offset : boolean?
Create a new action signature.

Call git_signature_free() to free the data.

Note: angle brackets (’<’ and ’>’) characters are not allowed to be used in either the name or the email parameter.

procedure

(git_signature_now name email)  signature?

  name : string?
  email : string?
Create a new action signature with a timestamp of ’now’.

Call git_signature_free() to free the data.