git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
cbddc29a9aeed1ed5cb21d5cf51fb1b898b00b19 blob 910 bytes (raw)

 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
 
#ifndef UNIQUE_PREFIX_H
#define UNIQUE_PREFIX_H

struct prefix_item {
	const char *name;
	size_t prefix_length;
};

/*
 * Find unique prefixes in a given array of strings.
 * Given a list of names, find unique prefixes (i.e. the first <n> characters
 * that uniquely identify the names) and store the lengths of the unique
 * prefixes in the 'prefix_length' field of the elements of the given array.
 *
 * Typically, the `struct prefix_item` information will be a field in the
 * actual item struct; For this reason, the `items` parameter is specified
 * as an array of pointers to the items.
 *
 * The `min_length`/`max_length` parameters define what length the unique
 * prefixes should have.
 *
 * If no unique prefix could be found for a given item, its `prefix_length`
 * will be set to 0.
 */
void find_unique_prefixes(struct prefix_item **items, size_t nr,
			  int min_length, int max_length);

#endif
debug log:

solving cbddc29a9a ...
found cbddc29a9a in https://public-inbox.org/git/20190828163419.30620-1-szeder.dev@gmail.com/

applying [1/1] https://public-inbox.org/git/20190828163419.30620-1-szeder.dev@gmail.com/
diff --git a/unique-prefix.h b/unique-prefix.h
new file mode 100644
index 0000000000..cbddc29a9a

Checking patch unique-prefix.h...
Applied patch unique-prefix.h cleanly.

index at:
100644 cbddc29a9aeed1ed5cb21d5cf51fb1b898b00b19	unique-prefix.h

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.version-control.git
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.version-control.git
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

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

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git