File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (C) 2011-2012 the libgit2 contributors
2
+ * Copyright (C) the libgit2 contributors. All rights reserved.
3
3
*
4
4
* This file is part of libgit2, distributed under the GNU GPL v2 with
5
5
* a Linking Exception. For full terms see the included COPYING file.
6
6
*/
7
-
8
7
#include <git2.h>
9
8
#include <stdio.h>
10
9
#include <stdlib.h>
@@ -19,15 +18,21 @@ enum {
19
18
#define MAX_PATHSPEC 8
20
19
21
20
/*
22
- * This example demonstrates the use of `git_status_foreach()` to roughly
23
- * simulate the output of running `git status`. It should serve as a simple
24
- * example of how to get basic status information.
21
+ * This example demonstrates the use of the libgit2 status APIs,
22
+ * particularly the `git_status_list` object, to roughly simulate the
23
+ * output of running `git status`. It serves as a simple example of
24
+ * using those APIs to get basic status information.
25
25
*
26
26
* This does not have:
27
27
* - Robust error handling
28
- * - Any real command line parsing
29
28
* - Colorized or paginated output formatting
30
29
*
30
+ * This does have:
31
+ * - Examples of translating command line arguments to the status
32
+ * options settings to mimic `git status` results.
33
+ * - A sample status formatter that matches the default "long" format
34
+ * from `git status`
35
+ * - A sample status formatter that matches the "short" format
31
36
*/
32
37
33
38
static void check (int error , const char * message , const char * extra )
You can’t perform that action at this time.
0 commit comments