summaryrefslogtreecommitdiff
path: root/Documentation/git.txt
AgeCommit message (Collapse)Author
2014-07-14git: add performance tracing for git's main() function to debug scriptsKarsten Blees
Use trace_performance to measure and print execution time and command line arguments of the entire main() function. In constrast to the shell's 'time' utility, which measures total time of the parent process, this logs all involved git commands recursively. This is particularly useful to debug performance issues of scripted commands (i.e. which git commands were called with which parameters, and how long did they execute). Due to git's deliberate use of exit(), the implementation uses an atexit routine rather than just adding trace_performance_since() at the end of main(). Usage example: > GIT_TRACE_PERFORMANCE=~/git-trace.log git stash list Creates a log file like this: 23:57:38.638765 trace.c:405 performance: 0.000310107 s: git command: 'git' 'rev-parse' '--git-dir' 23:57:38.644387 trace.c:405 performance: 0.000261759 s: git command: 'git' 'rev-parse' '--show-toplevel' 23:57:38.646207 trace.c:405 performance: 0.000304468 s: git command: 'git' 'config' '--get-colorbool' 'color.interactive' 23:57:38.648491 trace.c:405 performance: 0.000241667 s: git command: 'git' 'config' '--get-color' 'color.interactive.help' 'red bold' 23:57:38.650465 trace.c:405 performance: 0.000243063 s: git command: 'git' 'config' '--get-color' '' 'reset' 23:57:38.654850 trace.c:405 performance: 0.025126313 s: git command: 'git' 'stash' 'list' Signed-off-by: Karsten Blees <blees@dcon.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-14sha1_file: change GIT_TRACE_PACK_ACCESS logging to use trace APIKarsten Blees
This changes GIT_TRACE_PACK_ACCESS functionality as follows: * supports the same options as GIT_TRACE (e.g. printing to stderr) * no longer supports relative paths * appends to the trace file rather than overwriting Signed-off-by: Karsten Blees <blees@dcon.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-14Documentation/git.txt: improve documentation of 'GIT_TRACE*' variablesKarsten Blees
Separate GIT_TRACE description into what it prints and how to configure where trace output is printed to. Change other GIT_TRACE_* descriptions to refer to GIT_TRACE. Add descriptions for GIT_TRACE_SETUP and GIT_TRACE_SHALLOW. Signed-off-by: Karsten Blees <blees@dcon.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-25Sync with maintJunio C Hamano
2014-06-25Git 2.0.1v2.0.1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-06Merge branch 'jj/command-line-adjective'Junio C Hamano
* jj/command-line-adjective: Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues
2014-05-30Sync with 1.9.4Junio C Hamano
2014-05-30Git 1.9.4v1.9.4Junio C Hamano
This is expected to be the final maintenance release for 1.9 series, merging the remaining fixes that are relevant and are already in 2.0. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-28Git 2.0v2.0.0Junio C Hamano
2014-05-21Documentation: use "command-line" when used as a compound adjective, and fix ↵Jason St. John
other minor grammatical issues Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-05-09Sync with 1.9.3Junio C Hamano
2014-05-09Git 1.9.3v1.9.3Junio C Hamano
The third maintenance release for Git 1.9; contains all the fixes that are scheduled to appear in Git 2.0 since 1.9.2. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-09Sync with 1.9.2Junio C Hamano
* maint: Git 1.9.2 doc/http-backend: missing accent grave in literal mark-up
2014-04-09Git 1.9.2v1.9.2Junio C Hamano
The second maintenance release for Git 1.9; contains all the fixes that are scheduled to appear in Git 2.0. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-18Sync with 1.9.1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-18Git 1.9.1v1.9.1Junio C Hamano
The version numbering scheme has changed since Git 1.9 and we dropped the third dewey-decimal from the traditional numbering (e.g. both 1.8.4 and 1.8.5 were major feature releases). This release 1.9.1 is the first maintenance relase for Git 1.9. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-24introduce GIT_INDEX_VERSION environment variableThomas Gummerer
Respect a GIT_INDEX_VERSION environment variable, when a new index is initialized. Setting the environment variable will not cause existing index files to be converted to another format, but will only affect newly written index files. This can be used to initialize repositories with index-v4. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-14Git 1.9.0v1.9.0Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-13Sync with 1.8.5.5Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-13Git 1.8.5.5v1.8.5.5Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-05Sync with 1.8.5.4Junio C Hamano
2014-02-05Git 1.8.5.4v1.8.5.4Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-13Sync with 1.8.5.3Junio C Hamano
* maint: Git 1.8.5.3 pack-heuristics.txt: mark up the file header properly
2014-01-13Git 1.8.5.3v1.8.5.3Junio C Hamano
2013-12-27Merge branch 'zk/difftool-counts'Junio C Hamano
Show the total number of paths and the number of paths shown so far when "git difftool" prompts to launch an external diff tool, which would give users some sense of progress. * zk/difftool-counts: diff.c: fix some recent whitespace style violations difftool: display the number of files in the diff queue in the prompt
2013-12-17Git 1.8.5.2v1.8.5.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-06difftool: display the number of files in the diff queue in the promptZoltan Klinger
When --prompt option is set, git-difftool displays a prompt for each modified file to be viewed in an external diff program. At that point, it could be useful to display a counter and the total number of files in the diff queue. Below is the current difftool prompt for the first of 5 modified files: Viewing: 'diff.c' Launch 'vimdiff' [Y/n]: Consider the modified prompt: Viewing (1/5): 'diff.c' Launch 'vimdiff' [Y/n]: The current GIT_EXTERNAL_DIFF mechanism does not tell the number of paths in the diff queue nor the current counter. To make this "counter/total" info available for GIT_EXTERNAL_DIFF programs without breaking existing ones by doing the following: - Keep track of the number of paths shown so far in diff_options; - Export two new environment variables from run_external_diff() to show the total number of paths (from diff_queue_struct) and the current value of the counter (from diff_options); and - Update git-difftool--helper to use these two environment variables. Signed-off-by: Zoltan Klinger <zoltan.klinger@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-03Git 1.8.5.1v1.8.5.1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-02Sync with 1.8.4.5Junio C Hamano
2013-12-02Git 1.8.4.5v1.8.4.5Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-27Git 1.8.5v1.8.5Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-20Sync with 1.8.4.4Junio C Hamano
2013-11-20Git 1.8.4.4v1.8.4.4Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-08Sync with 1.8.4.3Junio C Hamano
2013-11-08Git 1.8.4.3v1.8.4.3Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-28Sync with v1.8.4.2Junio C Hamano
2013-10-28Git 1.8.4.2v1.8.4.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-18Merge branch 'jc/reflog-doc'Junio C Hamano
Document rules to use GIT_REFLOG_ACTION variable in the scripted Porcelain. git-rebase--interactive locally violates them, but it is a leaf user that does not call out to or dot-source other scripts, so it does not urgently need to be fixed. * jc/reflog-doc: setup_reflog_action: document the rules for using GIT_REFLOG_ACTION
2013-10-15git.txt: fix asciidoc syntax of --*-pathspecsSteffen Prohaska
Labeled lists require a double colon. [jc] I eyeballed the output from git grep '[^:]:$' Documentation/\*.txt and the patch fixes all breakages of this kind. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-26Sync with Git 1.8.4.1Jonathan Nieder
2013-09-26Git 1.8.4.1v1.8.4.1Jonathan Nieder
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-20Merge branch 'nr/git-cd-to-a-directory'Junio C Hamano
Just like "make -C <directory>", make "git -C <directory> ..." to go there before doing anything else. * nr/git-cd-to-a-directory: t0056: "git -C" test updates git: run in a directory given with -C option
2013-09-09Merge branch 'jl/submodule-mv'Junio C Hamano
"git mv A B" when moving a submodule A does "the right thing", inclusing relocating its working tree and adjusting the paths in the .gitmodules file. * jl/submodule-mv: (53 commits) rm: delete .gitmodules entry of submodules removed from the work tree mv: update the path entry in .gitmodules for moved submodules submodule.c: add .gitmodules staging helper functions mv: move submodules using a gitfile mv: move submodules together with their work trees rm: do not set a variable twice without intermediate reading. t6131 - skip tests if on case-insensitive file system parse_pathspec: accept :(icase)path syntax pathspec: support :(glob) syntax pathspec: make --literal-pathspecs disable pathspec magic pathspec: support :(literal) syntax for noglob pathspec kill limit_pathspec_to_literal() as it's only used by parse_pathspec() parse_pathspec: preserve prefix length via PATHSPEC_PREFIX_ORIGIN parse_pathspec: make sure the prefix part is wildcard-free rename field "raw" to "_raw" in struct pathspec tree-diff: remove the use of pathspec's raw[] in follow-rename codepath remove match_pathspec() in favor of match_pathspec_depth() remove init_pathspec() in favor of parse_pathspec() remove diff_tree_{setup,release}_paths convert common_prefix() to use struct pathspec ...
2013-09-09git: run in a directory given with -C optionNazri Ramliy
This is similar in spirit to "make -C dir ..." and "tar -C dir ...". It takes more keypresses to invoke git command in a different directory without leaving the current directory: 1. (cd ~/foo && git status) git --git-dir=~/foo/.git --work-dir=~/foo status GIT_DIR=~/foo/.git GIT_WORK_TREE=~/foo git status 2. (cd ../..; git grep foo) 3. for d in d1 d2 d3; do (cd $d && git svn rebase); done The methods shown above are acceptable for scripting but are too cumbersome for quick command line invocations. With this new option, the above can be done with fewer keystrokes: 1. git -C ~/foo status 2. git -C ../.. grep foo 3. for d in d1 d2 d3; do git -C $d svn rebase; done A new test script is added to verify the behavior of this option with other path-related options like --git-dir and --work-tree. Signed-off-by: Nazri Ramliy <ayiehere@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-30Merge branch 'mm/war-on-whatchanged'Junio C Hamano
* mm/war-on-whatchanged: whatchanged: document its historical nature core-tutorial: trim the section on Inspecting Changes
2013-08-23Git 1.8.4v1.8.4Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-13core-tutorial: trim the section on Inspecting ChangesJunio C Hamano
Back when the core tutorial was written, `log` and `whatchanged` were scripted Porcelains. In the "Inspecting Changes" section that talks about the plumbing commands in the diff family, it made sense to use `log` and `whatchanged` as good examples of the use of these plumbing commands, and because even these scripted Porcelains were novelty (there wasn't the new end-user tutorial written), it made some sense to illustrate uses of the `git log` (and `git whatchanged`) scripted Porcelain commands. But we no longer have scripted `log` and `whatchanged` to serve as examples, and this document is not where the end users learn what `git log` command is about. Stop at briefly mentioning the possibility of combining rev-list with diff-tree to build your own log, and leave the end-user documentation of `log` to the new tutorial and the user manual. Also resurrect the last version of `git-log`, `git-whatchanged`, and `git-show` to serve as examples to contrib/examples/ directory. While at it, remove 'whatchanged' from a list of sample commands that are affected by GIT_FLUSH environment variable. This is not meant to be an exhaustive list but as a list of typical ones, and an old command that is kept primarily for backward compatibility does not belong to it. Helped-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-22Sync with Git 1.8.3.4Junio C Hamano
2013-07-22Git 1.8.3.4v1.8.3.4Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-15parse_pathspec: accept :(icase)path syntaxNguyễ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>