Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-11-01 02:42:50 +0400
committerCarlos Martín Nieto <cmn@dwim.me>2013-11-01 12:08:22 +0400
commitc44820c616fab29d86f7256840f7114f195c08ca (patch)
tree2479e9bad52e2ebd1ef42577bcb07535fc00dc28 /examples/diff.c
parent76120863a74f29dbd51ad9c45dfba06728d04177 (diff)
A few formatting changes for rocco
I'm not too happy about manually inserting &lt; and &gt; but those get output as html tags otherwise.
Diffstat (limited to 'examples/diff.c')
-rw-r--r--examples/diff.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/diff.c b/examples/diff.c
index 381325839..b1415648a 100644
--- a/examples/diff.c
+++ b/examples/diff.c
@@ -38,6 +38,7 @@ struct opts {
const char *dir;
};
+/** These functions are implemented at the end */
static void parse_opts(struct opts *o, int argc, char *argv[]);
static int color_printer(
const git_diff_delta*, const git_diff_hunk*, const git_diff_line*, void*);
@@ -62,13 +63,13 @@ int main(int argc, char *argv[])
/**
* Possible argument patterns:
*
- * * <sha1> <sha2>
- * * <sha1> --cached
- * * <sha1>
+ * * &lt;sha1&gt; &lt;sha2&gt;
+ * * &lt;sha1&gt; --cached
+ * * &lt;sha1&gt;
* * --cached
* * nothing
*
- * Currently ranged arguments like <sha1>..<sha2> and <sha1>...<sha2>
+ * Currently ranged arguments like &lt;sha1&gt;..&lt;sha2&gt; and &lt;sha1&gt;...&lt;sha2&gt;
* are not supported in this example
*/
@@ -174,11 +175,11 @@ static int color_printer(
return diff_output(delta, hunk, line, stdout);
}
+/** Parse arguments as copied from git-diff. */
static void parse_opts(struct opts *o, int argc, char *argv[])
{
struct args_info args = ARGS_INFO_INIT;
- /* Parse arguments as copied from git-diff. */
for (args.pos = 1; args.pos < argc; ++args.pos) {
const char *a = argv[args.pos];