Blame


1 8505ab66 2023-07-10 thomas /*
2 8505ab66 2023-07-10 thomas * Copyright (c) 2018, 2019, 2020 Stefan Sperling <stsp@openbsd.org>
3 8505ab66 2023-07-10 thomas * Copyright (c) 2023 Josh Rickmar <jrick@zettaport.com>
4 8505ab66 2023-07-10 thomas *
5 8505ab66 2023-07-10 thomas * Permission to use, copy, modify, and distribute this software for any
6 8505ab66 2023-07-10 thomas * purpose with or without fee is hereby granted, provided that the above
7 8505ab66 2023-07-10 thomas * copyright notice and this permission notice appear in all copies.
8 8505ab66 2023-07-10 thomas *
9 8505ab66 2023-07-10 thomas * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 8505ab66 2023-07-10 thomas * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 8505ab66 2023-07-10 thomas * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 8505ab66 2023-07-10 thomas * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 8505ab66 2023-07-10 thomas * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 8505ab66 2023-07-10 thomas * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 8505ab66 2023-07-10 thomas * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 8505ab66 2023-07-10 thomas */
17 8505ab66 2023-07-10 thomas
18 8505ab66 2023-07-10 thomas /*
19 8505ab66 2023-07-10 thomas * Create a new commit from changes in the work tree.
20 8505ab66 2023-07-10 thomas * Return the ID of the newly created commit.
21 8505ab66 2023-07-10 thomas * The worktree's base commit will be set to this new commit.
22 8505ab66 2023-07-10 thomas * Files unaffected by this commit operation will retain their
23 8505ab66 2023-07-10 thomas * current base commit.
24 8505ab66 2023-07-10 thomas * An author and a non-empty log message must be specified.
25 8505ab66 2023-07-10 thomas * The name of the committer is optional (may be NULL).
26 8505ab66 2023-07-10 thomas * If a path to be committed contains a symlink which points outside
27 8505ab66 2023-07-10 thomas * of the path space under version control, raise an error unless
28 8505ab66 2023-07-10 thomas * committing of such paths is being forced by the caller.
29 8505ab66 2023-07-10 thomas */
30 8505ab66 2023-07-10 thomas const struct got_error *got_worktree_cvg_commit(struct got_object_id **,
31 8505ab66 2023-07-10 thomas struct got_worktree *, struct got_pathlist_head *, const char *,
32 8505ab66 2023-07-10 thomas const char *, int, int, int, got_worktree_commit_msg_cb, void *,
33 8505ab66 2023-07-10 thomas got_worktree_status_cb, void *, const char *, const char *, const char *,
34 8505ab66 2023-07-10 thomas const char *, int, const struct got_remote_repo *, got_cancel_cb,
35 8505ab66 2023-07-10 thomas struct got_repository *);
36 8505ab66 2023-07-10 thomas
37 8505ab66 2023-07-10 thomas /*
38 8505ab66 2023-07-10 thomas * Get the reference name for a temporary commit to be trivially rebased
39 8505ab66 2023-07-10 thomas * over a remote branch.
40 8505ab66 2023-07-10 thomas */
41 8505ab66 2023-07-10 thomas const struct got_error *got_worktree_cvg_get_commit_ref_name(char **,
42 8505ab66 2023-07-10 thomas struct got_worktree *);