summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-04-22Merge branch 'ta/glossary' into maintJunio C Hamano
* ta/glossary: glossary: improve definitions of refspec and pathspec The name of the hash function is "SHA-1", not "SHA1" glossary: improve description of SHA-1 related topics glossary: remove outdated/misleading/irrelevant entries
2013-04-22Merge branch 'jk/doc-http-backend' into maintJunio C Hamano
Improve documentation to illustrate "push authenticated, fetch anonymous" configuration for smart HTTP servers. * jk/doc-http-backend: doc/http-backend: match query-string in apache half-auth example doc/http-backend: give some lighttpd config examples doc/http-backend: clarify "half-auth" repo configuration
2013-04-22Merge branch 'jk/test-trash' into maintJunio C Hamano
* jk/test-trash: t/test-lib.sh: drop "$test" variable t/test-lib.sh: fix TRASH_DIRECTORY handling
2013-04-22Merge branch 'jk/daemon-user-doc' into maintJunio C Hamano
* jk/daemon-user-doc: doc: clarify that "git daemon --user=<user>" option does not export HOME=~user
2013-04-22Merge branch 'jc/detached-head-doc' into maintJunio C Hamano
* jc/detached-head-doc: glossary: extend "detached HEAD" description Conflicts: Documentation/glossary-content.txt
2013-04-22Merge branch 'jk/show-branch-strbuf' into maintJunio C Hamano
* jk/show-branch-strbuf: show-branch: use strbuf instead of static buffer
2013-04-22Merge branch 'js/rerere-forget-protect-against-NUL' into maintJunio C Hamano
* js/rerere-forget-protect-against-NUL: rerere forget: do not segfault if not all stages are present rerere forget: grok files containing NUL
2013-04-22Merge branch 'jc/apply-ws-fix-tab-in-indent' into maintJunio C Hamano
* jc/apply-ws-fix-tab-in-indent: test: resurrect q_to_tab apply --whitespace=fix: avoid running over the postimage buffer
2013-04-22Merge branch 'ap/combine-diff-ignore-whitespace' into maintJunio C Hamano
* ap/combine-diff-ignore-whitespace: Allow combined diff to ignore white-spaces
2013-04-22Merge branch 'jk/suppress-clang-warning' into maintJunio C Hamano
* jk/suppress-clang-warning: fix clang -Wtautological-compare with unsigned enum
2013-04-22Merge branch 'tr/perl-keep-stderr-open' into maintJunio C Hamano
* tr/perl-keep-stderr-open: t9700: do not close STDERR perl: redirect stderr to /dev/null instead of closing
2013-04-22Merge branch 'lf/bundle-with-tip-wo-message' into maintJunio C Hamano
* lf/bundle-with-tip-wo-message: bundle: Accept prerequisites without commit messages
2013-04-22Merge branch 'jk/filter-branch-come-back-to-original' into maintJunio C Hamano
* jk/filter-branch-come-back-to-original: filter-branch: return to original dir after filtering
2013-04-22Merge branch 'rr/prompt-revert-head' into maintJunio C Hamano
* rr/prompt-revert-head: bash: teach __git_ps1 about REVERT_HEAD
2013-04-22glossary: a revision is just a commitJonathan Nieder
The current definition of 'revision' sounds like it is saying that a revision is a tree object. In reality it is just a commit. This should be especially useful for people used to other revision control systems trying to see how familiar concepts translate into git terms. Reported-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-22prompt: fix untracked files for zshFelipe Contreras
We signal presense of untracked files by adding a per-cent sign '%' to the prompt. But because '%' is used as an escape character to introduce prompt customization in zsh (just like bash prompt uses '\' to escape '\u', '\h', etc.), we need to say '%%' to get a literal per-cent. Helped-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-19receive-pack: close sideband fd on early pack errorsJeff King
Since commit a22e6f8 (receive-pack: send pack-processing stderr over sideband, 2012-09-21), receive-pack will start an async sideband thread to copy the stderr from our index-pack or unpack-objects child to the client. We hand the thread's input descriptor to unpack(), which puts it in the "err" member of the "struct child_process". After unpack() returns, we use finish_async() to reap the sideband thread. The thread is only ready to die when it gets EOF on its pipe, which is connected to the err descriptor. So we expect all of the write ends of that pipe to be closed as part of unpack(). Normally, this works fine. After start_command forks, it closes the parent copy of the descriptor. Then once the child exits (whether it was successful or not), that closes the only remaining writer. However, there is one code-path in unpack() that does not handle this. Before we decide which of unpack-objects or index-pack to use, we read the pack header ourselves to see how many objects it contains. If there is an error here, we exit without running either sub-command, the pipe descriptor remains open, and we are in a deadlock, waiting for the sideband thread to die (which is in turn waiting for us to close the pipe). We can fix this by making sure that unpack() always closes the pipe before returning. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-18t6200: avoid path mangling issue on WindowsJohannes Sixt
MSYS bash interprets the slash in the argument core.commentchar="/" as root directory and mangles it into a Windows style path. Use a different core.commentchar to dodge the issue. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-18remote-hg: fix commit messagesFelipe Contreras
git fast-import expects an extra newline after the commit message data, but we are adding it only on hg-git compat mode, which is why the bidirectionality tests pass. We should add it unconditionally. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-17gitweb/INSTALL: GITWEB_CONFIG_SYSTEM is for backward compatibilityJonathan Nieder
Highlight that CONFIG_SYSTEM and /etc/gitweb.conf are meant to be the fallback configuration file in BUGS section of gitweb.conf documentation. This will hopefully help people who expect them to be a common default, which unfortunately came later in the history.
2013-04-17blame: handle broken commit headers gracefullyRené Scharfe
split_ident_line() can leave us with the pointers date_begin, date_end, tz_begin and tz_end all set to NULL. Check them before use and supply the same fallback values as in the case of a negative return code from split_ident_line(). The "(unknown)" is not actually shown in the output, though, because it will be converted to a number (zero) eventually. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-17pretty: handle broken commit headers gracefullyRené Scharfe
Centralize the parsing of the date and time zone strings in the new helper function show_ident_date() and make sure it checks the pointers provided by split_ident_line() for NULL before use. Reported-by: Ivan Lyapunov <dront78@gmail.com> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-17cat-file: print tags raw for "cat-file -p"Jeff King
When "cat-file -p" prints commits, it shows them in their raw format, since git's format is already human-readable. For tags, however, we print the whole thing raw except for one thing: we convert the timestamp on the tagger line into a human-readable date. This dates all the way back to a0f15fa (Pretty-print tagger dates, 2006-03-01). At that time there was no other way to pretty-print a tag. These days, however, neither of those matters much. The normal way to pretty-print a tag is with "git show", which is much more flexible than "cat-file -p". Commit a0f15fa also built "verify-tag --verbose" (and subsequently "tag -v") around the "cat-file -p" output. However, that behavior was lost in commit 62e09ce (Make git tag a builtin, 2007-07-20), and we went back to printing the raw tag contents. Nobody seems to have noticed the bug since then (and it is arguably a saner behavior anyway, as it shows the actual bytes for which we verified the signature). Let's drop the tagger-date formatting for "cat-file -p". It makes us more consistent with cat-file's commit pretty-printer, and as a bonus, we can drop the hand-rolled tag parsing code in cat-file (which happened to behave inconsistently with the tag pretty-printing code elsewhere). This is a change of output format, so it's possible that some callers could considered this a regression. However, the original behavior was arguably a bug (due to the inconsistency with commits), likely nobody was relying on it (even we do not use it ourselves these days), and anyone relying on the "-p" pretty-printer should be able to expect a change in the output format (i.e., while "cat-file" is plumbing, the output format of "-p" was never guaranteed to be stable). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-16run-command: use thread-aware die_is_recursing routineJeff King
If we die from an async thread, we do not actually exit the program, but just kill the thread. This confuses the static counter in usage.c's default die_is_recursing function; it updates the counter once for the thread death, and then when the main program calls die() itself, it erroneously thinks we are recursing. The end result is that we print "recursion detected in die handler" instead of the real error in such a case (the easiest way to trigger this is having a remote connection hang up while running a sideband demultiplexer). This patch solves it by using a per-thread counter when the async_die function is installed; we detect recursion in each thread (including the main one), but they do not step on each other's toes. Other threaded code does not need to worry about this, as they do not install specialized die handlers; they just let a die() from a sub-thread take down the whole program. Since we are overriding the default recursion-check function, there is an interesting corner case that is not a problem, but bears some explanation. Imagine the main thread calls die(), and then in the die_routine starts an async call. We will switch to using thread-local storage, which starts at 0, for the main thread's counter, even though the original counter was actually at 1. That's OK, though, for two reasons: 1. It would miss only the first level of recursion, and would still find recursive failures inside the async helper. 2. We do not currently and are not likely to start doing anything as heavyweight as starting an async routine from within a die routine or helper function. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-16usage: allow pluggable die-recursion checksJeff King
When any git code calls die or die_errno, we use a counter to detect recursion into the die functions from any of the helper functions. However, such a simple counter is not good enough for threaded programs, which may call die from a sub-thread, killing only the sub-thread (but incrementing the counter for everyone). Rather than try to deal with threads ourselves here, let's just allow callers to plug in their own recursion-detection function. This is similar to how we handle the die routine (the caller plugs in a die routine which may kill only the sub-thread). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-16help.c: add a compatibility comment to cmd_version()David Aguilar
External projects have been known to parse the output of "git version". Help prevent future authors from changing its format by adding a comment to its implementation. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-16read_revisions_from_stdin: make copies for handle_revision_argThomas Rast
read_revisions_from_stdin() has passed pointers to its read buffer down to handle_revision_arg() since its inception way back in 42cabc3 (Teach rev-list an option to read revs from the standard input., 2006-09-05). Even back then, this was a bug: through add_pending_object, the argument was recorded in the object_array's 'name' field. Fix it by making a copy whenever read_revisions_from_stdin() passes an argument down the callchain. The other caller runs handle_revision_arg() on argv[], where it would be redundant to make a copy. Signed-off-by: Thomas Rast <trast@inf.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-15glossary: improve definitions of refspec and pathspecThomas Ackermann
The exact definition of "refspec" can be found in git-fetch and git-push manpages. So don't duplicate this here in the glossary. Actually the definition of "pathspec" should be moved to a separate file akin to the way it's done with "refspec". But this will only be wortwhile when there's more to say about it. So for the time being just improve the first sentence a little bit; fix the indentation of the first paragraph after the bullet list and remove the one-item list of magic signatures with its - for the user - unnecessary introduction of "magic word 'top'". Signed-off-by: Thomas Ackermann <th.acker@arcor.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-15The name of the hash function is "SHA-1", not "SHA1"Thomas Ackermann
Use "SHA-1" instead of "SHA1" whenever we talk about the hash function. When used as a programming symbol, we keep "SHA1". Signed-off-by: Thomas Ackermann <th.acker@arcor.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-15glossary: improve description of SHA-1 related topicsThomas Ackermann
The name of the hash function is "SHA-1", not "SHA1". Also to people who look up "object name" in the glossary, the details of which hash function is applied on what to compute "object name" is not important but the fact that the name is meant to be an unique identifier for the contents stored in the object is. Signed-off-by: Thomas Ackermann <th.acker@arcor.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-15glossary: remove outdated/misleading/irrelevant entriesThomas Ackermann
Signed-off-by: Thomas Ackermann <th.acker@arcor.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-15gitweb/INSTALL: Simplify description of GITWEB_CONFIG_SYSTEMJakub Narębski
The flow of the text describing GITWEB_CONFIG_SYSTEM and GITWEB_CONFIG_COMMON in gitweb/INSTALL is awkward. "This is bad. Oh the other hand, better is broken. Therefore we do this." forces readers to make multiple guesses while reading: "ok, bad, so you plan to change it and warn us about upcoming change? oh, not that, changing it is bad, so we have to live with it? oh, not that, there is another one that is common and that is what we can use". Better rewrite said paragraph to avoid such a mental roller-coaster in the first place. Signed-off-by: Junio Hamano <gitster@pobox.com> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-15t/test-lib.sh: drop "$test" variableJeff King
The $test variable is used as an interim buffer for constructing $TRASH_DIRECTORY, and is almost compatible with it (the exception being that $test has not been converted to an absolute path). Let's get rid of it entirely so that later code does not accidentally use it, thinking the two are interchangeable. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-15t/test-lib.sh: fix TRASH_DIRECTORY handlingJohn Keeping
After the location of $TRASH_DIRECTORY is adjusted by $TEST_OUTPUT_DIRECTORY, we go on to use the $test variable to make the trash directory and cd into it. This means that when $TEST_OUTPUT_DIRECTORY is not "." and an absolute --root has not been specified, we do not remove the trash directory once the tests are complete (remove_trash is set to $TRASH_DIRECTORY). Fix this by always referring to the trash directory as $TRASH_DIRECTORY. Signed-off-by: John Keeping <john@keeping.me.uk> Acked-by: Jeff King <peff@peff.net> Acked-by: Thomas Rast <trast@inf.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-14doc/http-backend: match query-string in apache half-auth exampleJeff King
When setting up a "half-auth" repository in which reads can be done anonymously but writes require authentication, it is best if the server can require authentication for both the ref advertisement and the actual receive-pack POSTs. This alleviates the need for the admin to set http.receivepack in the repositories, and means that the client is challenged for credentials immediately, instead of partway through the push process (and git clients older than v1.7.11.7 had trouble handling these challenges). Since detecting a push during the ref advertisement requires matching the query string, and this is non-trivial to do in Apache, we have traditionally punted and instructed users to just protect "/git-receive-pack$". This patch provides the mod_rewrite recipe to actually match the ref advertisement, which is preferred. While we're at it, let's add the recipe to our test scripts so that we can be sure that it works, and doesn't get broken (either by our changes or by changes in Apache). Signed-off-by: Jeff King <peff@peff.net> Acked-by: Jakub Narębski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-12Merge branch 'rr/test-3200-style' into maintJunio C Hamano
* rr/test-3200-style: t3200 (branch): modernize style Conflicts: t/t3200-branch.sh
2013-04-12Merge branch 'mg/texinfo-5' into maintJunio C Hamano
* mg/texinfo-5: Documentation: Strip texinfo anchors to avoid duplicates
2013-04-12Merge branch 'jk/diffcore-break-divzero' into maintJunio C Hamano
* jk/diffcore-break-divzero: diffcore-break: don't divide by zero
2013-04-12Merge branch 'cn/commit-amend-doc' into maintJunio C Hamano
* cn/commit-amend-doc: Documentation/git-commit: reword the --amend explanation
2013-04-12Merge branch 'jk/bisect-prn-unsigned' into maintJunio C Hamano
* jk/bisect-prn-unsigned: bisect: avoid signed integer overflow
2013-04-12Merge branch 'jk/no-more-self-assignment' into maintJunio C Hamano
* jk/no-more-self-assignment: match-trees: simplify score_trees() using tree_entry() submodule: clarify logic in show_submodule_summary
2013-04-12Merge branch 'rr/send-email-perl-critique' into maintJunio C Hamano
* rr/send-email-perl-critique: send-email: use the three-arg form of open in recipients_cmd send-email: drop misleading function prototype send-email: use "return;" not "return undef;" on error codepaths
2013-04-12Merge branch 'jc/t5516-pushInsteadOf-vs-pushURL' into maintJunio C Hamano
* jc/t5516-pushInsteadOf-vs-pushURL: t5516: test interaction between pushURL and pushInsteadOf correctly
2013-04-12Correct common spelling mistakes in comments and testsStefano Lattarini
Most of these were found using Lucas De Marchi's codespell tool. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-12kwset: fix spelling in commentsStefano Lattarini
Correct spelling mistakes noticed using Lucas De Marchi's codespell tool. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-12precompose-utf8: fix spelling of "want" in error messageStefano Lattarini
Noticed using Lucas De Marchi's codespell tool. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-12compat/nedmalloc: fix spelling in commentsStefano Lattarini
Correct some typos found using Lucas De Marchi's codespell tool. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-12compat/regex: fix spelling and grammar in commentsStefano Lattarini
Some of these were found using Lucas De Marchi's codespell tool. Others noticed by Eric Sunshine. Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-12obstack: fix spelling of similarStefano Lattarini
Noticed using Lucas De Marchi's codespell tool. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-12contrib/subtree: fix spelling of accidentallyStefano Lattarini
Noticed with Lucas De Marchi's codespell tool. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>