summaryrefslogtreecommitdiff
path: root/Documentation
AgeCommit message (Collapse)Author
2014-08-28Document LF appearing in shallow command during send-pack/receive-packShawn Pearce
The implementation sends an LF, but the protocol documentation was missing this detail. Signed-off-by: Shawn Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-28docs/fast-export: explain --anonymize more completelyJeff King
The original commit made mention of this option, but not why one might want it or how they might use it. Let's try to be a little more thorough, and also explain how to confirm that the output really is anonymous. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-27teach fast-export an --anonymize optionJeff King
Sometimes users want to report a bug they experience on their repository, but they are not at liberty to share the contents of the repository. It would be useful if they could produce a repository that has a similar shape to its history and tree, but without leaking any information. This "anonymized" repository could then be shared with developers (assuming it still replicates the original problem). This patch implements an "--anonymize" option to fast-export, which generates a stream that can recreate such a repository. Producing a single stream makes it easy for the caller to verify that they are not leaking any useful information. You can get an overview of what will be shared by running a command like: git fast-export --anonymize --all | perl -pe 's/\d+/X/g' | sort -u | less which will show every unique line we generate, modulo any numbers (each anonymized token is assigned a number, like "User 0", and we replace it consistently in the output). In addition to anonymizing, this produces test cases that are relatively small (compared to the original repository) and fast to generate (compared to using filter-branch, or modifying the output of fast-export yourself). Here are numbers for git.git: $ time git fast-export --anonymize --all \ --tag-of-filtered-object=drop >output real 0m2.883s user 0m2.828s sys 0m0.052s $ gzip output $ ls -lh output.gz | awk '{print $5}' 2.9M Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-26send-pack: take refspecs over stdinJeff King
Pushing a large number of refs works over most transports, because we implement send-pack as an internal function. However, it can sometimes fail when pushing over http, because we have to spawn "git send-pack --stateless-rpc" to do the heavy lifting, and we pass each refspec on the command line. This can cause us to overflow the OS limits on the size of the command line for a large push. We can solve this by giving send-pack a --stdin option and using it from remote-curl. We already dealt with this on the fetch-pack side in 078b895 (fetch-pack: new --stdin option to read refs from stdin, 2012-04-02). The stdin option (and in particular, its use of packet-lines for stateless-rpc input) is modeled after that solution. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-26abspath: convert absolute_path() to strbufRené Scharfe
Move most of the code of absolute_path() into the new function strbuf_add_absolute_path() and in the process transform it to use struct strbuf and xgetcwd() instead of a PATH_MAX-sized buffer, which can be too small on some file systems. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-21pretty: note that %cd respects the --date= optionThomas Braun
Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-20run-command: introduce child_process_init()René Scharfe
Add a helper function for initializing those struct child_process variables for which the macro CHILD_PROCESS_INIT can't be used. Suggested-by: Jeff King <peff@peff.net> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-20run-command: introduce CHILD_PROCESS_INITRené Scharfe
Most struct child_process variables are cleared using memset first after declaration. Provide a macro, CHILD_PROCESS_INIT, that can be used to initialize them statically instead. That's shorter, doesn't require a function call and is slightly more readable (especially given that we already have STRBUF_INIT, ARGV_ARRAY_INIT etc.). Helped-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-18diff --stat: mark any file larger than core.bigfilethreshold binaryNguyễn Thái Ngọc Duy
Too large files may lead to failure to allocate memory. If it happens here, it could impact quite a few commands that involve diff. Moreover, too large files are inefficient to compare anyway (and most likely non-text), so mark them binary and skip looking at their content. Noticed-by: Dale R. Worley <worley@alum.mit.edu> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-15Git 2.1v2.1.0Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-12Documentation/git-rebase.txt: -f forces a rebase that would otherwise be a no-opSergey Organov
"Current branch is a descendant of the commit you are rebasing onto" does not necessarily mean "rebase" requires "--force". For a plain vanilla "history flattening" rebase, the rebase can be done without forcing if there is a merge between the tip of the branch being rebased and the commit you are rebasing onto, even if the tip is descendant of the other. [jc: reworded both the text and the log description] Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-08Documentation: git-init: flesh out exampleLinus Arver
Add a third step `git commit` after adding files for the first time. Signed-off-by: Linus Arver <linusarver@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-08Documentation: git-init: template directory: reword and cross-referenceLinus Arver
Signed-off-by: Linus Arver <linusarver@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-08Documentation: git-init: reword parenthetical statementsLinus Arver
Signed-off-by: Linus Arver <linusarver@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-08Documentation: git-init: --separate-git-dir: clarifyLinus Arver
Use shorter sentences to describe what actually happens. We describe what the term "Git symbolic link" actually means. Also, we separate out the description of the behavioral change upon reinitialization into its own paragraph. Signed-off-by: Linus Arver <linusarver@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-08Documentation: git-init: template directory: rewordLinus Arver
Signed-off-by: Linus Arver <linusarver@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-08Documentation: git-init: list items faceliftLinus Arver
No textual change. Signed-off-by: Linus Arver <linusarver@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-08Documentation: git-init: typographical fixesLinus Arver
Use backticks when we quote something that the user should literally use. Signed-off-by: Linus Arver <linusarver@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-07config: add `git_die_config()` to the config-set APITanay Abhra
Add `git_die_config` that dies printing the line number and the file name of the highest priority value for the configuration variable `key`. A custom error message is also printed before dying, specified by the caller, which can be skipped if `err` argument is set to NULL. It has usage in non-callback based config value retrieval where we can raise an error and die if there is a semantic error. For example, if (!git_config_get_value(key, &value)){ if (!strcmp(value, "foo")) git_config_die(key, "value: `%s` is illegal", value); else /* do work */ } Signed-off-by: Tanay Abhra <tanayabh@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-07Release notes: grammatical fixesMarc Branchaud
Signed-off-by: Marc Branchaud <marcnarc@xiplink.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-05imap-send doc: omit confusing "to use imap-send" modifierbrian m. carlson
It wouldn't make sense for these configuration variables to be required for Git in general to function. 'Required' in this context means required for git imap-send to work. Noticed while trying to figure out what the sentence describing imap.tunnel meant. [jn: expanded to also simplify explanation of imap.folder and imap.host in the same way] Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-05RelNotes: no more check_ref_format micro-optimizationJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-05config: teach "git -c" to recognize an empty stringJunio C Hamano
In a config file, you can do: [foo] bar to turn the "foo.bar" boolean flag on, and you can do: [foo] bar= to set "foo.bar" to the empty string. However, git's "-c" parameter treats both: git -c foo.bar and git -c foo.bar= as the boolean flag, and there is no way to set a variable to the empty string. This patch enables the latter form to do that. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-08-04Merge branch 'tf/maint-doc-push'Junio C Hamano
* tf/maint-doc-push: git-push: fix link in man page
2014-08-04Merge branch 'ta/doc-config'Junio C Hamano
* ta/doc-config: add documentation for writing config files
2014-07-31imap-send: clarify CRAM-MD5 vs LOGIN documentationTony Finch
Explicitly mention that leaving imap.authMethod unset makes git imap-send use the basic IMAP plaintext LOGIN command. Signed-off-by: Tony Finch <dot@dotat.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-31git-push: fix link in man pageTony Finch
Signed-off-by: Tony Finch <dot@dotat.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-30Sync with 2.0.4Junio C Hamano
* maint: Git 2.0.4 commit --amend: test specifies authorship but forgets to check
2014-07-30Update draft release notes to 2.1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-30Git 2.0.4v2.0.4Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-30add documentation for writing config filesTanay Abhra
Replace TODO introduced in commit 9c3c22 with documentation explaining Git config API functions for writing configuration files. Signed-off-by: Tanay Abhra <tanayabh@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-29add `config_set` API for caching config-like filesTanay Abhra
Currently `git_config()` uses a callback mechanism and file rereads for config values. Due to this approach, it is not uncommon for the config files to be parsed several times during the run of a git program, with different callbacks picking out different variables useful to themselves. Add a `config_set`, that can be used to construct an in-memory cache for config-like files that the caller specifies (i.e., files like `.gitmodules`, `~/.gitconfig` etc.). Add two external functions `git_configset_get_value` and `git_configset_get_value_multi` for querying from the config sets. `git_configset_get_value` follows `last one wins` semantic (i.e. if there are multiple matches for the queried key in the files of the configset the value returned will be the last entry in `value_list`). `git_configset_get_value_multi` returns a list of values sorted in order of increasing priority (i.e. last match will be at the end of the list). Add type specific query functions like `git_configset_get_bool` and similar. Add a default `config_set`, `the_config_set` to cache all key-value pairs read from usual config files (repo specific .git/config, user wide ~/.gitconfig, XDG config and the global /etc/gitconfig). `the_config_set` is populated using `git_config()`. Add two external functions `git_config_get_value` and `git_config_get_value_multi` for querying in a non-callback manner from `the_config_set`. Also, add type specific query functions that are implemented as a thin wrapper around the `config_set` API. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Tanay Abhra <tanayabh@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-28strbuf: add strbuf_getcwd()René Scharfe
Add strbuf_getcwd(), which puts the current working directory into a strbuf. Because it doesn't use a fixed-size buffer it supports arbitrarily long paths, provided the platform's getcwd() does as well. At least on Linux and FreeBSD it handles paths longer than PATH_MAX just fine. Suggested-by: Karsten Blees <karsten.blees@gmail.com> Helped-by: Duy Nguyen <pclouds@gmail.com> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-27Git 2.1.0-rc0v2.1.0-rc0Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-27Merge branch 'cc/replace-graft'Junio C Hamano
"git replace" learned a "--graft" option to rewrite parents of a commit. * cc/replace-graft: replace: add test for --graft with a mergetag replace: check mergetags when using --graft replace: add test for --graft with signed commit replace: remove signature when using --graft contrib: add convert-grafts-to-replace-refs.sh Documentation: replace: add --graft option replace: add test for --graft replace: add --graft option replace: cleanup redirection style in tests
2014-07-23Sync with v2.0.3Junio C Hamano
* maint: Git 2.0.3 .mailmap: combine Stefan Beller's emails git.1: switch homepage for stats
2014-07-23Merge branch 'ta/string-list-init'Junio C Hamano
* ta/string-list-init: replace memset with string-list initializers string-list: add string_list initializer helper function
2014-07-23Merge branch 'jk/tag-sort'Junio C Hamano
* jk/tag-sort: tag: support configuring --sort via .gitconfig tag: fix --sort tests to use cat<<-\EOF format
2014-07-23Git 2.0.3v2.0.3Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-23git.1: switch homepage for statsStefan Beller
According to http://meta.ohloh.net/2014/07/black-duck-open-hub/ the site name of ohloh changed to openhub. Change the man page accordingly. Signed-off-by: Stefan Beller <stefanbeller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-22Sync with maintJunio C Hamano
* maint: Documentation: fix missing text for rev-parse --verify
2014-07-22Merge branch 'kb/perf-trace'Junio C Hamano
* kb/perf-trace: api-trace.txt: add trace API documentation progress: simplify performance measurement by using getnanotime() wt-status: simplify performance measurement by using getnanotime() git: add performance tracing for git's main() function to debug scripts trace: add trace_performance facility to debug performance issues trace: add high resolution timer function to debug performance issues trace: add 'file:line' to all trace output trace: move code around, in preparation to file:line output trace: add current timestamp to all trace output trace: disable additional trace output for unit tests trace: add infrastructure to augment trace output with additional info sha1_file: change GIT_TRACE_PACK_ACCESS logging to use trace API Documentation/git.txt: improve documentation of 'GIT_TRACE*' variables trace: improve trace performance trace: remove redundant printf format attribute trace: consistently name the format parameter trace: move trace declarations from cache.h to new trace.h
2014-07-22Merge branch 'po/error-message-style' into maintJunio C Hamano
* po/error-message-style: doc: give some guidelines for error messages
2014-07-22Merge branch 'ye/doc-http-proto' into maintJunio C Hamano
* ye/doc-http-proto: http-protocol.txt: Basic Auth is defined in RFC 2617, not RFC 2616
2014-07-22Merge branch 'jm/api-strbuf-doc' into maintJunio C Hamano
* jm/api-strbuf-doc: api-strbuf.txt minor typos
2014-07-22Merge branch 'jm/doc-wording-tweaks' into maintJunio C Hamano
* jm/doc-wording-tweaks: Documentation: wording fixes in the user manual and glossary
2014-07-22Merge branch 'maint-1.9' into maintJunio C Hamano
* maint-1.9: Documentation: fix missing text for rev-parse --verify
2014-07-22Merge branch 'maint-1.8.5' into maint-1.9Junio C Hamano
* maint-1.8.5: Documentation: fix missing text for rev-parse --verify
2014-07-22Documentation: fix missing text for rev-parse --verifybrian m. carlson
The caret (^) is used as a markup symbol in AsciiDoc. Due to the inability of AsciiDoc to parse a line containing an unmatched caret, it omitted the line from the output, resulting in the man page missing the end of a sentence. Escape this caret so that the man page ends up with the complete text. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-21Ninth batch for 2.1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>