- 11 1月, 2013 1 次提交
-
-
由 René Scharfe 提交于
Brace expansion is a shell feature that's not required by POSIX and not supported by dash nor NetBSD's sh. Explicitly list all combinations instead. Also avoid calling touch by creating the test files with a redirection instead, as suggested by Junio. Signed-off-by: NRene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 07 1月, 2013 11 次提交
-
-
由 Adam Spiers 提交于
This works in a similar manner to git-check-attr. Thanks to Jeff King and Junio C Hamano for the idea: http://thread.gmane.org/gmane.comp.version-control.git/108671/focus=108815Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Adam Spiers 提交于
Since we have just created a new pathspec-handling library, now is a good time to add some comments explaining get_pathspec(). Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Adam Spiers 提交于
This will be reused by a new git check-ignore command. Also document validate_pathspec(). Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Adam Spiers 提交于
Extract the body of the for loop in treat_gitlinks() into a separate check_path_for_gitlink() function so that it can be reused elsewhere. This paves the way for a new check-ignore sub-command. Also document treat_gitlinks(). Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Adam Spiers 提交于
Perform the following function renames to make it explicit that these pathspec handling functions are for matching against the index, rather than against a tree or the working directory. - fill_pathspec_matches() -> add_pathspec_matches_against_index() - find_used_pathspec() -> find_pathspecs_matching_against_index() Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Adam Spiers 提交于
Extract the following functions from builtin/add.c to pathspec.c, in preparation for reuse by a new git check-ignore command: - fill_pathspec_matches() - find_used_pathspec() The functions being extracted are not changed in any way, except removal of the 'static' qualifier. Also add comments documenting these newly public functions, including clarifications that they operate on the index. Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Adam Spiers 提交于
The 'argc' argument passed to validate_pathspec() was never used. Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Adam Spiers 提交于
Fix a grammatical issue in the description of these functions, and make it more obvious how and why seen[] can be reused across multiple invocations. Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Adam Spiers 提交于
By the end of a directory traversal, a dir_struct instance will typically contains pointers to various data structures on the heap. clear_directory() provides a convenient way to reclaim that memory. Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Adam Spiers 提交于
For exclude patterns read in from files, the filename is stored in the exclude list, and the originating line number is stored in the individual exclude (counting starting at 1). For exclude patterns provided on the command line, a string describing the source of the patterns is stored in the exclude list, and the sequence number assigned to each exclude pattern is negative, with counting starting at -1. So for example the 2nd pattern provided via --exclude would be numbered -2. This allows any future consumers of that data to easily distinguish between exclude patterns from files vs. from the CLI. Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Adam Spiers 提交于
Previously each exclude_list could potentially contain patterns from multiple sources. For example dir->exclude_list[EXC_FILE] would typically contain patterns from .git/info/exclude and core.excludesfile, and dir->exclude_list[EXC_DIRS] could contain patterns from multiple per-directory .gitignore files during directory traversal (i.e. when dir->exclude_stack was more than one item deep). We split these composite exclude_lists up into three groups of exclude_lists (EXC_CMDL / EXC_DIRS / EXC_FILE as before), so that each exclude_list now contains patterns from a single source. This will allow us to cleanly track the origin of each pattern simply by adding a src field to struct exclude_list, rather than to struct exclude, which would make memory management of the source string tricky in the EXC_DIRS case where its contents are dynamically generated. Similarly, by moving the filebuf member from struct exclude_stack to struct exclude_list, it allows us to track and subsequently free memory buffers allocated during the parsing of all exclude files, rather than only tracking buffers allocated for files in the EXC_DIRS group. Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 29 12月, 2012 10 次提交
-
-
由 Adam Spiers 提交于
It is clearer to use a 'clear_' prefix for functions which empty and deallocate the contents of a data structure without freeing the structure itself, and a 'free_' prefix for functions which also free the structure itself. http://article.gmane.org/gmane.comp.version-control.git/206128Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Adam Spiers 提交于
In a similar way to the previous commit, this extracts a new helper function last_exclude_matching_path() which return the last exclude_list element which matched, or NULL if no match was found. is_path_excluded() becomes a wrapper around this, and just returns 0 or 1 depending on whether any matching exclude_list element was found. This allows callers to find out _why_ a given path was excluded, rather than just whether it was or not, paving the way for a new git sub-command which allows users to test their exclude lists from the command line. Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Adam Spiers 提交于
In a similar way to the previous commit, this extracts a new helper function last_exclude_matching() which returns the last exclude_list element which matched, or NULL if no match was found. is_excluded() becomes a wrapper around this, and just returns 0 or 1 depending on whether any matching exclude_list element was found. This allows callers to find out _why_ a given path was excluded, rather than just whether it was or not, paving the way for a new git sub-command which allows users to test their exclude lists from the command line. Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Adam Spiers 提交于
The excluded function uses a new helper function called last_exclude_matching_from_list() to perform the inner loop over all of the exclude patterns. The helper just tells us whether the path is included, excluded, or undecided. However, it may be useful to know _which_ pattern was triggered. So let's pass out the entire exclude match, which contains the status information we were already passing out. Further patches can make use of this. This is a modified forward port of a patch from 2009 by Jeff King: http://article.gmane.org/gmane.comp.version-control.git/108815Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Adam Spiers 提交于
Continue adopting clearer names for exclude functions. This is_* naming pattern for functions returning booleans was discussed here: http://thread.gmane.org/gmane.comp.version-control.git/204661/focus=204924Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Adam Spiers 提交于
Continue adopting clearer names for exclude functions. This 'is_*' naming pattern for functions returning booleans was discussed here: http://thread.gmane.org/gmane.comp.version-control.git/204661/focus=204924 Also adjust their callers as necessary. Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Adam Spiers 提交于
Start adopting clearer names for exclude functions. This 'is_*' naming pattern for functions returning booleans was agreed here: http://thread.gmane.org/gmane.comp.version-control.git/204661/focus=204924Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Adam Spiers 提交于
'el' is only *slightly* less cryptic, but is already used as the variable name for a struct exclude_list pointer in numerous other places, so this reduces the number of cryptic variable names in use by one :-) Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Adam Spiers 提交于
traversal API has a few potentially confusing properties. These comments clarify a few key aspects and will hopefully make it easier to understand for other newcomers in the future. Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Adam Spiers 提交于
7c4c97c0 turned the flags in struct dir_struct into a single bitfield variable, but forgot to update this document. Signed-off-by: NAdam Spiers <git@adamspiers.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 16 10月, 2012 6 次提交
-
-
由 Nguyễn Thái Ngọc Duy 提交于
.gitattributes and .gitignore share the same pattern syntax but has separate matching implementation. Over the years, ignore's implementation accumulates more optimizations while attr's stays the same. This patch reuses the core matching functions that are also used by excluded_from_list. excluded_from_list and path_matches can't be merged due to differences in exclude and attr, for example: * "!pattern" syntax is forbidden in .gitattributes. As an attribute can be unset (i.e. set to a special value "false") or made back to unspecified (i.e. not even set to "false"), "!pattern attr" is unclear which one it means. * we support attaching attributes to directories, but git-core internally does not currently make use of attributes on directories. Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Nguyễn Thái Ngọc Duy 提交于
This function can later be reused by attr.c. Also turn to_exclude field into a flag. Signed-off-by: NJunio C Hamano <gitster@pobox.com> Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Nguyễn Thái Ngọc Duy 提交于
Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Nguyễn Thái Ngọc Duy 提交于
When "namelen" becomes zero at this stage, we have matched the fixed part, but whether it actually matches the pattern still depends on the pattern in "exclude". As demonstrated in t3001, path "three/a.3" exists and it matches the "three/a.3" part in pattern "three/a.3[abc]", but that does not mean a true match. Don't be too optimistic and let fnmatch() do the job. Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Nguyễn Thái Ngọc Duy 提交于
Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Nguyễn Thái Ngọc Duy 提交于
This block of code deals with the "basename" part only, which has the length of "pathlen - (basename - pathname)". Stricten the length check and remove "pathname" from the main expression to avoid confusion. Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 06 10月, 2012 3 次提交
-
-
由 Junio C Hamano 提交于
* commit 'f9f6e2ce': exclude: do strcmp as much as possible before fnmatch dir.c: get rid of the wildcard symbol set in no_wildcard() Unindent excluded_from_list()
-
由 Nguyễn Thái Ngọc Duy 提交于
Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Nguyễn Thái Ngọc Duy 提交于
Signed-off-by: NNguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 15 9月, 2012 6 次提交
-
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
* jk/maint-quiet-is-synonym-to-s-in-log: log: fix --quiet synonym for -s
-
由 Junio C Hamano 提交于
* jc/maint-ident-missing-human-name: split_ident_line(): make best effort when parsing author/committer line
-
由 Junio C Hamano 提交于
* rj/test-regex: test-regex: Add a test to check for a bug in the regex routines
-
由 Junio C Hamano 提交于
* da/gitk-reload-tag-contents: gitk: Rename 'tagcontents' to 'cached_tagcontent' gitk: Teach "Reread references" to reload tags gitk: Avoid Meta1-F5
-
由 Junio C Hamano 提交于
* jc/maint-checkout-fileglob-doc: gitcli: contrast wildcard given to shell and to git gitcli: formatting fix Document file-glob for "git checkout -- '*.c'"
-
- 13 9月, 2012 3 次提交
-
-
由 Junio C Hamano 提交于
"git apply -p0" did not parse pathnames on "diff --git" line correctly. This caused patches that had pathnames in no other places to be mistakenly rejected (most notably, binary patch that does not rename nor change mode). Textual patches, renames or mode changes have preimage and postimage pathnames in different places in a form that can be parsed unambiguously and did not suffer from this problem. * jc/apply-binary-p0: apply: compute patch->def_name correctly under -p0
-
由 Junio C Hamano 提交于
"git log .." errored out saying it is both rev range and a path when there is no disambiguating "--" is on the command line. Update the command line parser to interpret ".." as a path in such a case. * jc/dotdot-is-parent-directory: specifying ranges: we did not mean to make ".." an empty set
-
由 Junio C Hamano 提交于
The synopsis said "checkout [-B branch]" to make it clear the branch name is a parameter to the option, but the heading for the option description was "-B::", not "-B branch::", making the documentation misleading. * jc/maint-doc-checkout-b-always-takes-branch-name: doc: "git checkout -b/-B/--orphan" always takes a branch name
-