Git-Raw
view release on metacpan or search on metacpan
deps/libgit2/deps/pcre/pcre_compile.c view on Meta::CPAN
but some compilers complain about an unreachable statement. */
}
/*************************************************
* Scan compiled regex for auto-possession *
*************************************************/
/* Replaces single character iterations with their possessive alternatives
if appropriate. This function modifies the compiled opcode!
Arguments:
code points to start of the byte code
utf TRUE in UTF-8 / UTF-16 / UTF-32 mode
cd static compile data
Returns: nothing
*/
deps/libgit2/deps/pcre/pcre_jit_compile.c view on Meta::CPAN
static BOOL detect_repeat(compiler_common *common, pcre_uchar *begin)
{
pcre_uchar *end = bracketend(begin);
pcre_uchar *next;
pcre_uchar *next_end;
pcre_uchar *max_end;
pcre_uchar type;
sljit_sw length = end - begin;
int min, max, i;
/* Detect fixed iterations first. */
if (end[-(1 + LINK_SIZE)] != OP_KET)
return FALSE;
/* Already detected repeat. */
if (common->private_data_ptrs[end - common->start - LINK_SIZE] != 0)
return TRUE;
next = end;
min = 1;
while (1)
deps/libgit2/src/libgit2/iterator.c view on Meta::CPAN
git_str path;
/* a sorted list of the entries for this frame (folder), these are
* actually pointers to the iterator's entry pool.
*/
git_vector entries;
tree_iterator_entry *current;
size_t next_idx;
/* on case insensitive iterations, we also have an array of other
* paths that were case insensitively equal to this one, and their
* tree objects. we have coalesced the tree entries into this frame.
* a child `tree_iterator_entry` will contain a pointer to its actual
* parent path.
*/
git_vector similar_trees;
git_array_t(git_str) similar_paths;
} tree_iterator_frame;
typedef struct {
deps/libgit2/src/libgit2/repository.c view on Meta::CPAN
git_str *commondir_path,
const char *start_path,
uint32_t flags,
const char *ceiling_dirs)
{
git_str path = GIT_STR_INIT;
git_str repo_link = GIT_STR_INIT;
git_str common_link = GIT_STR_INIT;
struct stat st;
dev_t initial_device = 0;
int min_iterations;
bool in_dot_git, is_valid;
size_t ceiling_offset = 0;
int error;
git_str_clear(gitdir_path);
error = git_fs_path_prettify(&path, start_path, NULL);
if (error < 0)
return error;
/* in_dot_git toggles each loop:
* /a/b/c/.git, /a/b/c, /a/b/.git, /a/b, /a/.git, /a
* With GIT_REPOSITORY_OPEN_BARE or GIT_REPOSITORY_OPEN_NO_DOTGIT, we
* assume we started with /a/b/c.git and don't append .git the first
* time through.
* min_iterations indicates the number of iterations left before going
* further counts as a search. */
if (flags & (GIT_REPOSITORY_OPEN_BARE | GIT_REPOSITORY_OPEN_NO_DOTGIT)) {
in_dot_git = true;
min_iterations = 1;
} else {
in_dot_git = false;
min_iterations = 2;
}
for (;;) {
if (!(flags & GIT_REPOSITORY_OPEN_NO_DOTGIT)) {
if (!in_dot_git) {
if ((error = git_str_joinpath(&path, path.ptr, DOT_GIT)) < 0)
goto out;
}
in_dot_git = !in_dot_git;
}
deps/libgit2/src/libgit2/repository.c view on Meta::CPAN
}
/* Move up one directory. If we're in_dot_git, we'll search the
* parent itself next. If we're !in_dot_git, we'll search .git
* in the parent directory next (added at the top of the loop). */
if ((error = git_fs_path_dirname_r(&path, path.ptr)) < 0)
goto out;
/* Once we've checked the directory (and .git if applicable),
* find the ceiling for a search. */
if (min_iterations && (--min_iterations == 0))
ceiling_offset = find_ceiling_dir_offset(path.ptr, ceiling_dirs);
/* Check if we should stop searching here. */
if (min_iterations == 0 &&
(path.ptr[ceiling_offset] == 0 || (flags & GIT_REPOSITORY_OPEN_NO_SEARCH)))
break;
}
if (workdir_path && !(flags & GIT_REPOSITORY_OPEN_BARE)) {
if (!git_str_len(gitdir_path))
git_str_clear(workdir_path);
else if ((error = git_fs_path_dirname_r(workdir_path, path.ptr)) < 0 ||
(error = git_fs_path_to_dir(workdir_path)) < 0)
goto out;
( run in 1.321 second using v1.01-cache-2.11-cpan-71847e10f99 )