Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-07-28Merge branch 'jc/gitignore-doc-pattern-markup'Junio C Hamano
Doc mark-up update. * jc/gitignore-doc-pattern-markup: gitignore.txt: mark up explanation of patterns consistently
2023-07-18gitignore.txt: mark up explanation of patterns consistentlyJunio C Hamano
In the "PATTERN FORMAT" section, all the other pattern elements are shown as `monospace` literals inside "double quoted" strings. Do the same for the explanation of a slash to make it consistent. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-07-18gitignore.txt: use backticks instead of double quotesJohan Ruokangas
Among four examples, only this one used "double quoted" sample patterns, but all others marked up the patterns in `monospace`. Signed-off-by: Johan Ruokangas <johan@latehours.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-05-04docs: clarify git rm --cached function in gitignore noteSohom Datta
Explain to users that the step to untrack a file will not also prevent them from getting added in the future. Signed-off-by: Sohom Datta <sohom.datta@learner.manipal.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-10-25gitignore.txt: change "folder" to "directory"Martin Ågren
We prefer "directory" over "folder" when discussing the file system concept. Change this instance for consistency -- indeed, even within this paragraph, we already use "directory". Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-07-07docs: .gitignore parsing is to the top of the repoAndrew Berry
The current documentation reads as if .gitignore files will be parsed in every parent directory, and not until they reach a repository boundary. This clarifies the current behaviour. As well, this corrects 'toplevel' to 'top-level', matching usage for 'top-level domain'. Signed-off-by: Andrew Berry <andrew@furrypaws.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-05-04docs: document symlink restrictions for dot-filesJeff King
We stopped allowing symlinks for .gitmodules files in 10ecfa7649 (verify_path: disallow symlinks in .gitmodules, 2018-05-04), and we stopped following symlinks for .gitattributes, .gitignore, and .mailmap in the commits from 204333b015 (Merge branch 'jk/open-dotgitx-with-nofollow', 2021-03-22). The reasons are discussed in detail there, but we never adjusted the documentation to let users know. This hasn't been a big deal since the point is that such setups were mildly broken and thought to be unusual anyway. But it certainly doesn't hurt to be clear and explicit about it. Suggested-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-04doc: .gitignore documentation typofixJulien Richard
Signed-off-by: Julien Richard <julien.richard@ubisoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-21Merge branch 'an/ignore-doc-update'Junio C Hamano
The description about slashes in gitignore patterns (used to indicate things like "anchored to this level only" and "only matches directories") has been revamped. * an/ignore-doc-update: gitignore.txt: make slash-rules more readable
2019-06-05gitignore.txt: make slash-rules more readableDr. Adam Nielsen
Renew paragraphs relevant for pattern with slash. Aim to make it more clear and to avoid possible pitfalls for the reader. Add some examples. Signed-off-by: Dr. Adam Nielsen <admin@in-ici.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-08docs: move core.excludesFile from git-add to gitignoreDenton Liu
A section in "git add" documentation mentions core.excludesFile and explains how it works, but this is not specific to the command. Move this description to gitignore.txt to be more generic. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-11-13Merge branch 'nd/wildmatch-double-asterisk'Junio C Hamano
A pattern with '**' that does not have a slash on either side used to be an invalid one, but the code now treats such double-asterisks the same way as two normal asterisks that happen to be adjacent to each other. * nd/wildmatch-double-asterisk: wildmatch: change behavior of "foo**bar" in WM_PATHNAME mode
2018-10-29wildmatch: change behavior of "foo**bar" in WM_PATHNAME modeNguyễn Thái Ngọc Duy
In WM_PATHNAME mode (or FNM_PATHNAME), '*' does not match '/' and '**' can but only in three patterns: - '**/' matches zero or more leading directories - '/**/' matches zero or more directories in between - '/**' matches zero or more trailing directories/files When '**' is present but not in one of these patterns, the current behavior is consider the pattern invalid and stop matching. In other words, 'foo**bar' never matches anything, whatever you throw at it. This behavior is arguably a bit confusing partly because we can't really tell the user their pattern is invalid so that they can fix it. So instead, tolerate it and make '**' act like two regular '*'s (which is essentially the same as a single asterisk). This behavior seems more predictable. Noticed-by: dana <dana@dana.is> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-06-27gitignore.txt: clarify default core.excludesfile pathTodd Zullinger
The default core.excludesfile path is $XDG_CONFIG_HOME/git/ignore. $HOME/.config/git/ignore is used if XDG_CONFIG_HOME is empty or unset, as described later in the document. Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-02gitignore.txt: elaborate shell glob syntaxDuy Nguyen
`fnmatch(3)` is a great mention if the intended audience is programmers. For normal users it's probably better to spell out what a shell glob is. This paragraph is updated to roughly tell (or remind) what the main wildcards are supposed to do. All the details are still hidden away behind the `fnmatch(3)` wall because bringing the whole specification here may be too much. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-08doc: change configuration variables formatTom Russello
This change configuration variables that where in italic style to monospace font according to the guideline. It was obtained with grep '[[:alpha:]]*\.[[:alpha:]]*::$' config.txt | \ sed -e 's/::$//' -e 's/\./\\\\./' | \ xargs -iP perl -pi -e "s/\'P\'/\`P\`/g" ./*.txt Signed-off-by: Tom Russello <tom.russello@grenoble-inp.org> Signed-off-by: Erwan Mathoniere <erwan.mathoniere@grenoble-inp.org> Signed-off-by: Samuel Groot <samuel.groot@grenoble-inp.org> Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-18Revert "Merge branch 'nd/exclusion-regression-fix'"Junio C Hamano
This reverts commit 5e57f9c3dfe7dd44a1b56bb5b3327d7a1356ec7c, reversing changes made to e79112d21024beb997951381db21a70b087d459d. We will be postponing nd/exclusion-regression-fix topic to later cycle.
2016-03-18Revert "Merge branch 'jc/exclusion-doc'"Junio C Hamano
This reverts commit e80aae51f2be908e37fca47ea0dff6d7861c8497, reversing changes made to 68846a92eafa6b2bfae778d0a656443a9fa61e59. We will be postponing nd/exclusion-regression-fix topic to later cycle.
2016-03-08gitignore: document that unignoring a directory unignores everything in itJunio C Hamano
Also document another limitation coming from a bug in handling the basename match with a directory for 're-inclusion'. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-02-16dir.c: don't exclude whole dir prematurelyNguyễn Thái Ngọc Duy
If there is a pattern "!foo/bar", this patch makes it not exclude "foo" right away. This gives us a chance to examine "foo" and re-include "foo/bar". Helped-by: brian m. carlson <sandals@crustytoothpaste.net> Helped-by: Micha Wiedenmann <mw-u2@gmx.de> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-01-20Merge branch 'nd/exclusion-regression-fix'Junio C Hamano
The ignore mechanism saw a few regressions around untracked file listing and sparse checkout selection areas in 2.7.0; the change that is responsible for the regression has been reverted. * nd/exclusion-regression-fix: Revert "dir.c: don't exclude whole dir prematurely if neg pattern may match"
2016-01-08Revert "dir.c: don't exclude whole dir prematurely if neg pattern may match"Nguyễn Thái Ngọc Duy
This reverts commit 57534ee77d22e725d971ee89c77dc6aad61c573f. The feature added in that commit requires that patterns behave the same way from anywhere. But some patterns can behave differently depending on current "working" directory. The conditions to catch and avoid these patterns are too loose. The untracked listing[1] and sparse-checkout selection[2] can become incorrect as a result. [1] http://article.gmane.org/gmane.comp.version-control.git/283520 [2] http://article.gmane.org/gmane.comp.version-control.git/283532 Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-10-07Merge branch 'nd/ignore-then-not-ignore'Junio C Hamano
Allow a later "!/abc/def" to override an earlier "/abc" that appears in the same .gitignore file to make it easier to express "everything in /abc directory is ignored, except for ...". * nd/ignore-then-not-ignore: dir.c: don't exclude whole dir prematurely if neg pattern may match dir.c: make last_exclude_matching_from_list() run til the end
2015-09-21dir.c: don't exclude whole dir prematurely if neg pattern may matchNguyễn Thái Ngọc Duy
If there is a pattern "!foo/bar", this patch makes it not exclude "foo" right away. This gives us a chance to examine "foo" and re-include "foo/bar". In order for it to detect that the directory under examination should not be excluded right away, in other words it is a parent directory of a negative pattern, the "directory path" of the negative pattern must be literal. Patterns like "!f?o/bar" can't stop "foo" from being excluded. Basename matching (i.e. "no slashes in the pattern") or must-be-dir matching (i.e. "trailing slash in the pattern") does not work well with this. For example, if we descend in "foo" and are examining "foo/abc", current code for "foo/" pattern will check if path "foo/abc", not "foo", is a directory. The same problem with basename matching. These may need big code reorg to make it work. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-14*config.txt: stick to camelCase naming conventionNguyễn Thái Ngọc Duy
This should improve readability. Compare "thislongname" and "thisLongName". The following keys are left in unchanged. We can decide what to do with them later. - am.keepcr - core.autocrlf .safecrlf .trustctime - diff.dirstat .noprefix - gitcvs.usecrlfattr - gui.blamehistoryctx .trustmtime - pull.twohead - receive.autogc - sendemail.signedoffbycc .smtpsslcertpath .suppresscc Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-12-22Merge branch 'po/doc-assume-unchanged'Junio C Hamano
Fixes long-standing misunderstanding of what assume-unchanged is about. Some text near what is removed by the bottom patch may also have to be removed. * po/doc-assume-unchanged: gitignore.txt: do not suggest assume-unchanged doc: make clear --assume-unchanged's user contract
2014-12-10gitignore.txt: do not suggest assume-unchangedMichael J Gruber
git-update-index --assume-unchanged was never meant to ignore changes to tracked files (only to spare some stats). So do not suggest it as a means to achieve that. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-11-06Merge branch 'nd/gitignore-trailing-whitespace'Junio C Hamano
Documentation update. * nd/gitignore-trailing-whitespace: gitignore.txt: fix spelling of "backslash"
2014-11-05gitignore.txt: fix spelling of "backslash"Ben North
Signed-off-by: Ben North <ben@redfrontdoor.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-15Merge branch 'nd/gitignore-trailing-whitespace'Junio C Hamano
Trailing whitespaces in .gitignore files, unless they are quoted for fnmatch(3), e.g. "path\ ", are warned and ignored. Strictly speaking, this is a backward incompatible change, but very unlikely to bite any sane user and adjusting should be obvious and easy. * nd/gitignore-trailing-whitespace: t0008: skip trailing space test on Windows dir: ignore trailing spaces in exclude patterns dir: warn about trailing spaces in exclude patterns
2014-02-10dir: ignore trailing spaces in exclude patternsNguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-27Merge branch 'jn/ignore-doc'Junio C Hamano
Explicitly list $HOME/.config/git/ignore as one of the places you can use to keep ignore patterns that depend on your personal choice of tools, e.g. *~ for Emacs users. * jn/ignore-doc: gitignore doc: add global gitignore to synopsis
2014-01-17gitignore doc: add global gitignore to synopsisJonathan Nieder
The gitignore(5) manpage already documents $XDG_CONFIG_HOME/git/ignore but it is easy to forget that it exists. Add a reminder to the synopsis. Noticed while looking for a place to put a list of scratch filenames in the cwd used by one's editor of choice. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-09gitignore.txt: clarify recursive nature of excluded directoriesKarsten Blees
Additionally, precedence of negated patterns is exactly as outlined in the DESCRIPTION section, we don't need to repeat this. Signed-off-by: Karsten Blees <blees@dcon.de> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-07gitignore.txt: fix documentation of "**" patternsKarsten Blees
"**" means bold in ASCIIDOC, so we need to escape it. Signed-off-by: Karsten Blees <blees@dcon.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-02-06Merge branch 'ta/doc-no-small-caps'Junio C Hamano
Update documentation to change "GIT" which was a poor-man's small caps to "Git". The latter was the intended spelling. Also change "git" spelled in all-lowercase to "Git" when it refers to the system as the whole or the concept it embodies, as opposed to the command the end users would type. * ta/doc-no-small-caps: Documentation: StGit is the right spelling, not StGIT Documentation: describe the "repository" in repository-layout Documentation: add a description for 'gitfile' to glossary Documentation: do not use undefined terms git-dir and git-file Documentation: the name of the system is 'Git', not 'git' Documentation: avoid poor-man's small caps GIT
2013-02-02Documentation: the name of the system is 'Git', not 'git'Thomas Ackermann
Signed-off-by: Thomas Ackermann <th.acker@arcor.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-24Merge branch 'as/check-ignore'Junio C Hamano
Add a new command "git check-ignore" for debugging .gitignore files. The variable names may want to get cleaned up but that can be done in-tree. * as/check-ignore: clean.c, ls-files.c: respect encapsulation of exclude_list_groups t0008: avoid brace expansion add git-check-ignore sub-command setup.c: document get_pathspec() add.c: extract new die_if_path_beyond_symlink() for reuse add.c: extract check_path_for_gitlink() from treat_gitlinks() for reuse pathspec.c: rename newly public functions for clarity add.c: move pathspec matchers into new pathspec.c for reuse add.c: remove unused argument from validate_pathspec() dir.c: improve docs for match_pathspec() and match_pathspec_depth() dir.c: provide clear_directory() for reclaiming dir_struct memory dir.c: keep track of where patterns came from dir.c: use a single struct exclude_list per source of excludes Conflicts: builtin/ls-files.c dir.c
2013-01-11Merge branch 'nd/wildmatch'Junio C Hamano
Allows pathname patterns in .gitignore and .gitattributes files with double-asterisks "foo/**/bar" to match any number of directory hierarchies. * nd/wildmatch: wildmatch: replace variable 'special' with better named ones compat/fnmatch: respect NO_FNMATCH* even on glibc wildmatch: fix "**" special case t3070: Disable some failing fnmatch tests test-wildmatch: avoid Windows path mangling Support "**" wildcard in .gitignore and .gitattributes wildmatch: make /**/ match zero or more directories wildmatch: adjust "**" behavior wildmatch: fix case-insensitive matching wildmatch: remove static variable force_lower_case wildmatch: make wildmatch's return value compatible with fnmatch t3070: disable unreliable fnmatch tests Integrate wildmatch to git wildmatch: follow Git's coding convention wildmatch: remove unnecessary functions Import wildmatch from rsync ctype: support iscntrl, ispunct, isxdigit and isprint ctype: make sane_ctype[] const array Conflicts: Makefile
2013-01-07add git-check-ignore sub-commandAdam 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=108815 Signed-off-by: Adam Spiers <git@adamspiers.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-16Support "**" wildcard in .gitignore and .gitattributesNguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-11Merge branch 'nd/doc-ignore'Junio C Hamano
* nd/doc-ignore: gitignore.txt: suggestions how to get literal # or ! at the beginning
2012-10-08gitignore.txt: suggestions how to get literal # or ! at the beginningNguyễn Thái Ngọc Duy
We support backslash escape, but we hide the details behind the phrase "a shell glob suitable for consumption by fnmatch(3)". So it may not be obvious how one can get literal # or ! at the beginning of pattern. Add a few lines on how to work around the magic characters. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-19Doc: separate gitignore pattern sourcesPhilip Oakley
Use separate bulleted paragraphs for the three different gitignore pattern sources. Signed-off-by: Philip Oakley <philipoakley@iee.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-25Let core.excludesfile default to $XDG_CONFIG_HOME/git/ignoreHuynh Khoi Nguyen Nguyen
To use the feature of core.excludesfile, the user needs: 1. to create such a file, 2. and add configuration variable to point at it. Instead, we can make this a one-step process by choosing a default value which points to a filename in the user's $HOME, that is unlikely to already exist on the system, and only use the presence of the file as a cue that the user wants to use that feature. And we use "${XDG_CONFIG_HOME:-$HOME/.config/git}/ignore" as such a file, in the same directory as the newly added configuration file ("${XDG_CONFIG_HOME:-$HOME/.config/git}/config). The use of this directory is in line with XDG specification as a location to store such application specific files. Signed-off-by: Huynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr> Signed-off-by: Valentin Duperray <Valentin.Duperray@ensimag.imag.fr> Signed-off-by: Franck Jonas <Franck.Jonas@ensimag.imag.fr> Signed-off-by: Lucien Kong <Lucien.Kong@ensimag.imag.fr> Signed-off-by: Thomas Nguy <Thomas.Nguy@ensimag.imag.fr> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-03-11doc: drop author/documentation sections from most pagesJeff King
The point of these sections is generally to: 1. Give credit where it is due. 2. Give the reader an idea of where to ask questions or file bug reports. But they don't do a good job of either case. For (1), they are out of date and incomplete. A much more accurate answer can be gotten through shortlog or blame. For (2), the correct contact point is generally git@vger, and even if you wanted to cc the contact point, the out-of-date and incomplete fields mean you're likely sending to somebody useless. So let's drop the fields entirely from all manpages except git(1) itself. We already point people to the mailing list for bug reports there, and we can update the Authors section to give credit to the major contributors and point to shortlog and blame for more information. Each page has a "This is part of git" footer, so people can follow that to the main git manpage.
2010-11-11Documentation: point to related commands from gitignoreJonathan Nieder
A frequently asked question on #git is how to stop tracking a file that is mistakenly tracked by git. A frequently attempted strategy is to add such files to .gitignore. Thus one might imagine that the gitignore documentation could be a good entry point for 'git rm' documentation. Add some cross-references in this vein. While at it, move a reference to update-index --assume-unchanged from the DESCRIPTION to lower down on the page. This way, the methodical reader can benefit from first learning what excludes files do, then how they relate to other git facilities. Based-on-patch-by: Sitaram Chamarty <sitaram@atc.tcs.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-11Documentation: split gitignore page into sectionsJonathan Nieder
A learner-by-example might want to look at the examples section first. Help her out by supplying some section headings: PATTERN FORMAT for the format of lines in an excludes file and EXAMPLES for the two examples. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-21Documentation: clarify quoting in gitignore docsJonathan Nieder
An asterisk in "Documentation/*.txt" quoted with \ to avoid bold text is being output as \* because asciidoc does not consider it a candidate for escaping (there is no matching * to pair it with). So the manual looks like it is saying that one should write "Documentation/\*.txt" in the .gitignore file. Reported-by: Frédéric Brière <fbriere@fbriere.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-06-01gitignore.5: Clarify matching rulesJonathan Nieder
Patterns containing a / are implicitly anchored to the directory containing the relevant .gitignore file. Patterns not containing a / are textual matches against the path name relative to the directory containing .gitignore. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>