git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
blob fdb253f0f04fa1ce0e99cb6255fa7b78b01dc703 1759 bytes (raw)
name: metacommit.h 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
 
#ifndef METACOMMIT_H
#define METACOMMIT_H

#include "hash.h"
#include "oid-array.h"
#include "repository.h"
#include "string-list.h"


struct change_table;

/* If specified, non-fast-forward changes are permitted. */
#define UPDATE_OPTION_FORCE     0x0001
/**
 * If specified, no attempt will be made to append to existing changes.
 * Normally, if a metacommit points to a commit in its replace or origin
 * list and an existing change points to that same commit as its content, the
 * new metacommit will attempt to append to that same change. This may replace
 * the commit parent with one or more metacommits from the head of the appended
 * changes. This option disables this behavior, and will always create a new
 * change rather than reusing existing changes.
 */
#define UPDATE_OPTION_NOAPPEND  0x0002

/* Metacommit Data */

struct metacommit_data {
	struct object_id content;
	struct oid_array replace;
	struct oid_array origin;
	int abandoned;
};

extern void init_metacommit_data(struct metacommit_data *state);

extern void clear_metacommit_data(struct metacommit_data *state);

extern int record_metacommit(struct repository *repo,
	const struct metacommit_data *metacommit,
	const char* override_change, int options, struct strbuf *err);

extern int record_metacommit_withresult(
	struct repository *repo,
	struct change_table *chtable,
	const struct metacommit_data *metacommit,
	const char *override_change,
	int options,
	struct strbuf *err,
	struct string_list *changes);

extern void modify_change(struct repository *repo,
	const struct object_id *old_commit, const struct object_id *new_commit,
	struct strbuf *err);

extern int write_metacommit(struct repository *repo, struct metacommit_data *state,
	struct object_id *result);

#endif

debug log:

solving fdb253f0f04 ...
found fdb253f0f04 in https://public-inbox.org/git/56c6770997bbdb1b3b87c2c410dd7f158b03f2d6.1663959325.git.gitgitgadget@gmail.com/

applying [1/1] https://public-inbox.org/git/56c6770997bbdb1b3b87c2c410dd7f158b03f2d6.1663959325.git.gitgitgadget@gmail.com/
diff --git a/metacommit.h b/metacommit.h
new file mode 100644
index 00000000000..fdb253f0f04

Checking patch metacommit.h...
Applied patch metacommit.h cleanly.

index at:
100644 fdb253f0f04fa1ce0e99cb6255fa7b78b01dc703	metacommit.h

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).