Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/smanonr..../opt/imh-pyth.../include/git2
File: ignore.h
/*
[0] Fix | Delete
* Copyright (C) the libgit2 contributors. All rights reserved.
[1] Fix | Delete
*
[2] Fix | Delete
* This file is part of libgit2, distributed under the GNU GPL v2 with
[3] Fix | Delete
* a Linking Exception. For full terms see the included COPYING file.
[4] Fix | Delete
*/
[5] Fix | Delete
#ifndef INCLUDE_git_ignore_h__
[6] Fix | Delete
#define INCLUDE_git_ignore_h__
[7] Fix | Delete
[8] Fix | Delete
#include "common.h"
[9] Fix | Delete
#include "types.h"
[10] Fix | Delete
[11] Fix | Delete
GIT_BEGIN_DECL
[12] Fix | Delete
[13] Fix | Delete
/**
[14] Fix | Delete
* Add ignore rules for a repository.
[15] Fix | Delete
*
[16] Fix | Delete
* Excludesfile rules (i.e. .gitignore rules) are generally read from
[17] Fix | Delete
* .gitignore files in the repository tree or from a shared system file
[18] Fix | Delete
* only if a "core.excludesfile" config value is set. The library also
[19] Fix | Delete
* keeps a set of per-repository internal ignores that can be configured
[20] Fix | Delete
* in-memory and will not persist. This function allows you to add to
[21] Fix | Delete
* that internal rules list.
[22] Fix | Delete
*
[23] Fix | Delete
* Example usage:
[24] Fix | Delete
*
[25] Fix | Delete
* error = git_ignore_add_rule(myrepo, "*.c\ndir/\nFile with space\n");
[26] Fix | Delete
*
[27] Fix | Delete
* This would add three rules to the ignores.
[28] Fix | Delete
*
[29] Fix | Delete
* @param repo The repository to add ignore rules to.
[30] Fix | Delete
* @param rules Text of rules, a la the contents of a .gitignore file.
[31] Fix | Delete
* It is okay to have multiple rules in the text; if so,
[32] Fix | Delete
* each rule should be terminated with a newline.
[33] Fix | Delete
* @return 0 on success
[34] Fix | Delete
*/
[35] Fix | Delete
GIT_EXTERN(int) git_ignore_add_rule(
[36] Fix | Delete
git_repository *repo,
[37] Fix | Delete
const char *rules);
[38] Fix | Delete
[39] Fix | Delete
/**
[40] Fix | Delete
* Clear ignore rules that were explicitly added.
[41] Fix | Delete
*
[42] Fix | Delete
* Resets to the default internal ignore rules. This will not turn off
[43] Fix | Delete
* rules in .gitignore files that actually exist in the filesystem.
[44] Fix | Delete
*
[45] Fix | Delete
* The default internal ignores ignore ".", ".." and ".git" entries.
[46] Fix | Delete
*
[47] Fix | Delete
* @param repo The repository to remove ignore rules from.
[48] Fix | Delete
* @return 0 on success
[49] Fix | Delete
*/
[50] Fix | Delete
GIT_EXTERN(int) git_ignore_clear_internal_rules(
[51] Fix | Delete
git_repository *repo);
[52] Fix | Delete
[53] Fix | Delete
/**
[54] Fix | Delete
* Test if the ignore rules apply to a given path.
[55] Fix | Delete
*
[56] Fix | Delete
* This function checks the ignore rules to see if they would apply to the
[57] Fix | Delete
* given file. This indicates if the file would be ignored regardless of
[58] Fix | Delete
* whether the file is already in the index or committed to the repository.
[59] Fix | Delete
*
[60] Fix | Delete
* One way to think of this is if you were to do "git check-ignore --no-index"
[61] Fix | Delete
* on the given file, would it be shown or not?
[62] Fix | Delete
*
[63] Fix | Delete
* @param ignored boolean returning 0 if the file is not ignored, 1 if it is
[64] Fix | Delete
* @param repo a repository object
[65] Fix | Delete
* @param path the file to check ignores for, relative to the repo's workdir.
[66] Fix | Delete
* @return 0 if ignore rules could be processed for the file (regardless
[67] Fix | Delete
* of whether it exists or not), or an error < 0 if they could not.
[68] Fix | Delete
*/
[69] Fix | Delete
GIT_EXTERN(int) git_ignore_path_is_ignored(
[70] Fix | Delete
int *ignored,
[71] Fix | Delete
git_repository *repo,
[72] Fix | Delete
const char *path);
[73] Fix | Delete
[74] Fix | Delete
GIT_END_DECL
[75] Fix | Delete
[76] Fix | Delete
#endif
[77] Fix | Delete
[78] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function