about summary refs log tree commit diff
path: root/third_party/git/iterator.h
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-09-21T10·03+0300
committerVincent Ambo <mail@tazj.in>2021-09-21T11·29+0300
commit43b1791ec601732ac31195df96781a848360a9ac (patch)
treedaae8d638343295d2f1f7da955e556ef4c958864 /third_party/git/iterator.h
parent2d8e7dc9d9c38127ec4ebd13aee8e8f586a43318 (diff)
chore(3p/git): Unvendor git and track patches instead r/2903
This was vendored a long time ago under the expectation that keeping
it in sync with cgit would be easier this way, but it has proven not
to be a big issue.

On the other hand, a vendored copy of git is an annoying maintenance
burden. It is much easier to rebase the single (dottime) patch that we
have.

This removes the vendored copy of git and instead passes the git
source code to cgit via `pkgs.srcOnly`, which includes the applied
patch so that cgit can continue rendering dottime.

Change-Id: If31f62dea7ce688fd1b9050204e9378019775f2b
Diffstat (limited to 'third_party/git/iterator.h')
-rw-r--r--third_party/git/iterator.h81
1 files changed, 0 insertions, 81 deletions
diff --git a/third_party/git/iterator.h b/third_party/git/iterator.h
deleted file mode 100644
index 0f6900e43ad6..000000000000
--- a/third_party/git/iterator.h
+++ /dev/null
@@ -1,81 +0,0 @@
-#ifndef ITERATOR_H
-#define ITERATOR_H
-
-/*
- * Generic constants related to iterators.
- */
-
-/*
- * The attempt to advance the iterator was successful; the iterator
- * reflects the new current entry.
- */
-#define ITER_OK 0
-
-/*
- * The iterator is exhausted and has been freed.
- */
-#define ITER_DONE -1
-
-/*
- * The iterator experienced an error. The iteration has been aborted
- * and the iterator has been freed.
- */
-#define ITER_ERROR -2
-
-/*
- * Return values for selector functions for merge iterators. The
- * numerical values of these constants are important and must be
- * compatible with ITER_DONE and ITER_ERROR.
- */
-enum iterator_selection {
-	/* End the iteration without an error: */
-	ITER_SELECT_DONE = ITER_DONE,
-
-	/* Report an error and abort the iteration: */
-	ITER_SELECT_ERROR = ITER_ERROR,
-
-	/*
-	 * The next group of constants are masks that are useful
-	 * mainly internally.
-	 */
-
-	/* The LSB selects whether iter0/iter1 is the "current" iterator: */
-	ITER_CURRENT_SELECTION_MASK = 0x01,
-
-	/* iter0 is the "current" iterator this round: */
-	ITER_CURRENT_SELECTION_0 = 0x00,
-
-	/* iter1 is the "current" iterator this round: */
-	ITER_CURRENT_SELECTION_1 = 0x01,
-
-	/* Yield the value from the current iterator? */
-	ITER_YIELD_CURRENT = 0x02,
-
-	/* Discard the value from the secondary iterator? */
-	ITER_SKIP_SECONDARY = 0x04,
-
-	/*
-	 * The constants that a selector function should usually
-	 * return.
-	 */
-
-	/* Yield the value from iter0: */
-	ITER_SELECT_0 = ITER_CURRENT_SELECTION_0 | ITER_YIELD_CURRENT,
-
-	/* Yield the value from iter0 and discard the one from iter1: */
-	ITER_SELECT_0_SKIP_1 = ITER_SELECT_0 | ITER_SKIP_SECONDARY,
-
-	/* Discard the value from iter0 without yielding anything this round: */
-	ITER_SKIP_0 = ITER_CURRENT_SELECTION_1 | ITER_SKIP_SECONDARY,
-
-	/* Yield the value from iter1: */
-	ITER_SELECT_1 = ITER_CURRENT_SELECTION_1 | ITER_YIELD_CURRENT,
-
-	/* Yield the value from iter1 and discard the one from iter0: */
-	ITER_SELECT_1_SKIP_0 = ITER_SELECT_1 | ITER_SKIP_SECONDARY,
-
-	/* Discard the value from iter1 without yielding anything this round: */
-	ITER_SKIP_1 = ITER_CURRENT_SELECTION_0 | ITER_SKIP_SECONDARY
-};
-
-#endif /* ITERATOR_H */