commit - 54eb00d5beb979ca755db29889d236201e53cd52
commit + 62d463cac1fd99c423acb07c0367c649724a2a9a
blob - 138291e3421f28ca4a7541d072a13b359720b717
blob + f7f14b9cb2d386242d73d208d79ef3e9df874bab
--- got/got.c
+++ got/got.c
int ch;
int hflag = 0, Vflag = 0;
static struct option longopts[] = {
- { "version", no_argument, NULL, 'V' },
- { NULL, 0, NULL, 0 }
+ { "version", no_argument, NULL, 'V' },
+ { NULL, 0, NULL, 0 }
};
setlocale(LC_CTYPE, "");
}
err = edit_logmsg(logmsg, editor, *logmsg_path, initial_content,
- initial_content_len);
+ initial_content_len);
done:
if (fd != -1 && close(fd) == -1 && err == NULL)
err = got_error_from_errno2("close", *logmsg_path);
if (a->create_configs && !a->configs_created &&
!TAILQ_EMPTY(a->config_info.symrefs)) {
err = create_config_files(a->config_info.proto,
- a->config_info.host, a->config_info.port,
- a->config_info.remote_repo_path,
- a->config_info.git_url,
- a->config_info.fetch_all_branches,
- a->config_info.mirror_references,
- a->config_info.symrefs,
- a->config_info.wanted_branches, a->repo);
+ a->config_info.host, a->config_info.port,
+ a->config_info.remote_repo_path,
+ a->config_info.git_url,
+ a->config_info.fetch_all_branches,
+ a->config_info.mirror_references,
+ a->config_info.symrefs,
+ a->config_info.wanted_branches, a->repo);
if (err)
return err;
a->configs_created = 1;
* If we asked for a set of wanted branches then use the first
* one of those.
*/
- if (!TAILQ_EMPTY(wanted_branches)) {
+ if (!TAILQ_EMPTY(wanted_branches)) {
pe = TAILQ_FIRST(wanted_branches);
default_branch = pe->path;
} else {
* a set of wanted branches use the first of one of those
* which could be fetched instead.
*/
- TAILQ_FOREACH(pe, &wanted_branches, entry) {
+ TAILQ_FOREACH(pe, &wanted_branches, entry) {
const char *target = pe->path;
struct got_reference *target_ref;
return got_error_path(branch_name, GOT_ERR_REF_NAME_MINUS);
if (asprintf(&refname, "refs/heads/%s", branch_name) == -1) {
- err = got_error_from_errno("asprintf");
- goto done;
+ err = got_error_from_errno("asprintf");
+ goto done;
}
err = got_ref_open(&ref, repo, refname, 0);
if (strncmp("refs/tags/", tag_name, 10) == 0) {
refname = strdup(tag_name);
if (refname == NULL) {
- err = got_error_from_errno("strdup");
- goto done;
+ err = got_error_from_errno("strdup");
+ goto done;
}
tag_name += 10;
} else if (asprintf(&refname, "refs/tags/%s", tag_name) == -1) {
- err = got_error_from_errno("asprintf");
- goto done;
+ err = got_error_from_errno("asprintf");
+ goto done;
}
err = got_ref_open(&ref, repo, refname, 0);
TAILQ_FOREACH(pe, &paths, entry) {
if (asprintf(&ondisk_path, "%s/%s",
got_worktree_get_root_path(worktree),
- pe->path) == -1) {
+ pe->path) == -1) {
error = got_error_from_errno("asprintf");
goto done;
}
TAILQ_FOREACH(pe, &paths, entry) {
if (asprintf(&ondisk_path, "%s/%s",
got_worktree_get_root_path(worktree),
- pe->path) == -1) {
+ pe->path) == -1) {
error = got_error_from_errno("asprintf");
goto done;
}
TAILQ_FOREACH(pe, &paths, entry) {
if (asprintf(&ondisk_path, "%s/%s",
got_worktree_get_root_path(worktree),
- pe->path) == -1) {
+ pe->path) == -1) {
error = got_error_from_errno("asprintf");
goto done;
}
if (hle->cmd->code == GOT_HISTEDIT_DROP ||
hle->cmd->code == GOT_HISTEDIT_FOLD) {
error = histedit_skip_commit(hle, worktree,
- repo);
+ repo);
if (error)
goto done;
} else {
blob - 6ea20ef0a924a94c08ae5889e41d840e289d9de3
blob + 9dedeb9d1c3a9958da659bf80e45d36a00cb7447
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
if (kerr != KCGI_OK)
goto done;
kerr = khtml_puts(gw_trans->gw_html_req,
- gw_trans->gw_dir->owner);
+ gw_trans->gw_dir->owner);
if (kerr != KCGI_OK)
goto done;
kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
"/apple-touch-icon.png") == -1)
goto err;
if (asprintf(&fic32, "%s%s", gw_trans->gw_conf->got_www_path,
- "/favicon-32x32.png") == -1)
+ "/favicon-32x32.png") == -1)
goto err;
if (asprintf(&fic16, "%s%s", gw_trans->gw_conf->got_www_path,
"/favicon-16x16.png") == -1)
if (kerr != KCGI_OK)
goto done;
kerr = khtml_puts(gw_trans->gw_html_req,
- gw_trans->gw_conf->got_site_link);
+ gw_trans->gw_conf->got_site_link);
if (kerr != KCGI_OK)
goto done;
kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
blob - 4213eecf3f24478e6b4e70ecd6b5fb9e561eb0a6
blob + f8f1b5eaab4da84a1833683fc78601583cb35fc1
--- lib/blame.c
+++ lib/blame.c
goto done;
}
err = got_object_blob_dump_to_file(&blame->filesize, &blame->nlines,
- &blame->line_offsets, blame->f, blob);
+ &blame->line_offsets, blame->f, blob);
if (err || blame->nlines == 0)
goto done;
blob - b6bb90438c1a0abf6b72d673caa50e7974b125f1
blob + 1197bbb4a3b7b764589d056de56d5e8f5542a159
--- lib/inflate.c
+++ lib/inflate.c
continue;
zb.outlen = (nbuf * GOT_INFLATE_BUFSIZE) - *outlen;
newbuf = reallocarray(*outbuf, ++nbuf,
- GOT_INFLATE_BUFSIZE);
+ GOT_INFLATE_BUFSIZE);
if (newbuf == NULL) {
err = got_error_from_errno("reallocarray");
free(*outbuf);
blob - 0cacbdd05b05c1e5021ca3c240f513d4476a0d8d
blob + d15fdd1c19625c14f12b9ef6c2f0a764fc43a0da
--- lib/privsep.c
+++ lib/privsep.c
len);
if (wbuf == NULL)
return got_error_from_errno(
- "imsg_create FETCH_WANTED_BRANCH");
+ "imsg_create FETCH_WANTED_BRANCH");
/* Keep in sync with struct got_imsg_fetch_wanted_branch! */
if (imsg_add(wbuf, &name_len, sizeof(name_len)) == -1) {
}
if (imsg_add(wbuf, name, name_len) == -1) {
err = got_error_from_errno(
- "imsg_add FETCH_WANTED_BRANCH");
+ "imsg_add FETCH_WANTED_BRANCH");
ibuf_free(wbuf);
return err;
}
len);
if (wbuf == NULL)
return got_error_from_errno(
- "imsg_create FETCH_WANTED_REF");
+ "imsg_create FETCH_WANTED_REF");
/* Keep in sync with struct got_imsg_fetch_wanted_ref! */
if (imsg_add(wbuf, &name_len, sizeof(name_len)) == -1) {
}
if (imsg_add(wbuf, name, name_len) == -1) {
err = got_error_from_errno(
- "imsg_add FETCH_WANTED_REF");
+ "imsg_add FETCH_WANTED_REF");
ibuf_free(wbuf);
return err;
}
memcpy(buf, &iblob, sizeof(iblob));
memcpy(buf + sizeof(iblob), data, size);
if (imsg_compose(ibuf, GOT_IMSG_BLOB, 0, 0, -1, buf,
- sizeof(iblob) + size) == -1) {
+ sizeof(iblob) + size) == -1) {
free(buf);
return got_error_from_errno("imsg_compose BLOB");
}
blob - 330247efd1de37a205a200f8fa6f361ef6dd2d67
blob + 54a1c38fbbcfb2ede54f20d464e12db1a15f0447
--- lib/worktree.c
+++ lib/worktree.c
* this program exits have a different time stamp from the one which
* was recorded in the file index.
*/
- timeout.tv_sec = 0;
- timeout.tv_nsec = 1;
- nanosleep(&timeout, NULL);
+ timeout.tv_sec = 0;
+ timeout.tv_nsec = 1;
+ nanosleep(&timeout, NULL);
done:
if (new_index)
fclose(new_index);
}
err = got_object_open_as_commit(&commit, repo,
- worktree->base_commit_id);
+ worktree->base_commit_id);
if (err)
goto done;
struct got_commitable *ct = pe->data;
*modified = got_path_is_child(ct->in_repo_path, te_path,
strlen(te_path));
- if (*modified)
+ if (*modified)
break;
}
if (got_object_id_cmp(ct->base_blob_id, &te->id) != 0)
continue;
- err = match_ct_parent_path(&path_matches, ct, base_tree_path);
- if (err)
+ err = match_ct_parent_path(&path_matches, ct, base_tree_path);
+ if (err)
return err;
if (!path_matches)
continue;
(ct->flags & GOT_COMMITABLE_ADDED))
continue;
- if (!got_path_is_child(ct->in_repo_path, path_base_tree,
- strlen(path_base_tree)))
+ if (!got_path_is_child(ct->in_repo_path, path_base_tree,
+ strlen(path_base_tree)))
continue;
err = got_path_skip_common_ancestor(&child_path, path_base_tree,
blob - 1a5b3d0037306803dc46437360d3c5f0fcda271e
blob + 90f2ff6373e29f9a86a336d1cd4d83b0082dd17f
--- libexec/got-fetch-pack/got-fetch-pack.c
+++ libexec/got-fetch-pack/got-fetch-pack.c
if (chattygot > 1)
fprintf(stderr, "%s: writepkt: 0000\n", getprogname());
- w = write(fd, "0000", 4);
- if (w == -1)
+ w = write(fd, "0000", 4);
+ if (w == -1)
return got_error_from_errno("write");
if (w != 4)
return got_error(GOT_ERR_IO);
continue;
got_sha1_digest_to_str(want[i].sha1, hashstr, sizeof(hashstr));
n = snprintf(buf, sizeof(buf), "want %s%s\n", hashstr,
- sent_my_capabilites ? "" : my_capabilities);
+ sent_my_capabilites ? "" : my_capabilities);
if (n >= sizeof(buf)) {
err = got_error(GOT_ERR_NO_SPACE);
goto done;
blob - 687ed2ee0bcc02aae5599f203e8ad76fc30cdb8e
blob + 27d10ab755d53e96136938c0a9d1d5a574974686
--- libexec/got-read-pack/got-read-pack.c
+++ libexec/got-read-pack/got-read-pack.c
memcpy(id.sha1, iobj.id, SHA1_DIGEST_LENGTH);
err = open_tree(&buf, &entries, &nentries, pack, packidx, iobj.idx,
- &id, objcache);
+ &id, objcache);
if (err)
return err;
break;
case GOT_IMSG_TREE_REQUEST:
err = tree_request(&imsg, &ibuf, pack, packidx,
- &objcache);
+ &objcache);
break;
case GOT_IMSG_BLOB_REQUEST:
err = blob_request(&imsg, &ibuf, pack, packidx,
- &objcache);
+ &objcache);
break;
case GOT_IMSG_TAG_REQUEST:
err = tag_request(&imsg, &ibuf, pack, packidx,
- &objcache);
+ &objcache);
break;
case GOT_IMSG_COMMIT_TRAVERSAL_REQUEST:
err = commit_traversal_request(&imsg, &ibuf, pack,
blob - a0db9b1a7f0df182ae32cc5af74379a2ad21c6d8
blob + 1b0d1ec057af633bce4d306c98106dd9eb8eedb2
--- tog/tog.c
+++ tog/tog.c
!s->log_branches);
if (err)
goto done;
- err = got_commit_graph_iter_start(thread_graph,
- s->start_id, s->repo, NULL, NULL);
+ err = got_commit_graph_iter_start(thread_graph, s->start_id,
+ s->repo, NULL, NULL);
if (err)
goto done;
int ch, hflag = 0, Vflag = 0;
char **cmd_argv = NULL;
static struct option longopts[] = {
- { "version", no_argument, NULL, 'V' },
- { NULL, 0, NULL, 0}
+ { "version", no_argument, NULL, 'V' },
+ { NULL, 0, NULL, 0}
};
setlocale(LC_CTYPE, "");