Commit Diff


commit - 95a4a5a1e8d0952ee0d2523dc31df7170d80e0b3
commit + 5e91dae4dd43b8024731223110ab18f505f453ac
blob - f69d6c8dd736869bae7431e0cf4350b2a1b8e1ef
blob + cd476af86afe21052079d72b05d9cbf27c899f28
--- LICENCE
+++ LICENCE
@@ -1,10 +1,10 @@
  Copyright (c) 2017, 2018, 2019, 2020, 2021, 2022
  Stefan Sperling <stsp@openbsd.org>
- 
+
  Permission to use, copy, modify, and distribute this software for any
  purpose with or without fee is hereby granted, provided that the above
  copyright notice and this permission notice appear in all copies.
- 
+
  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
blob - 65a62a169432829c5bf7f9231226468273be39ad
blob + bdf06b70325f2720ec4a7f3bcdc35c740b1052f2
--- got/got.1
+++ got/got.1
@@ -1065,7 +1065,7 @@ work tree, use the repository path associated with thi
 .It Xo
 .Cm ref
 .Op Fl dlt
-.Op Fl c Ar object 
+.Op Fl c Ar object
 .Op Fl r Ar repository-path
 .Op Fl s Ar reference
 .Op Ar name
blob - 892b622a43e9f228674e275339385e0cebd26615
blob + 24a866da4c5f2667eabcecfe5a0b19cde5a70e76
--- got/got.c
+++ got/got.c
@@ -1323,8 +1323,8 @@ create_gotconfig(const char *proto, const char *host, 
 	    GOT_FETCH_DEFAULT_REMOTE_NAME, host, proto,
 	    port ? "\tport " : "", port ? port : "", port ? "\n" : "",
 	    remote_repo_path, branches ? "\tbranch { " : "",
-	    branches ? branches : "", branches ? "}\n" : "", 
-	    refs ? "\treference { " : "", refs ? refs : "", refs ? "}\n" : "", 
+	    branches ? branches : "", branches ? "}\n" : "",
+	    refs ? "\treference { " : "", refs ? refs : "", refs ? "}\n" : "",
 	    mirror_references ? "\tmirror_references yes\n" : "",
 	    fetch_all_branches ? "\tfetch_all_branches yes\n" : "") == -1) {
 		err = got_error_from_errno("asprintf");
@@ -2125,7 +2125,7 @@ delete_missing_refs(struct got_pathlist_head *their_re
 
 			their_refname = local_refname;
 		}
-	
+
 		TAILQ_FOREACH(pe, their_refs, entry) {
 			if (strcmp(their_refname, pe->path) == 0)
 				break;
@@ -2597,7 +2597,7 @@ cmd_fetch(int argc, char *argv[])
 			if (error) {
 				if (error->code != GOT_ERR_NOT_REF)
 					goto done;
-				error = create_ref(remote_refname, id, 
+				error = create_ref(remote_refname, id,
 				    verbosity, repo);
 				if (error)
 					goto done;
@@ -4126,7 +4126,7 @@ print_commit(struct got_commit_object *commit, struct 
 
 	printf(GOT_COMMIT_SEP_STR);
 	if (custom_refs_str)
-		printf("commit %s (%s)\n", id_str, custom_refs_str); 
+		printf("commit %s (%s)\n", id_str, custom_refs_str);
 	else
 		printf("commit %s%s%s%s\n", id_str, refs_str ? " (" : "",
 		    refs_str ? refs_str : "", refs_str ? ")" : "");
@@ -8403,7 +8403,6 @@ done:
 		*logmsg = NULL;
 	}
 	return err;
-	
 }
 
 static const struct got_error *
blob - cc47823cd2100f2565e4172a84472e2fb5ffd7bd
blob + a378b760fc6dade37673aee3debd9a72eddce03a
--- gotadmin/gotadmin.c
+++ gotadmin/gotadmin.c
@@ -980,7 +980,7 @@ list_pack_cb(void *arg, struct got_object_id *id, int 
 		break;
 	case GOT_OBJ_TYPE_REF_DELTA:
 		type_str = "ref-delta";
-		err = got_object_id_str(&base_id_str, base_id);	
+		err = got_object_id_str(&base_id_str, base_id);
 		if (err)
 			goto done;
 		if (asprintf(&delta_str, " base-id %s", base_id_str) == -1) {
blob - 9d0bbf58f683adb056c946f2084ab2897e4509f3
blob + c6db1d281f02e6030400a87b216c3aec949a37f9
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
@@ -268,7 +268,7 @@ static const struct gw_query_action gw_query_funcs[] =
 	{ GW_TREE,	"tree",		gw_tree,	"gw_tmpl/tree.tmpl" },
 };
 
-static const char * 
+static const char *
 gw_get_action_name(struct gw_trans *gw_trans)
 {
 	return gw_query_funcs[gw_trans->action].func_name;
@@ -4503,7 +4503,7 @@ gw_output_repo_tree(struct gw_trans *gw_trans, struct 
 			href_blame = khttp_urlpart(NULL, NULL, "gotweb", "path",
 			    gw_trans->repo_name, "action", "blame", "commit",
 			    gw_trans->commit_id, "file",
-			    got_tree_entry_get_name(te), "folder", 
+			    got_tree_entry_get_name(te), "folder",
 			    gw_trans->repo_folder ? gw_trans->repo_folder : "",
 			    NULL);
 			if (href_blame == NULL) {
blob - 037993ed0667b68af3bc09186201595197a814c9
blob + e8ef72c1578602ffd6a5b783e756e9cfc24595de
--- gotwebd/proc.c
+++ gotwebd/proc.c
@@ -215,7 +215,7 @@ proc_init(struct privsep *ps, struct privsep_proc *pro
 		proc_setup(ps, procs, nproc);
 
 		/*
-		 * Create the children sockets so we can use them 
+		 * Create the children sockets so we can use them
 		 * to distribute the rest of the socketpair()s using
 		 * proc_connect() later.
 		 */
blob - 1cd6f349912d3e03ebbdccfd4beeeb54663af7fb
blob + 4e49d36a9dfb5392b25c430b1fa90b30c898c3ed
--- include/got_object.h
+++ include/got_object.h
@@ -240,7 +240,7 @@ int got_object_tree_entry_is_symlink(struct got_tree_e
  * corresponding to the specified commit. If the specified path is not
  * a symlink then set *link_target to NULL.
  * Otherwise, resolve symlinks recursively and return the final link
- * target path. The caller must dispose of it with free(3). 
+ * target path. The caller must dispose of it with free(3).
  */
 const struct got_error *got_object_resolve_symlinks(char **, const char *,
     struct got_commit_object *, struct got_repository *);
blob - 98714899272ce0d54688d9e1a90e5ac5f0e93087
blob + b3626e6cc55a8ad4c5d1b2e62293dafc283a1c05
--- include/got_reference.h
+++ include/got_reference.h
@@ -185,7 +185,7 @@ struct got_reflist_object_id_map;
  * The caller must dispose of the map with got_reflist_object_id_map_free().
  */
 const struct got_error *got_reflist_object_id_map_create(
-    struct got_reflist_object_id_map **, struct got_reflist_head *, 
+    struct got_reflist_object_id_map **, struct got_reflist_head *,
     struct got_repository *);
 
 /*
blob - b2b02753e786580598a72d4ccfa4aeb006309afe
blob + e4bb25a6d8b1e1b7189a15dca86d54453d48cf39
--- include/got_worktree.h
+++ include/got_worktree.h
@@ -530,7 +530,7 @@ typedef const struct got_error *(*got_worktree_path_in
     struct got_object_id *blob_id, struct got_object_id *staged_blob_id,
     struct got_object_id *commit_id);
 
-/* 
+/*
  * Report work-tree meta data for paths in the work tree.
  * The info callback will be invoked with the provided void * argument,
  * a path, and meta-data arguments (see got_worktree_path_info_cb).
blob - 05701b819fcf75cc1c3d627b88c1f75ff8597911
blob + c11280e036c43527546ff7dea1fdf989ad7cf971
--- lib/blame.c
+++ lib/blame.c
@@ -62,7 +62,7 @@ struct got_blame {
 	 * These change with every traversed commit. After diffing
 	 * commits N:N-1, in preparation for diffing commits N-1:N-2,
 	 * data for commit N is retained and flipped into data for N-1.
-	 * 
+	 *
 	 */
 	FILE *f1; /* older version from commit N-1. */
 	FILE *f2; /* newer version from commit N. */
@@ -473,7 +473,7 @@ flip_files(struct got_blame *blame)
 
 	err = got_opentemp_truncate(blame->f2);
 	if (err)
-		return err; 
+		return err;
 	tmp = blame->f2;
 	blame->f2 = blame->f1;
 	blame->f1 = tmp;
blob - ab75c9fa52c19c7f3190c186c3002f46ee627c7e
blob + 6bd8285d6e72edbef809c8c07aa4f74a7e1e0b0d
--- lib/diffreg.c
+++ lib/diffreg.c
@@ -246,7 +246,7 @@ done:
 			*diffreg_result = NULL;
 		}
 	}
-	
+
 	return err;
 }
 
blob - c6a947cc4002d0ef7d26469a37cfd819bb827897
blob + 897d9da4c5d2cbbf863779e67af4ba3faeb6ae40
--- lib/fetch.c
+++ lib/fetch.c
@@ -422,7 +422,7 @@ got_fetch_pack(struct got_object_id **pack_hash, struc
 		err = got_error_from_errno("lseek");
 		goto done;
 	}
- 
+
 	if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, imsg_idxfds) == -1) {
 		err = got_error_from_errno("socketpair");
 		goto done;
blob - 52947dd222fcda2c7cb0b987113304a68bb33445
blob + fca0ead4f2705e742e6d52e30f094a01b9369853
--- lib/fileindex.c
+++ lib/fileindex.c
@@ -1205,7 +1205,7 @@ got_fileindex_diff_dir(struct got_fileindex *fileindex
 
 	TAILQ_INIT(&dirlist);
 
-	/* 
+	/*
 	 * Duplicate the file descriptor so we can call closedir() below
 	 * without closing the file descriptor passed in by our caller.
 	 */
blob - 43c7096d0a3fe2bb611660d822341235f3223a17
blob + 740595aedb09404e54af0b7760c3df40c71930c1
--- lib/got_lib_diff.h
+++ lib/got_lib_diff.h
@@ -41,7 +41,7 @@ struct got_diffreg_result {
 const struct got_error *got_diff_get_config(struct diff_config **,
     enum got_diff_algorithm, diff_atomize_func_t, void *);
 const struct got_error *got_diff_prepare_file(FILE *, char **, size_t *,
-    struct diff_data *, const struct diff_config *, int, int); 
+    struct diff_data *, const struct diff_config *, int, int);
 const struct got_error *got_diffreg(struct got_diffreg_result **, FILE *,
     FILE *, enum got_diff_algorithm, int, int);
 const struct got_error *got_diffreg_output(struct got_diff_line **, size_t *,
blob - 977f28bca21557ad62008b7a21e4d731ecc5cbd9
blob + decb643f317e45f572f429fd41d02f2c578772b0
--- lib/got_lib_lockfile.h
+++ lib/got_lib_lockfile.h
@@ -16,7 +16,7 @@
 
 /*
  * Git-compatible lock file implementation. Lock files are used to
- * ensure exclusive access when files in a GIt repository are modified. 
+ * ensure exclusive access when files in a Git repository are modified.
  */
 
 #define GOT_LOCKFILE_SUFFIX ".lock"
blob - 24c7c68b7574559306b53c587c4f7d5e5374d02d
blob + c6df6ebc501bda287c7350222f5e4ccf706763bf
--- lib/got_lib_pack.h
+++ lib/got_lib_pack.h
@@ -73,7 +73,7 @@ struct got_packidx_v2_hdr {
 #define GOT_PACKIDX_V2_MAGIC 0xff744f63	/* "\377t0c" */
 	uint32_t	*version;
 
-	/* 
+	/*
 	 * Each entry N in the fanout table contains the number of objects in
 	 * the packfile whose SHA1 begins with a byte less than or equal to N.
 	 * The last entry (index 255) contains the number of objects in the
@@ -132,7 +132,7 @@ struct got_packfile_hdr {
 };
 
 struct got_packfile_obj_hdr {
-	/* 
+	/*
 	 * The object size field uses a variable length encoding:
 	 * size0...sizeN form a 4+7+7+...+7 bit integer, where size0 is the
 	 * least significant part and sizeN is the most significant part.
@@ -161,7 +161,7 @@ struct got_packfile_object_data_ref_delta {
 
 /* If object is of type GOT_OBJ_TYPE_OFFSET_DELTA. */
 struct got_packfile_object_data_offset_delta {
-	/* 
+	/*
 	 * This offset is interpreted as a negative offset from
 	 * the got_packfile_obj_hdr corresponding to this object.
 	 * The size provided in the header specifies the amount
blob - 8b976a88e8422f5bba1012e0cdd2e3d205ed1a6a
blob + 28d77bb457c59dd0fa56e815055a611a3c6fdd07
--- lib/got_lib_privsep.h
+++ lib/got_lib_privsep.h
@@ -815,7 +815,7 @@ const struct got_error *got_privsep_send_delta_reuse_r
 const struct got_error *got_privsep_send_reused_deltas(struct imsgbuf *,
     struct got_imsg_reused_delta *, size_t);
 const struct got_error *got_privsep_send_reused_deltas_done(struct imsgbuf *);
-const struct got_error *got_privsep_recv_reused_deltas(int *, 
+const struct got_error *got_privsep_recv_reused_deltas(int *,
     struct got_imsg_reused_delta *, size_t *, struct imsgbuf *);
 
 const struct got_error *got_privsep_init_commit_painting(struct imsgbuf *);
blob - ca950e73ef86eb0cf17cef593f6caec9e40a2dcb
blob + 7fb3bb5f6697a122e8f1b2698501306782d33bdb
--- lib/inflate.c
+++ lib/inflate.c
@@ -347,7 +347,7 @@ done:
 
 const struct got_error *
 got_inflate_to_mem_fd(uint8_t **outbuf, size_t *outlen,
-    size_t *consumed_total, struct got_inflate_checksum *csum, 
+    size_t *consumed_total, struct got_inflate_checksum *csum,
     size_t expected_size, int infd)
 {
 	const struct got_error *err;
blob - 12ae8e569a5cb16540cc4d70ad34d56c0964258a
blob + 9fcd4fa3978b2e29657e3fb07c4d6af41f6427cd
--- lib/object.c
+++ lib/object.c
@@ -177,7 +177,7 @@ pack_child_send_tempfiles(struct imsgbuf *ibuf, struct
 	const struct got_error *err;
 	int basefd = -1, accumfd = -1;
 
-	/* 
+	/*
 	 * For performance reasons, the child will keep reusing the
 	 * same temporary files during every object request.
 	 * Opening and closing new files for every object request is
@@ -888,7 +888,7 @@ got_object_id_queue_copy(const struct got_object_id_qu
 		 * Deep-copy the object ID only. Let the caller deal
 		 * with setting up the new->data pointer if needed.
 		 */
-		err = got_object_qid_alloc(&new, &qid->id); 
+		err = got_object_qid_alloc(&new, &qid->id);
 		if (err) {
 			got_object_id_queue_free(dest);
 			return err;
blob - a6f27898584ea73a11f529273e3da9e6f5c10cf6
blob + f58d1e7dc1d81be2989c4b8114725ca657c9ea3a
--- lib/object_idset.c
+++ lib/object_idset.c
@@ -166,7 +166,7 @@ got_object_idset_add(struct got_object_idset *set, str
 
 	if (set->totelem == UINT_MAX)
 		return got_error(GOT_ERR_NO_SPACE);
-		
+
 	err = got_object_qid_alloc_partial(&qid);
 	if (err)
 		return err;
blob - cd6e51f54ef137ee87a06f0226d9413038eb2404
blob + 939bd135cfe0576cf9d58bde532ea7006dd0152e
--- lib/object_parse.c
+++ lib/object_parse.c
@@ -358,7 +358,7 @@ parse_commit_time(time_t *time, time_t *gmtoff, char *
 		return got_error_from_errno("strdup");
 	err = parse_gmtoff(gmtoff, tzstr);
 	free(tzstr);
-	if (err) { 
+	if (err) {
 		if (err->code != GOT_ERR_BAD_OBJ_DATA)
 			return err;
 		/* Old versions of Git omitted the timestamp. */
blob - dbbf1df2ebec072333fd1aaef08fac6a2f818de9
blob + e1c54a2cfa511cc98322cf15497e14590c8dd6f3
--- lib/pack_create.c
+++ lib/pack_create.c
@@ -497,7 +497,7 @@ add_meta(struct got_pack_meta *m, struct got_pack_meta
 		if (new == NULL)
 			return got_error_from_errno("reallocarray");
 		v->meta = new;
-		v->metasz = newsize; 
+		v->metasz = newsize;
 	}
 
 	v->meta[v->nmeta++] = m;
@@ -1740,7 +1740,7 @@ findtwixt(struct got_object_id ***res, int *nres, int 
 		err = queue_commit_or_tag_id(id, COLOR_KEEP, &ids, repo);
 		if (err)
 			goto done;
-	}		
+	}
 
 	for (i = 0; i < ntail; i++) {
 		struct got_object_id *id = tail[i];
blob - a47b26a8fcc75a0889cc09cd5b7230842ec0ae6e
blob + fc898c75e876b90c401ee5436e0a2932924d9bbd
--- lib/repository.c
+++ lib/repository.c
@@ -1167,7 +1167,7 @@ add_packidx_bloom_filter(struct got_repository *repo,
 		free(bf);
 		return got_error_from_errno("calloc");
 	}
-	
+
 	len = strlcpy(bf->path, path_packidx, sizeof(bf->path));
 	if (len >= sizeof(bf->path)) {
 		free(bf->bloom);
@@ -1436,7 +1436,7 @@ got_repo_cache_pack(struct got_pack **packp, struct go
 			return got_error_from_errno("ftruncate");
 		if (ftruncate(repo->packs[i].accumfd, 0L) == -1)
 			return got_error_from_errno("ftruncate");
-		memcpy(&tmp, &repo->packs[i], sizeof(tmp)); 
+		memcpy(&tmp, &repo->packs[i], sizeof(tmp));
 		memcpy(&repo->packs[i], &repo->packs[0],
 		    sizeof(repo->packs[i]));
 		memcpy(&repo->packs[0], &tmp, sizeof(repo->packs[0]));
@@ -2067,7 +2067,7 @@ import_subdir(struct got_tree_entry **new_te, struct d
 	if (err)
 		goto done;
 	memcpy(&(*new_te)->id, id, sizeof((*new_te)->id));
-	
+
 done:
 	free(id);
 	free(subdirpath);
blob - fbbf630b74acc59aa03d6870d1359e0f93224042
blob + 2cf33ed80132762b274635d2ca08a08e5e5a5f22
--- lib/repository_admin.c
+++ lib/repository_admin.c
@@ -831,7 +831,6 @@ load_tree_entries(struct got_object_id_queue *ids,
 			err = got_object_idset_add(traversed_ids, id, NULL);
 			if (err)
 				break;
-			
 		}
 		free(p);
 		p = NULL;
@@ -1014,7 +1013,7 @@ load_commit_or_tag(struct got_object_idset *loose_ids,
 		    nloose, *ncommits, -1);
 		if (err)
 			break;
- 
+
 		if (commit) {
 			/* Find parent commits to scan. */
 			const struct got_object_id_queue *parent_ids;
blob - 587972ac2ca3434668208f4e401ac33c622657a1
blob + f82a9689259ee66048cc0d9c503e6eb31568215b
--- lib/worktree.c
+++ lib/worktree.c
@@ -1034,7 +1034,7 @@ merge_blob(int *local_changes_subsumed, struct got_wor
 		goto done;
 	}
 
-	/* 
+	/*
 	 * In order the run a 3-way merge with a symlink we copy the symlink's
 	 * target path into a temporary file and use that file with diff3.
 	 */
@@ -3554,7 +3554,7 @@ add_ignores(struct got_pathlist_head *ignores, const c
 				    ignorespath);
 		} else {
 			ignoresfile = fdopen(fd, "r");
-			if (ignoresfile == NULL) 
+			if (ignoresfile == NULL)
 				err = got_error_from_errno2("fdopen",
 				    ignorespath);
 			else {
@@ -4098,7 +4098,7 @@ schedule_for_deletion(void *arg, unsigned char status,
 			if (status == a->status_codes[i])
 				break;
 		}
-		if (i == ncodes) { 
+		if (i == ncodes) {
 			/* Do not delete files in non-matching status. */
 			free(ondisk_path);
 			return NULL;
@@ -4355,7 +4355,7 @@ apply_or_reject_change(int *choice, int *nchunks_used,
     got_worktree_patch_cb patch_cb, void *patch_arg)
 {
 	const struct got_error *err = NULL;
-	struct diff_chunk_context cc = {}; 
+	struct diff_chunk_context cc = {};
 	int start_old, end_old, start_new, end_new;
 	FILE *hunkfile;
 	struct diff_output_unidiff_state *diff_state;
@@ -4562,7 +4562,7 @@ create_patched_content(char **path_outfile, int revers
 
 	/* Count the number of actual changes in the diff result. */
 	for (n = 0; n < diffreg_result->result->chunks.len; n += nchunks_used) {
-		struct diff_chunk_context cc = {}; 
+		struct diff_chunk_context cc = {};
 		diff_chunk_context_load_change(&cc, &nchunks_used,
 		    diffreg_result->result, n, 0);
 		nchanges++;
@@ -8544,7 +8544,7 @@ unstage_hunks(struct got_object_id *staged_blob_id,
 		if (err)
 			goto done;
 
-		/* 
+		/*
 		 * In order the run a 3-way merge with a symlink we copy the symlink's
 		 * target path into a temporary file and use that file with diff3.
 		 */
blob - 9d2cd0e1577f750520a0a270694966b5cb57d10d
blob + b253e5ac03dea40d28e1f2112418a29f0365a7c6
--- libexec/got-fetch-pack/got-fetch-pack.c
+++ libexec/got-fetch-pack/got-fetch-pack.c
@@ -77,7 +77,7 @@ match_remote_ref(struct got_pathlist_head *have_refs,
 
 	TAILQ_FOREACH(pe, have_refs, entry) {
 		struct got_object_id *id = pe->data;
-		if (strcmp(pe->path, refname) == 0) { 
+		if (strcmp(pe->path, refname) == 0) {
 			memcpy(my_id, id, sizeof(*my_id));
 			break;
 		}
blob - 4406e5ce66cdd5c7694f7d12f528781f8c99c57b
blob + a361289b4a09acce2ecd03e2d8817a2f84e28f5a
--- libexec/got-index-pack/got-index-pack.c
+++ libexec/got-index-pack/got-index-pack.c
@@ -75,10 +75,10 @@ struct got_indexed_object {
 	uint64_t size;
 
 	/* Length of on-disk type+size data. */
-	size_t tslen; 
+	size_t tslen;
 
 	/* Length of object data following type+size. */
-	size_t len; 
+	size_t len;
 
 	uint32_t crc;
 
@@ -499,7 +499,7 @@ print_packidx(struct got_packidx *packidx)
 		uint32_t offset = be32toh(packidx->hdr.offsets[i]);
 		if (offset & GOT_PACKIDX_OFFSET_VAL_IS_LARGE_IDX) {
 			int j = offset & GOT_PACKIDX_OFFSET_VAL_MASK;
-			fprintf(stderr, "%u -> %llu\n", offset, 
+			fprintf(stderr, "%u -> %llu\n", offset,
 			    be64toh(packidx->hdr.large_offsets[j]));
 		} else
 			fprintf(stderr, "%u\n", offset);
blob - 1400f75cd82a62af84447ebaeee062b963f74f31
blob + b2896d83221d70e883140fef22f1569195a28079
--- libexec/got-read-pack/got-read-pack.c
+++ libexec/got-read-pack/got-read-pack.c
@@ -851,7 +851,7 @@ get_base_object_id(struct got_object_id *base_id, stru
 	const struct got_error *err;
 	int idx;
 
-	err = got_packidx_get_offset_idx(&idx, packidx, base_offset); 
+	err = got_packidx_get_offset_idx(&idx, packidx, base_offset);
 	if (err)
 		return err;
 	if (idx == -1)
@@ -1727,7 +1727,7 @@ commit_painting_free(struct got_object_idset **keep,
 		*drop = NULL;
 	}
 	if (*skip) {
-		got_object_idset_free(*skip); 
+		got_object_idset_free(*skip);
 		*skip = NULL;
 	}
 }
blob - 515ae625ac960496d011cf026341c9040df9c1b8
blob + b710300b01ca493c65b6f6e9c20b53d66fcac6e7
--- libexec/got-send-pack/got-send-pack.c
+++ libexec/got-send-pack/got-send-pack.c
@@ -119,7 +119,7 @@ recv_packfd(int *packfd, struct imsgbuf *ibuf)
 	err = got_privsep_recv_imsg(&imsg, ibuf, 0);
 	if (err)
 		return err;
-		
+
 	if (imsg.hdr.type == GOT_IMSG_STOP) {
 		err = got_error(GOT_ERR_CANCELLED);
 		goto done;
blob - ce55e3f7444303e0529ea7e9c68982d61b3d3275
blob + 91307342c12e2cd7aee08e6b177a89a2ea3f20e2
--- regress/cmdline/blame.sh
+++ regress/cmdline/blame.sh
@@ -579,7 +579,7 @@ blob + c787aadf05e2afab61bd34976f7349912252e6da
 @@ -14,5 +14,22 @@
   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   */
- 
+
 +/*
 + * Write an annotated version of a file at a given in-repository path,
 + * as found in the commit specified by ID, to the specified output file.
@@ -658,7 +658,7 @@ blob + 6075cadbd177e1802679c7353515bf4ceebb51d0
 +++ got_blame.h
 @@ -15,14 +15,7 @@
   */
- 
+
  /*
 - * Write an annotated version of a file at a given in-repository path,
 - * as found in the commit specified by ID, to the specified output file.
blob - f73f4a345848c012f6f17f10fba4accf493f8ae0
blob + 60e1f0fac6ad4a1710f1b237ccc1120775fab326
--- regress/cmdline/cat.sh
+++ regress/cmdline/cat.sh
@@ -70,7 +70,6 @@ test_cat_basic() {
 	# TODO: test cat tag
 
 	test_done "$testroot" "$ret"
-	
 }
 
 test_cat_path() {
blob - ac5a1498212d23ffe99224ddca891f89653de702
blob + dd2a0116f4d80b4d2507dd880190f3f355cc3c95
--- regress/cmdline/cherrypick.sh
+++ regress/cmdline/cherrypick.sh
@@ -270,7 +270,7 @@ test_cherrypick_into_work_tree_with_mixed_commits() {
 	local first_rev=`git_show_head $testroot/repo`
 
 	echo "modified alpha" > $testroot/repo/alpha
-	git_commit $testroot/repo -m "committing to alpha" 
+	git_commit $testroot/repo -m "committing to alpha"
 	local second_rev=`git_show_head $testroot/repo`
 
 	got checkout $testroot/repo $testroot/wt > /dev/null
@@ -1308,7 +1308,6 @@ got_ref_list_free(struct got_reflist_head *refs)
                 TAILQ_REMOVE(refs, re, entry);
                 free(re);
         }
-
 }
 EOF
 	(cd $testroot/repo && git add reference.c)
@@ -1369,7 +1368,7 @@ EOF
 +                got_ref_close(re->ref);
                  free(re);
          }
- 
+ }
 EOF
 	(cd $testroot/wt && got diff |
 		egrep -v '^(diff|blob|file|commit|path)' > $testroot/diff)
blob - fc218eff521a465dc36ca25aad4973aa104fbb4c
blob + 3ffad0feb0127a8e3deb3766f2d7a9d1a383e35f
--- regress/cmdline/log.sh
+++ regress/cmdline/log.sh
@@ -503,7 +503,7 @@ test_log_end_at_commit() {
 
 	# got will refuse -x with a non-existent commit
 	(cd $testroot/wt && got log -x nonexistent \
-		> $testroot/stdout 2> $testroot/stderr) 
+		> $testroot/stdout 2> $testroot/stderr)
 	ret=$?
 	if [ $ret -eq 0 ]; then
 		echo "log command succeeded unexpectedly" >&2
@@ -530,9 +530,9 @@ test_log_end_at_commit() {
 
 	# try the same with the hash of an empty string which is very
 	# unlikely to match any object
-	local empty_sha1=da39a3ee5e6b4b0d3255bfef95601890afd80709 
+	local empty_sha1=da39a3ee5e6b4b0d3255bfef95601890afd80709
 	(cd $testroot/wt && got log -x $empty_sha1 \
-		> $testroot/stdout 2> $testroot/stderr) 
+		> $testroot/stdout 2> $testroot/stderr)
 	ret=$?
 	if [ $ret -eq 0 ]; then
 		echo "log command succeeded unexpectedly" >&2
blob - 0d03d0c83a725429e9a8d665b4e26dcbfe287e8c
blob + 3f0578e460b5ab26c3e92ecb652e7a6e21f4cb65
--- regress/cmdline/merge.sh
+++ regress/cmdline/merge.sh
@@ -52,7 +52,7 @@ test_merge_basic() {
 		return 1
 	fi
 
-	# need a divergant commit on the main branch for 'got merge' 
+	# need a divergant commit on the main branch for 'got merge'
 	(cd $testroot/wt && got merge newbranch \
 		> $testroot/stdout 2> $testroot/stderr)
 	ret=$?
@@ -82,7 +82,7 @@ test_merge_basic() {
 	git_commit $testroot/repo -m "committing to zeta on master"
 	local master_commit=`git_show_head $testroot/repo`
 
-	# need an up-to-date work tree for 'got merge' 
+	# need an up-to-date work tree for 'got merge'
 	(cd $testroot/wt && got merge newbranch \
 		> $testroot/stdout 2> $testroot/stderr)
 	ret=$?
@@ -110,7 +110,7 @@ test_merge_basic() {
 		return 1
 	fi
 
-	# must not use a mixed-commit work tree with 'got merge' 
+	# must not use a mixed-commit work tree with 'got merge'
 	(cd $testroot/wt && got update -c $commit0 alpha > /dev/null)
 	ret=$?
 	if [ $ret -ne 0 ]; then
@@ -146,7 +146,7 @@ test_merge_basic() {
 		return 1
 	fi
 
-	# must not have staged files with 'got merge' 
+	# must not have staged files with 'got merge'
 	echo "modified file alpha"  > $testroot/wt/alpha
 	(cd $testroot/wt && got stage alpha > /dev/null)
 	ret=$?
@@ -179,7 +179,7 @@ test_merge_basic() {
 		return 1
 	fi
 
-	# must not have local changes with 'got merge' 
+	# must not have local changes with 'got merge'
 	(cd $testroot/wt && got merge newbranch \
 		> $testroot/stdout 2> $testroot/stderr)
 	ret=$?
@@ -406,7 +406,7 @@ test_merge_continue() {
 	git_commit $testroot/repo -m "committing to alpha on master"
 	local master_commit=`git_show_head $testroot/repo`
 
-	# need an up-to-date work tree for 'got merge' 
+	# need an up-to-date work tree for 'got merge'
 	(cd $testroot/wt && got update > /dev/null)
 	ret=$?
 	if [ $ret -ne 0 ]; then
@@ -631,7 +631,7 @@ test_merge_abort() {
 	git_commit $testroot/repo -m "committing to alpha on master"
 	local master_commit=`git_show_head $testroot/repo`
 
-	# need an up-to-date work tree for 'got merge' 
+	# need an up-to-date work tree for 'got merge'
 	(cd $testroot/wt && got update > /dev/null)
 	ret=$?
 	if [ $ret -ne 0 ]; then
@@ -812,7 +812,7 @@ test_merge_in_progress() {
 	git_commit $testroot/repo -m "committing to alpha on master"
 	local master_commit=`git_show_head $testroot/repo`
 
-	# need an up-to-date work tree for 'got merge' 
+	# need an up-to-date work tree for 'got merge'
 	(cd $testroot/wt && got update > /dev/null)
 	ret=$?
 	if [ $ret -ne 0 ]; then
@@ -916,7 +916,7 @@ test_merge_path_prefix() {
 	git_commit $testroot/repo -m "committing to alpha on master"
 	local master_commit=`git_show_head $testroot/repo`
 
-	# need an up-to-date work tree for 'got merge' 
+	# need an up-to-date work tree for 'got merge'
 	(cd $testroot/wt && got update > /dev/null)
 	ret=$?
 	if [ $ret -ne 0 ]; then
@@ -970,7 +970,7 @@ test_merge_missing_file() {
 	git_commit $testroot/repo -m "moving alpha on master"
 	local master_commit=`git_show_head $testroot/repo`
 
-	# need an up-to-date work tree for 'got merge' 
+	# need an up-to-date work tree for 'got merge'
 	(cd $testroot/wt && got update > /dev/null)
 	ret=$?
 	if [ $ret -ne 0 ]; then
@@ -1053,7 +1053,7 @@ test_merge_no_op() {
 	git_commit $testroot/repo -m "committing to alpha on master"
 	local master_commit=`git_show_head $testroot/repo`
 
-	# need an up-to-date work tree for 'got merge' 
+	# need an up-to-date work tree for 'got merge'
 	(cd $testroot/wt && got update > /dev/null)
 	ret=$?
 	if [ $ret -ne 0 ]; then
@@ -1271,7 +1271,7 @@ test_merge_interrupt() {
 	git_commit $testroot/repo -m "committing to beta on master"
 	local master_commit=`git_show_head $testroot/repo`
 
-	# need an up-to-date work tree for 'got merge' 
+	# need an up-to-date work tree for 'got merge'
 	(cd $testroot/wt && got update > /dev/null)
 	ret=$?
 	if [ $ret -ne 0 ]; then
blob - dbb9b29d4e5d2c9f64df51e0c6d0054bec81f6ff
blob + b2315194a6347d2b00b98f019861b2b6776d08ef
--- regress/cmdline/rebase.sh
+++ regress/cmdline/rebase.sh
@@ -971,7 +971,7 @@ test_rebase_forward() {
 		> /dev/null)
 	local commit2=`git_show_head $testroot/repo`
 
-	# Simulate a situation where fast-forward is required. 
+	# Simulate a situation where fast-forward is required.
 	# We want to fast-forward master to origin/master:
 	# commit 3907e11dceaae2ca7f8db79c2af31794673945ad (origin/master)
 	# commit ffcffcd102cf1af6572fbdbb4cf07a0f1fd2d840 (master)
blob - 563ef75073b34c24187086af0ec4227156583358
blob + b86a51bf2a102808072428b8f575dc6a449b6769
--- regress/cmdline/ref.sh
+++ regress/cmdline/ref.sh
@@ -433,7 +433,7 @@ test_ref_list() {
 			test_done "$testroot" "$ret"
 			return 1
 		fi
-	done	
+	done
 
 	test_done "$testroot" "$ret"
 }
blob - 9b68f290f9a1292250e21ea6a0e37961d6e9179c
blob + f989b0dbd6a3ca710184d881f574e55a5eb83e78
--- regress/cmdline/send.sh
+++ regress/cmdline/send.sh
@@ -54,7 +54,7 @@ EOF
 		test_done "$testroot" "$ret"
 		return 1
 	fi
-	
+
 	echo -n > $testroot/stdout.expected
 	cmp -s $testroot/stdout $testroot/stdout.expected
 	ret=$?
@@ -128,7 +128,7 @@ EOF
 		test_done "$testroot" "$ret"
 		return 1
 	fi
-	
+
 	echo 'Connecting to "origin" 127.0.0.1' > $testroot/stdout.expected
 	echo "Already up-to-date" >> $testroot/stdout.expected
 	cmp -s $testroot/stdout $testroot/stdout.expected
@@ -178,7 +178,7 @@ EOF
 		test_done "$testroot" 1
 		return 1
 	fi
-	
+
 	echo -n > $testroot/stdout.expected
 	cmp -s $testroot/stdout $testroot/stdout.expected
 	ret=$?
@@ -258,7 +258,7 @@ EOF
 		test_done "$testroot" "$ret"
 		return 1
 	fi
-	
+
 	echo -n > $testroot/stdout.expected
 	cmp -s $testroot/stdout $testroot/stdout.expected
 	ret=$?
@@ -530,7 +530,7 @@ test_send_clone_and_send() {
 		test_done "$testroot" "$ret"
 		return 1
 	fi
-	
+
 	echo -n > $testroot/stdout.expected
 	cmp -s $testroot/stdout $testroot/stdout.expected
 	ret=$?
@@ -629,7 +629,7 @@ EOF
 		test_done "$testroot" "$ret"
 		return 1
 	fi
-	
+
 	echo -n > $testroot/stdout.expected
 	cmp -s $testroot/stdout $testroot/stdout.expected
 	ret=$?
@@ -706,7 +706,7 @@ EOF
 		test_done "$testroot" "$ret"
 		return 1
 	fi
-	
+
 	echo -n > $testroot/stdout.expected
 	cmp -s $testroot/stdout $testroot/stdout.expected
 	ret=$?
@@ -771,7 +771,7 @@ EOF
 		test_done "$testroot" "$ret"
 		return 1
 	fi
-	
+
 	# overwrite the 1.0 tag only
 	got send -q -r $testroot/repo -t 1.0 -f > $testroot/stdout \
 		2> $testroot/stderr
@@ -781,7 +781,7 @@ EOF
 		test_done "$testroot" "$ret"
 		return 1
 	fi
-	
+
 	got tag -l -r $testroot/repo-clone | grep ^tag | sort > $testroot/stdout
 	echo "tag 1.0 $tag_id3" > $testroot/stdout.expected
 	echo "tag 2.0 $tag_id2" >> $testroot/stdout.expected
@@ -890,7 +890,7 @@ EOF
 		test_done "$testroot" "$ret"
 		return 1
 	fi
-	
+
 	echo -n > $testroot/stdout.expected
 	cmp -s $testroot/stdout $testroot/stdout.expected
 	ret=$?
@@ -994,7 +994,7 @@ test_send_new_branch() {
 		test_done "$testroot" "$ret"
 		return 1
 	fi
-	
+
 	echo -n > $testroot/stdout.expected
 	cmp -s $testroot/stdout $testroot/stdout.expected
 	ret=$?
@@ -1230,7 +1230,7 @@ EOF
 		test_done "$testroot" "$ret"
 		return 1
 	fi
-	
+
 	echo -n > $testroot/stdout.expected
 	cmp -s $testroot/stdout $testroot/stdout.expected
 	ret=$?
@@ -1290,7 +1290,7 @@ EOF
 		test_done "$testroot" "$ret"
 		return 1
 	fi
-	
+
 	echo 'Connecting to "origin" 127.0.0.1' > $testroot/stdout.expected
 	echo "Already up-to-date" >> $testroot/stdout.expected
 	cmp -s $testroot/stdout $testroot/stdout.expected
@@ -1473,7 +1473,7 @@ EOF
 		test_done "$testroot" "$ret"
 		return 1
 	fi
-	
+
 	got branch -r $testroot/repo foo
 
 	got send -q -r $testroot/repo > $testroot/stdout 2> $testroot/stderr
blob - 96ab8703a99e287bd3ac0a498addcbfb9ac8ebce
blob + 6168491dcdae298a50000ab17dd1b5af061cce7e
--- regress/cmdline/status.sh
+++ regress/cmdline/status.sh
@@ -566,7 +566,7 @@ test_status_cvsignore() {
 		test_done "$testroot" "$ret"
 		return 1
 	fi
-		
+
 	echo -n '' > $testroot/stdout.expected
 	(cd $testroot/wt && got status epsilon/new > $testroot/stdout)
 
blob - d39141fb12a51b418ec658816ffb680669c89938
blob + 5e848211fb214dcf85821630b0ddfec124dc7502
--- util/got-build-regress.sh
+++ util/got-build-regress.sh
@@ -38,7 +38,7 @@ while [ $# -ne 0 ]; do
 			force=1; shift;;
 		-w)
 			worktree="$2"; shift; shift;;
-		-r)	
+		-r)
 			fromaddr_arg="-r $2"; shift; shift;;
 		-R)
 			testroot="$2"; shift; shift;;