diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/general.c | 12 | ||||
| -rw-r--r-- | examples/network/clone.c | 10 | ||||
| -rw-r--r-- | examples/network/index-pack.c | 6 | ||||
| -rw-r--r-- | examples/network/ls-remote.c | 2 |
4 files changed, 17 insertions, 13 deletions
diff --git a/examples/general.c b/examples/general.c index 0780d3d49..15b415a98 100644 --- a/examples/general.c +++ b/examples/general.c @@ -145,11 +145,13 @@ static void oid_parsing(git_oid *oid) */ git_oid_fromstr(oid, hex); - // Once we've converted the string into the oid value, we can get the raw - // value of the SHA by accessing `oid.id` - - // Next we will convert the 20 byte raw SHA1 value to a human readable 40 - // char hex value. + /* + * Once we've converted the string into the oid value, we can get the raw + * value of the SHA by accessing `oid.id` + * + * Next we will convert the 20 byte raw SHA1 value to a human readable 40 + * char hex value. + */ printf("\n*Raw to Hex*\n"); out[GIT_OID_HEXSZ] = '\0'; diff --git a/examples/network/clone.c b/examples/network/clone.c index 540000bfd..ce4b6aedf 100644 --- a/examples/network/clone.c +++ b/examples/network/clone.c @@ -48,7 +48,7 @@ static void print_progress(const progress_data *pd) static int sideband_progress(const char *str, int len, void *payload) { - (void)payload; // unused + (void)payload; /* unused */ printf("remote: %.*s", len, str); fflush(stdout); @@ -82,15 +82,15 @@ int do_clone(git_repository *repo, int argc, char **argv) const char *path = argv[2]; int error; - (void)repo; // unused + (void)repo; /* unused */ - // Validate args + /* Validate args */ if (argc < 3) { printf ("USAGE: %s <url> <path>\n", argv[0]); return -1; } - // Set up options + /* Set up options */ checkout_opts.checkout_strategy = GIT_CHECKOUT_SAFE; checkout_opts.progress_cb = checkout_progress; checkout_opts.progress_payload = &pd; @@ -100,7 +100,7 @@ int do_clone(git_repository *repo, int argc, char **argv) clone_opts.fetch_opts.callbacks.credentials = cred_acquire_cb; clone_opts.fetch_opts.callbacks.payload = &pd; - // Do the clone + /* Do the clone */ error = git_clone(&cloned_repo, url, path, &clone_opts); printf("\n"); if (error != 0) { diff --git a/examples/network/index-pack.c b/examples/network/index-pack.c index 314f21160..e9261027c 100644 --- a/examples/network/index-pack.c +++ b/examples/network/index-pack.c @@ -19,8 +19,10 @@ #endif #include "common.h" -// This could be run in the main loop whilst the application waits for -// the indexing to finish in a worker thread +/* + * This could be run in the main loop whilst the application waits for + * the indexing to finish in a worker thread + */ static int index_cb(const git_transfer_progress *stats, void *data) { (void)data; diff --git a/examples/network/ls-remote.c b/examples/network/ls-remote.c index 9329da5d9..fb258acbe 100644 --- a/examples/network/ls-remote.c +++ b/examples/network/ls-remote.c @@ -12,7 +12,7 @@ static int use_remote(git_repository *repo, char *name) size_t refs_len, i; git_remote_callbacks callbacks = GIT_REMOTE_CALLBACKS_INIT; - // Find the remote by name + /* Find the remote by name */ error = git_remote_lookup(&remote, repo, name); if (error < 0) { error = git_remote_create_anonymous(&remote, repo, name); |
