Blame


1 86c3caaf 2018-03-09 stsp /*
2 86c3caaf 2018-03-09 stsp * Copyright (c) 2018 Stefan Sperling <stsp@openbsd.org>
3 86c3caaf 2018-03-09 stsp *
4 86c3caaf 2018-03-09 stsp * Permission to use, copy, modify, and distribute this software for any
5 86c3caaf 2018-03-09 stsp * purpose with or without fee is hereby granted, provided that the above
6 86c3caaf 2018-03-09 stsp * copyright notice and this permission notice appear in all copies.
7 86c3caaf 2018-03-09 stsp *
8 86c3caaf 2018-03-09 stsp * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 86c3caaf 2018-03-09 stsp * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 86c3caaf 2018-03-09 stsp * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 86c3caaf 2018-03-09 stsp * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 86c3caaf 2018-03-09 stsp * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 86c3caaf 2018-03-09 stsp * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 86c3caaf 2018-03-09 stsp * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 86c3caaf 2018-03-09 stsp */
16 86c3caaf 2018-03-09 stsp
17 86c3caaf 2018-03-09 stsp #include <sys/stat.h>
18 6d9d28c3 2018-03-11 stsp #include <sys/limits.h>
19 86c3caaf 2018-03-09 stsp
20 86c3caaf 2018-03-09 stsp #include <string.h>
21 86c3caaf 2018-03-09 stsp #include <stdio.h>
22 86c3caaf 2018-03-09 stsp #include <stdlib.h>
23 86c3caaf 2018-03-09 stsp #include <fcntl.h>
24 86c3caaf 2018-03-09 stsp #include <errno.h>
25 86c3caaf 2018-03-09 stsp #include <unistd.h>
26 86c3caaf 2018-03-09 stsp
27 86c3caaf 2018-03-09 stsp #include "got_error.h"
28 86c3caaf 2018-03-09 stsp #include "got_repository.h"
29 86c3caaf 2018-03-09 stsp #include "got_refs.h"
30 86c3caaf 2018-03-09 stsp #include "got_worktree.h"
31 86c3caaf 2018-03-09 stsp
32 86c3caaf 2018-03-09 stsp #include "got_worktree_priv.h"
33 86c3caaf 2018-03-09 stsp #include "got_path_priv.h"
34 86c3caaf 2018-03-09 stsp
35 99724ed4 2018-03-10 stsp static const struct got_error *
36 99724ed4 2018-03-10 stsp create_meta_file(const char *gotpath, const char *name, const char *content)
37 99724ed4 2018-03-10 stsp {
38 99724ed4 2018-03-10 stsp const struct got_error *err = NULL;
39 99724ed4 2018-03-10 stsp char *path;
40 99724ed4 2018-03-10 stsp int fd = -1;
41 99724ed4 2018-03-10 stsp char buf[4];
42 99724ed4 2018-03-10 stsp ssize_t n;
43 99724ed4 2018-03-10 stsp
44 99724ed4 2018-03-10 stsp if (asprintf(&path, "%s/%s", gotpath, name) == -1) {
45 99724ed4 2018-03-10 stsp err = got_error(GOT_ERR_NO_MEM);
46 99724ed4 2018-03-10 stsp path = NULL;
47 99724ed4 2018-03-10 stsp goto done;
48 99724ed4 2018-03-10 stsp }
49 99724ed4 2018-03-10 stsp
50 73a5ef67 2018-03-11 stsp fd = open(path, O_RDWR | O_CREAT | O_EXCL | O_NOFOLLOW,
51 99724ed4 2018-03-10 stsp GOT_DEFAULT_FILE_MODE);
52 99724ed4 2018-03-10 stsp if (fd == -1) {
53 99724ed4 2018-03-10 stsp err = got_error_from_errno();
54 99724ed4 2018-03-10 stsp goto done;
55 99724ed4 2018-03-10 stsp }
56 99724ed4 2018-03-10 stsp
57 99724ed4 2018-03-10 stsp /* The file should be empty. */
58 99724ed4 2018-03-10 stsp n = read(fd, buf, sizeof(buf));
59 99724ed4 2018-03-10 stsp if (n != 0) {
60 99724ed4 2018-03-10 stsp err = (n == -1 ? got_error_from_errno() :
61 99724ed4 2018-03-10 stsp got_error(GOT_ERR_WORKTREE_EXISTS));
62 99724ed4 2018-03-10 stsp goto done;
63 99724ed4 2018-03-10 stsp }
64 99724ed4 2018-03-10 stsp
65 99724ed4 2018-03-10 stsp if (content) {
66 99724ed4 2018-03-10 stsp int len = dprintf(fd, "%s\n", content);
67 99724ed4 2018-03-10 stsp if (len != strlen(content) + 1) {
68 99724ed4 2018-03-10 stsp err = got_error_from_errno();
69 99724ed4 2018-03-10 stsp goto done;
70 99724ed4 2018-03-10 stsp }
71 99724ed4 2018-03-10 stsp }
72 99724ed4 2018-03-10 stsp
73 99724ed4 2018-03-10 stsp done:
74 99724ed4 2018-03-10 stsp if (fd != -1 && close(fd) == -1 && err == NULL)
75 99724ed4 2018-03-10 stsp err = got_error_from_errno();
76 99724ed4 2018-03-10 stsp free(path);
77 99724ed4 2018-03-10 stsp return err;
78 99724ed4 2018-03-10 stsp }
79 99724ed4 2018-03-10 stsp
80 09fe317a 2018-03-11 stsp static const struct got_error *
81 09fe317a 2018-03-11 stsp read_meta_file(char **content, const char *gotpath, const char *name)
82 09fe317a 2018-03-11 stsp {
83 09fe317a 2018-03-11 stsp const struct got_error *err = NULL;
84 09fe317a 2018-03-11 stsp char *path;
85 09fe317a 2018-03-11 stsp int fd = -1;
86 09fe317a 2018-03-11 stsp ssize_t n;
87 09fe317a 2018-03-11 stsp struct stat sb;
88 09fe317a 2018-03-11 stsp
89 09fe317a 2018-03-11 stsp *content = NULL;
90 09fe317a 2018-03-11 stsp
91 09fe317a 2018-03-11 stsp if (asprintf(&path, "%s/%s", gotpath, name) == -1) {
92 09fe317a 2018-03-11 stsp err = got_error(GOT_ERR_NO_MEM);
93 09fe317a 2018-03-11 stsp path = NULL;
94 09fe317a 2018-03-11 stsp goto done;
95 09fe317a 2018-03-11 stsp }
96 09fe317a 2018-03-11 stsp
97 ef99fdb1 2018-03-11 stsp fd = open(path, O_RDONLY | O_NOFOLLOW);
98 09fe317a 2018-03-11 stsp if (fd == -1) {
99 ef99fdb1 2018-03-11 stsp err = got_error_from_errno();
100 ef99fdb1 2018-03-11 stsp goto done;
101 ef99fdb1 2018-03-11 stsp }
102 ef99fdb1 2018-03-11 stsp if (flock(fd, LOCK_SH | LOCK_NB) == -1) {
103 73a5ef67 2018-03-11 stsp err = (errno == EWOULDBLOCK ? got_error(GOT_ERR_WORKTREE_BUSY)
104 73a5ef67 2018-03-11 stsp : got_error_from_errno());
105 09fe317a 2018-03-11 stsp goto done;
106 09fe317a 2018-03-11 stsp }
107 09fe317a 2018-03-11 stsp
108 09fe317a 2018-03-11 stsp stat(path, &sb);
109 09fe317a 2018-03-11 stsp *content = calloc(1, sb.st_size);
110 09fe317a 2018-03-11 stsp if (*content == NULL) {
111 09fe317a 2018-03-11 stsp err = got_error(GOT_ERR_NO_MEM);
112 09fe317a 2018-03-11 stsp goto done;
113 09fe317a 2018-03-11 stsp }
114 09fe317a 2018-03-11 stsp
115 09fe317a 2018-03-11 stsp n = read(fd, *content, sb.st_size);
116 09fe317a 2018-03-11 stsp if (n != sb.st_size) {
117 09fe317a 2018-03-11 stsp err = got_error_from_errno();
118 09fe317a 2018-03-11 stsp goto done;
119 09fe317a 2018-03-11 stsp }
120 09fe317a 2018-03-11 stsp if ((*content)[sb.st_size - 1] != '\n') {
121 09fe317a 2018-03-11 stsp err = got_error(GOT_ERR_WORKTREE_META);
122 09fe317a 2018-03-11 stsp goto done;
123 09fe317a 2018-03-11 stsp }
124 09fe317a 2018-03-11 stsp (*content)[sb.st_size - 1] = '\0';
125 09fe317a 2018-03-11 stsp
126 09fe317a 2018-03-11 stsp done:
127 09fe317a 2018-03-11 stsp if (fd != -1 && close(fd) == -1 && err == NULL)
128 09fe317a 2018-03-11 stsp err = got_error_from_errno();
129 09fe317a 2018-03-11 stsp free(path);
130 09fe317a 2018-03-11 stsp if (err) {
131 09fe317a 2018-03-11 stsp free(*content);
132 09fe317a 2018-03-11 stsp *content = NULL;
133 09fe317a 2018-03-11 stsp }
134 09fe317a 2018-03-11 stsp return err;
135 09fe317a 2018-03-11 stsp }
136 09fe317a 2018-03-11 stsp
137 86c3caaf 2018-03-09 stsp const struct got_error *
138 86c3caaf 2018-03-09 stsp got_worktree_init(const char *path, struct got_reference *head_ref,
139 577ec78f 2018-03-11 stsp const char *prefix, struct got_repository *repo)
140 86c3caaf 2018-03-09 stsp {
141 86c3caaf 2018-03-09 stsp const struct got_error *err = NULL;
142 86c3caaf 2018-03-09 stsp char *gotpath = NULL;
143 86c3caaf 2018-03-09 stsp char *refstr = NULL;
144 86c3caaf 2018-03-09 stsp char *path_repos = NULL;
145 1451e70d 2018-03-10 stsp char *formatstr = NULL;
146 86c3caaf 2018-03-09 stsp
147 577ec78f 2018-03-11 stsp if (!got_path_is_absolute(prefix))
148 577ec78f 2018-03-11 stsp return got_error(GOT_ERR_BAD_PATH);
149 577ec78f 2018-03-11 stsp
150 86c3caaf 2018-03-09 stsp /* Create top-level directory (may already exist). */
151 2cb4bacb 2018-03-11 stsp if (mkdir(path, GOT_DEFAULT_DIR_MODE) == -1 && errno != EEXIST) {
152 86c3caaf 2018-03-09 stsp err = got_error_from_errno();
153 86c3caaf 2018-03-09 stsp goto done;
154 86c3caaf 2018-03-09 stsp }
155 86c3caaf 2018-03-09 stsp
156 86c3caaf 2018-03-09 stsp /* Create .got directory (may already exist). */
157 2cb4bacb 2018-03-11 stsp if (asprintf(&gotpath, "%s/%s", path, GOT_WORKTREE_GOT_DIR) == -1) {
158 86c3caaf 2018-03-09 stsp err = got_error(GOT_ERR_NO_MEM);
159 86c3caaf 2018-03-09 stsp goto done;
160 86c3caaf 2018-03-09 stsp }
161 86c3caaf 2018-03-09 stsp if (mkdir(gotpath, GOT_DEFAULT_DIR_MODE) == -1 && errno != EEXIST) {
162 86c3caaf 2018-03-09 stsp err = got_error_from_errno();
163 86c3caaf 2018-03-09 stsp goto done;
164 86c3caaf 2018-03-09 stsp }
165 86c3caaf 2018-03-09 stsp
166 056e7441 2018-03-11 stsp /* Create an empty lock file. */
167 056e7441 2018-03-11 stsp err = create_meta_file(gotpath, GOT_WORKTREE_LOCK, NULL);
168 056e7441 2018-03-11 stsp if (err)
169 056e7441 2018-03-11 stsp goto done;
170 056e7441 2018-03-11 stsp
171 86c3caaf 2018-03-09 stsp /* Create an empty file index. */
172 99724ed4 2018-03-10 stsp err = create_meta_file(gotpath, GOT_WORKTREE_FILE_INDEX, NULL);
173 99724ed4 2018-03-10 stsp if (err)
174 86c3caaf 2018-03-09 stsp goto done;
175 86c3caaf 2018-03-09 stsp
176 fdf001a7 2018-03-11 stsp /* Set base commit to empty. */
177 e350ead3 2018-03-11 stsp err = create_meta_file(gotpath, GOT_WORKTREE_BASE_COMMIT, NULL);
178 e350ead3 2018-03-11 stsp if (err)
179 e350ead3 2018-03-11 stsp goto done;
180 e350ead3 2018-03-11 stsp
181 86c3caaf 2018-03-09 stsp /* Write the HEAD reference. */
182 86c3caaf 2018-03-09 stsp refstr = got_ref_to_str(head_ref);
183 86c3caaf 2018-03-09 stsp if (refstr == NULL) {
184 86c3caaf 2018-03-09 stsp err = got_error(GOT_ERR_NO_MEM);
185 86c3caaf 2018-03-09 stsp goto done;
186 86c3caaf 2018-03-09 stsp }
187 fdf001a7 2018-03-11 stsp err = create_meta_file(gotpath, GOT_WORKTREE_HEAD, refstr);
188 99724ed4 2018-03-10 stsp if (err)
189 86c3caaf 2018-03-09 stsp goto done;
190 86c3caaf 2018-03-09 stsp
191 1451e70d 2018-03-10 stsp /* Store path to repository. */
192 86c3caaf 2018-03-09 stsp path_repos = got_repo_get_path(repo);
193 86c3caaf 2018-03-09 stsp if (path_repos == NULL) {
194 86c3caaf 2018-03-09 stsp err = got_error(GOT_ERR_NO_MEM);
195 86c3caaf 2018-03-09 stsp goto done;
196 86c3caaf 2018-03-09 stsp }
197 99724ed4 2018-03-10 stsp err = create_meta_file(gotpath, GOT_WORKTREE_REPOSITORY, path_repos);
198 99724ed4 2018-03-10 stsp if (err)
199 86c3caaf 2018-03-09 stsp goto done;
200 86c3caaf 2018-03-09 stsp
201 577ec78f 2018-03-11 stsp /* Store in-repository path prefix. */
202 577ec78f 2018-03-11 stsp err = create_meta_file(gotpath, GOT_WORKTREE_PATH_PREFIX, prefix);
203 577ec78f 2018-03-11 stsp if (err)
204 577ec78f 2018-03-11 stsp goto done;
205 577ec78f 2018-03-11 stsp
206 9dce68ed 2018-03-10 stsp /* Stamp work tree with format file. */
207 1451e70d 2018-03-10 stsp if (asprintf(&formatstr, "%d", GOT_WORKTREE_FORMAT_VERSION) == -1) {
208 1451e70d 2018-03-10 stsp err = got_error(GOT_ERR_NO_MEM);
209 1451e70d 2018-03-10 stsp goto done;
210 1451e70d 2018-03-10 stsp }
211 99724ed4 2018-03-10 stsp err = create_meta_file(gotpath, GOT_WORKTREE_FORMAT, formatstr);
212 99724ed4 2018-03-10 stsp if (err)
213 1451e70d 2018-03-10 stsp goto done;
214 1451e70d 2018-03-10 stsp
215 86c3caaf 2018-03-09 stsp done:
216 86c3caaf 2018-03-09 stsp free(gotpath);
217 1451e70d 2018-03-10 stsp free(formatstr);
218 86c3caaf 2018-03-09 stsp free(refstr);
219 86c3caaf 2018-03-09 stsp free(path_repos);
220 86c3caaf 2018-03-09 stsp return err;
221 86c3caaf 2018-03-09 stsp }
222 86c3caaf 2018-03-09 stsp
223 86c3caaf 2018-03-09 stsp const struct got_error *
224 86c3caaf 2018-03-09 stsp got_worktree_open(struct got_worktree **worktree, const char *path)
225 86c3caaf 2018-03-09 stsp {
226 6d9d28c3 2018-03-11 stsp const struct got_error *err = NULL;
227 6d9d28c3 2018-03-11 stsp char *gotpath;
228 6d9d28c3 2018-03-11 stsp char *refstr = NULL;
229 6d9d28c3 2018-03-11 stsp char *path_repos = NULL;
230 6d9d28c3 2018-03-11 stsp char *formatstr = NULL;
231 056e7441 2018-03-11 stsp char *path_lock = NULL;
232 6d9d28c3 2018-03-11 stsp int version, fd = -1;
233 6d9d28c3 2018-03-11 stsp const char *errstr;
234 6d9d28c3 2018-03-11 stsp
235 6d9d28c3 2018-03-11 stsp *worktree = NULL;
236 6d9d28c3 2018-03-11 stsp
237 6d9d28c3 2018-03-11 stsp if (asprintf(&gotpath, "%s/%s", path, GOT_WORKTREE_GOT_DIR) == -1) {
238 6d9d28c3 2018-03-11 stsp err = got_error(GOT_ERR_NO_MEM);
239 6d9d28c3 2018-03-11 stsp gotpath = NULL;
240 6d9d28c3 2018-03-11 stsp goto done;
241 6d9d28c3 2018-03-11 stsp }
242 6d9d28c3 2018-03-11 stsp
243 056e7441 2018-03-11 stsp if (asprintf(&path_lock, "%s/%s", gotpath, GOT_WORKTREE_LOCK) == -1) {
244 6d9d28c3 2018-03-11 stsp err = got_error(GOT_ERR_NO_MEM);
245 056e7441 2018-03-11 stsp path_lock = NULL;
246 6d9d28c3 2018-03-11 stsp goto done;
247 6d9d28c3 2018-03-11 stsp }
248 6d9d28c3 2018-03-11 stsp
249 056e7441 2018-03-11 stsp fd = open(path_lock, O_RDWR | O_EXLOCK | O_NONBLOCK);
250 6d9d28c3 2018-03-11 stsp if (fd == -1) {
251 73a5ef67 2018-03-11 stsp err = (errno == EWOULDBLOCK ? got_error(GOT_ERR_WORKTREE_BUSY)
252 73a5ef67 2018-03-11 stsp : got_error_from_errno());
253 6d9d28c3 2018-03-11 stsp goto done;
254 6d9d28c3 2018-03-11 stsp }
255 6d9d28c3 2018-03-11 stsp
256 6d9d28c3 2018-03-11 stsp err = read_meta_file(&formatstr, gotpath, GOT_WORKTREE_FORMAT);
257 6d9d28c3 2018-03-11 stsp if (err)
258 6d9d28c3 2018-03-11 stsp goto done;
259 6d9d28c3 2018-03-11 stsp
260 6d9d28c3 2018-03-11 stsp version = strtonum(formatstr, 1, INT_MAX, &errstr);
261 6d9d28c3 2018-03-11 stsp if (errstr) {
262 6d9d28c3 2018-03-11 stsp err = got_error(GOT_ERR_WORKTREE_META);
263 6d9d28c3 2018-03-11 stsp goto done;
264 6d9d28c3 2018-03-11 stsp }
265 6d9d28c3 2018-03-11 stsp if (version != GOT_WORKTREE_FORMAT_VERSION) {
266 6d9d28c3 2018-03-11 stsp err = got_error(GOT_ERR_WORKTREE_VERS);
267 6d9d28c3 2018-03-11 stsp goto done;
268 6d9d28c3 2018-03-11 stsp }
269 6d9d28c3 2018-03-11 stsp
270 6d9d28c3 2018-03-11 stsp *worktree = calloc(1, sizeof(**worktree));
271 6d9d28c3 2018-03-11 stsp if (*worktree == NULL) {
272 6d9d28c3 2018-03-11 stsp err = got_error(GOT_ERR_NO_MEM);
273 6d9d28c3 2018-03-11 stsp goto done;
274 6d9d28c3 2018-03-11 stsp }
275 056e7441 2018-03-11 stsp (*worktree)->lockfd = -1;
276 6d9d28c3 2018-03-11 stsp
277 6d9d28c3 2018-03-11 stsp (*worktree)->path_worktree_root = strdup(path);
278 6d9d28c3 2018-03-11 stsp if ((*worktree)->path_worktree_root == NULL) {
279 6d9d28c3 2018-03-11 stsp err = got_error(GOT_ERR_NO_MEM);
280 6d9d28c3 2018-03-11 stsp goto done;
281 6d9d28c3 2018-03-11 stsp }
282 6d9d28c3 2018-03-11 stsp err = read_meta_file(&(*worktree)->path_repo, gotpath,
283 6d9d28c3 2018-03-11 stsp GOT_WORKTREE_REPOSITORY);
284 6d9d28c3 2018-03-11 stsp if (err)
285 6d9d28c3 2018-03-11 stsp goto done;
286 6d9d28c3 2018-03-11 stsp err = read_meta_file(&(*worktree)->path_prefix, gotpath,
287 6d9d28c3 2018-03-11 stsp GOT_WORKTREE_PATH_PREFIX);
288 6d9d28c3 2018-03-11 stsp goto done;
289 6d9d28c3 2018-03-11 stsp
290 6d9d28c3 2018-03-11 stsp done:
291 6d9d28c3 2018-03-11 stsp free(gotpath);
292 056e7441 2018-03-11 stsp free(path_lock);
293 6d9d28c3 2018-03-11 stsp if (err) {
294 6d9d28c3 2018-03-11 stsp if (fd != -1)
295 6d9d28c3 2018-03-11 stsp close(fd);
296 6d9d28c3 2018-03-11 stsp if (*worktree != NULL)
297 6d9d28c3 2018-03-11 stsp got_worktree_close(*worktree);
298 6d9d28c3 2018-03-11 stsp *worktree = NULL;
299 6d9d28c3 2018-03-11 stsp } else
300 056e7441 2018-03-11 stsp (*worktree)->lockfd = fd;
301 6d9d28c3 2018-03-11 stsp
302 6d9d28c3 2018-03-11 stsp return err;
303 86c3caaf 2018-03-09 stsp }
304 86c3caaf 2018-03-09 stsp
305 86c3caaf 2018-03-09 stsp void
306 86c3caaf 2018-03-09 stsp got_worktree_close(struct got_worktree *worktree)
307 86c3caaf 2018-03-09 stsp {
308 6d9d28c3 2018-03-11 stsp free(worktree->path_worktree_root);
309 6d9d28c3 2018-03-11 stsp free(worktree->path_repo);
310 6d9d28c3 2018-03-11 stsp free(worktree->path_prefix);
311 056e7441 2018-03-11 stsp if (worktree->lockfd != -1)
312 056e7441 2018-03-11 stsp close(worktree->lockfd);
313 6d9d28c3 2018-03-11 stsp free(worktree);
314 86c3caaf 2018-03-09 stsp }
315 86c3caaf 2018-03-09 stsp
316 86c3caaf 2018-03-09 stsp char *
317 86c3caaf 2018-03-09 stsp got_worktree_get_repo_path(struct got_worktree *worktree)
318 86c3caaf 2018-03-09 stsp {
319 86c3caaf 2018-03-09 stsp return strdup(worktree->path_repo);
320 86c3caaf 2018-03-09 stsp }
321 86c3caaf 2018-03-09 stsp
322 86c3caaf 2018-03-09 stsp struct got_reference *
323 86c3caaf 2018-03-09 stsp got_worktree_get_head(struct got_worktree *worktree)
324 86c3caaf 2018-03-09 stsp {
325 86c3caaf 2018-03-09 stsp return NULL;
326 86c3caaf 2018-03-09 stsp }
327 86c3caaf 2018-03-09 stsp
328 86c3caaf 2018-03-09 stsp const struct got_error *
329 4d94df2d 2018-03-11 stsp got_worktree_change_head(struct got_worktree *worktree, struct got_reference *head,
330 86c3caaf 2018-03-09 stsp struct got_repository *repo)
331 86c3caaf 2018-03-09 stsp {
332 86c3caaf 2018-03-09 stsp return NULL;
333 86c3caaf 2018-03-09 stsp }
334 86c3caaf 2018-03-09 stsp
335 86c3caaf 2018-03-09 stsp const struct got_error *
336 86c3caaf 2018-03-09 stsp got_worktree_checkout_files(struct got_worktree *worktree,
337 86c3caaf 2018-03-09 stsp struct got_repository *repo)
338 86c3caaf 2018-03-09 stsp {
339 86c3caaf 2018-03-09 stsp return NULL;
340 86c3caaf 2018-03-09 stsp }