git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
296ca0286fcfc207322e83ea257251732f9ae8a2 blob 1339 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
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
59
60
61
62
63
64
65
66
67
 
#include "cache.h"
#include "commit.h"
#include "revision.h"

static void start(struct timespec *start)
{
	clock_gettime(CLOCK_MONOTONIC, start);
}

static void print_duration(struct timespec *start)
{
	struct timespec end;
	uint64_t d;
	clock_gettime(CLOCK_MONOTONIC, &end);
	d = end.tv_sec - start->tv_sec;
	d *= 1000000000;
	d += end.tv_nsec - start->tv_nsec;
	printf("%lu", d);
}

int cmd_main(int argc, const char **argv)
{
	struct rev_info revs;
	struct object_id oid;
	struct commit *commit;
	struct timespec ts;

	setup_git_directory();

	if (get_oid("HEAD", &oid))
		die("No HEAD?");
	commit = lookup_commit(&oid);
	if (!commit)
		die("HEAD is not a committish?");

	init_revisions(&revs, NULL);
	add_pending_object(&revs, &commit->object, "HEAD");
	if (prepare_revision_walk(&revs))
		die("revision walk setup failed");
	while (get_revision(&revs))
		; /* nothing */

	if (argc != 2)
		return 0;

	if (!strcmp(argv[1], "clear_commit_marks")) {
		start(&ts);
		clear_commit_marks(commit, ALL_REV_FLAGS);
		print_duration(&ts);
	}

	if (!strcmp(argv[1], "clear_commit_marks_all")) {
		start(&ts);
		clear_commit_marks_all(ALL_REV_FLAGS);
		print_duration(&ts);
	}

	if (!strcmp(argv[1], "clear_object_flags")) {
		start(&ts);
		clear_object_flags(ALL_REV_FLAGS);
		print_duration(&ts);
	}

	printf(" %s\n", argv[1]);

	return 0;
}
debug log:

solving 296ca0286f ...
found 296ca0286f in https://public-inbox.org/git/a0ca86b8-e258-2588-1c99-a30e8e60fdbd@web.de/

applying [1/1] https://public-inbox.org/git/a0ca86b8-e258-2588-1c99-a30e8e60fdbd@web.de/
diff --git a/t/helper/test-clear-commit-marks.c b/t/helper/test-clear-commit-marks.c
new file mode 100644
index 0000000000..296ca0286f

Checking patch t/helper/test-clear-commit-marks.c...
Applied patch t/helper/test-clear-commit-marks.c cleanly.

index at:
100644 296ca0286fcfc207322e83ea257251732f9ae8a2	t/helper/test-clear-commit-marks.c

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