about summary refs log tree commit diff
path: root/third_party/git/line-range.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/line-range.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/line-range.h')
-rw-r--r--third_party/git/line-range.h41
1 files changed, 0 insertions, 41 deletions
diff --git a/third_party/git/line-range.h b/third_party/git/line-range.h
deleted file mode 100644
index e69bf7c01765..000000000000
--- a/third_party/git/line-range.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef LINE_RANGE_H
-#define LINE_RANGE_H
-
-struct index_state;
-
-/*
- * Parse one item in an -L begin,end option w.r.t. the notional file
- * object 'cb_data' consisting of 'lines' lines.
- *
- * The 'nth_line_cb' callback is used to determine the start of the
- * line 'lno' inside the 'cb_data'.  The caller is expected to already
- * have a suitable map at hand to make this a constant-time lookup.
- *
- * 'anchor' is the 1-based line at which relative range specifications
- * should be anchored. Absolute ranges are unaffected by this value.
- *
- * Returns 0 in case of success and -1 if there was an error.  The
- * actual range is stored in *begin and *end.  The counting starts
- * at 1!  In case of error, the caller should show usage message.
- */
-
-typedef const char *(*nth_line_fn_t)(void *data, long lno);
-
-int parse_range_arg(const char *arg,
-		    nth_line_fn_t nth_line_cb,
-		    void *cb_data, long lines, long anchor,
-		    long *begin, long *end,
-		    const char *path, struct index_state *istate);
-
-/*
- * Scan past a range argument that could be parsed by
- * 'parse_range_arg', to help the caller determine the start of the
- * filename in '-L n,m:file' syntax.
- *
- * Returns a pointer to the first character after the 'n,m' part, or
- * NULL in case the argument is obviously malformed.
- */
-
-const char *skip_range_arg(const char *arg, struct index_state *istate);
-
-#endif /* LINE_RANGE_H */