Commit Diff


commit - 54eb00d5beb979ca755db29889d236201e53cd52
commit + 62d463cac1fd99c423acb07c0367c649724a2a9a
blob - 138291e3421f28ca4a7541d072a13b359720b717
blob + f7f14b9cb2d386242d73d208d79ef3e9df874bab
--- got/got.c
+++ got/got.c
@@ -191,8 +191,8 @@ main(int argc, char *argv[])
 	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, "");
@@ -561,7 +561,7 @@ collect_import_msg(char **logmsg, char **logmsg_path, 
 	}
 
 	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);
@@ -957,13 +957,13 @@ fetch_progress(void *arg, const char *message, off_t p
 	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;
@@ -1296,7 +1296,7 @@ create_config_files(const char *proto, const char *hos
 	 * 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 {
@@ -1637,7 +1637,7 @@ cmd_clone(int argc, char *argv[])
 		 * 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;
 
@@ -5486,8 +5486,8 @@ add_branch(struct got_repository *repo, const char *br
 		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);
@@ -5974,13 +5974,13 @@ add_tag(struct got_repository *repo, struct got_worktr
 	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);
@@ -6288,7 +6288,7 @@ cmd_add(int argc, char *argv[])
 		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;
 			}
@@ -6436,7 +6436,7 @@ cmd_remove(int argc, char *argv[])
 		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;
 			}
@@ -6693,7 +6693,7 @@ cmd_revert(int argc, char *argv[])
 		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;
 			}
@@ -8868,7 +8868,7 @@ cmd_histedit(int argc, char *argv[])
 			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
@@ -1497,7 +1497,7 @@ gw_summary(struct gw_trans *gw_trans)
 		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);
@@ -2199,7 +2199,7 @@ gw_template(size_t key, void *arg)
 	    "/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)
@@ -4588,7 +4588,7 @@ gw_output_site_link(struct gw_trans *gw_trans)
 	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
@@ -223,7 +223,7 @@ blame_open(struct got_blame **blamep, const char *path
 		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
@@ -296,7 +296,7 @@ got_inflate_to_mem(uint8_t **outbuf, size_t *outlen,
 				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
@@ -500,7 +500,7 @@ got_privsep_send_fetch_req(struct imsgbuf *ibuf, int f
 		    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) {
@@ -511,7 +511,7 @@ got_privsep_send_fetch_req(struct imsgbuf *ibuf, int f
 		}
 		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;
 		}
@@ -532,7 +532,7 @@ got_privsep_send_fetch_req(struct imsgbuf *ibuf, int f
 		    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) {
@@ -543,7 +543,7 @@ got_privsep_send_fetch_req(struct imsgbuf *ibuf, int f
 		}
 		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;
 		}
@@ -1311,7 +1311,7 @@ got_privsep_send_blob(struct imsgbuf *ibuf, size_t siz
 		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
@@ -2445,9 +2445,9 @@ sync_fileindex(struct got_fileindex *fileindex, const 
 	 * 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);
@@ -2582,7 +2582,7 @@ checkout_files(struct got_worktree *worktree, struct g
 	}
 
 	err = got_object_open_as_commit(&commit, repo,
-	   worktree->base_commit_id);
+	    worktree->base_commit_id);
 	if (err)
 		goto done;
 
@@ -4986,7 +4986,7 @@ match_modified_subtree(int *modified, struct got_tree_
 		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;
 	}
 
@@ -5023,8 +5023,8 @@ match_deleted_or_modified_ct(struct got_commitable **c
 		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;
@@ -5116,8 +5116,8 @@ write_tree(struct got_object_id **new_tree_id, int *ne
 		    (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
@@ -82,8 +82,8 @@ flushpkt(int fd)
 	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);
@@ -844,7 +844,7 @@ fetch_pack(int fd, int packfd, uint8_t *pack_sha1,
 			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
@@ -234,7 +234,7 @@ tree_request(struct imsg *imsg, struct imsgbuf *ibuf, 
 	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;
 
@@ -990,15 +990,15 @@ main(int argc, char *argv[])
 			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
@@ -2249,8 +2249,8 @@ open_log_view(struct tog_view *view, struct got_object
 	    !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;
 
@@ -5636,8 +5636,8 @@ main(int argc, char *argv[])
 	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, "");