19 Commits

Author SHA1 Message Date
Edward Thomson
338ceb93b6 Improve documentation 2024-11-26 21:44:09 +00:00
Edward Thomson
258df9c18d Merge pull request #6168 from punkymaniac/patch-documentation-2
Improve documentation
2022-01-17 22:03:26 -05:00
punkymaniac
68bc511abb Add documentation about parameter and return value 2022-01-09 10:17:51 +01:00
Dimitris Apostolou
90df43022a Fix typos 2022-01-05 16:35:52 +02:00
Peter Pettersson
38c3449822 Make enum in includes C90 compliant by removing trailing comma. 2021-11-15 16:45:40 +01:00
Edward Thomson
0b5ba0d744 Rename opt init functions to options_init
In libgit2 nomenclature, when we need to verb a direct object, we name
a function `git_directobject_verb`.  Thus, if we need to init an options
structure named `git_foo_options`, then the name of the function that
does that should be `git_foo_options_init`.

The previous names of `git_foo_init_options` is close - it _sounds_ as
if it's initializing the options of a `foo`, but in fact
`git_foo_options` is its own noun that should be respected.

Deprecate the old names; they'll now call directly to the new ones.
2019-06-14 09:57:00 +01:00
Etienne Samson
04c48afc3c docs: standardize struct git_*_options comments 2018-05-07 21:50:38 +02:00
Etienne Samson
ca5a15e51b docs: standardize comment block for git_*_init_options functions 2018-05-07 21:50:38 +02:00
Remy Suen
db90e951e3 Flag options in describe.h as being optional
The git_describe_options in git_describe_commit and
git_describe_workdir and the git_describe_format_options in
git_describe_format are optional and can be NULL. State this in the
documentation to make people's lives easier when calling these
functions.

Signed-off-by: Remy Suen <remy.suen@gmail.com>
2018-03-27 20:09:45 +09:00
Ken Dreyer
38169764fd describe.h: fix spelling in comments
optios -> options
2017-11-10 16:19:39 -07:00
Etienne Samson
8d2784d570 describe: fix documentation 2016-11-01 17:46:20 +01:00
Yury G. Kudryashov
c8022e6ce7 Add const qualifier
This fixes a warning in `examples/describe.c` without breaking the main build.

OTOH, I'm not sure if this is an API-compatible change.
2015-05-15 00:34:43 +03:00
Ben Chatelain
ec7e1c93ce Fix doc comment formatting 2015-02-10 08:31:48 -07:00
Carlos Martín Nieto
a3b9270dcf describe: document the API 2014-09-30 09:32:24 +02:00
Carlos Martín Nieto
25345c0cbe describe: rename git_describe_opts to git_describe_options
And implement the option init functions for this and the format options.
2014-09-30 09:18:22 +02:00
Carlos Martín Nieto
fd8126e4c6 describe: implement describing the workdir
When we describe the workdir, we perform a describe on HEAD and then
check to see if the worktree is dirty. If it is and we have a suffix
string, we append that to the buffer.
2014-09-30 08:56:20 +02:00
Carlos Martín Nieto
3b6534b807 describe: split into gather and format steps
Instead of printing out to the buffer inside the information-gathering
phase, write the data to a intermediate result structure.

This allows us to split the options into gathering options and
formatting options, simplifying the gathering code.
2014-09-30 07:24:28 +02:00
Carlos Martín Nieto
1f501a086b describe: rename _object() to _commit()
We don't describe arbitrary object, so let's give it the name of the one
object type we accept.
2014-09-30 04:58:02 +02:00
nulltoken
3a728fb508 object: introduce git_describe_object() 2014-04-30 09:46:25 +02:00