Functions

error_quark ()

get_features ()

init ()

message_prettify (message, strip_comments, comment_char)

Details

Ggit.error_quark()
Return type:

int

Error domain for Ggit functions. Errors in this domain will be from the Ggit.Error enumeration. See GLib.Error for information on error domains.

Ggit.get_features()
Returns:

a Ggit.FeatureFlags.

Return type:

Ggit.FeatureFlags

Gets the features of the library.

Ggit.init()

Call this function before using any other libgit2-glib function.

Ggit.message_prettify(message, strip_comments, comment_char)
Parameters:
  • message (str) – the message.

  • strip_comments (bool) – whether to strip comments.

  • comment_char (int) – comment character.

Returns:

the prettified message.

Return type:

str

Prettify a commit message by removing excess whitespace and making sure the last line ends with a newline. If strip_comments is True, then lines starting with a comment_char will be removed.