gitweb.git
date: recognize bogus FreeBSD gmtime outputJeff King Tue, 1 Apr 2014 21:28:42 +0000 (17:28 -0400)

date: recognize bogus FreeBSD gmtime output

Most gmtime implementations return a NULL value when they
encounter an error (and this behavior is specified by ANSI C
and POSIX). FreeBSD's implementation, however, will simply
leave the "struct tm" untouched. Let's also recognize this
and convert it to a NULL (with this patch, t4212 should pass
on FreeBSD).

Reported-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

show_ident_date: fix tz range checkJeff King Fri, 7 Mar 2014 17:15:01 +0000 (12:15 -0500)

show_ident_date: fix tz range check

Commit 1dca155fe3fa (log: handle integer overflow in
timestamps, 2014-02-24) tried to catch integer overflow
coming from strtol() on the timezone field by comparing against
LONG_MIN/LONG_MAX. However, the intermediate "tz" variable
is an "int", which means it can never be LONG_MAX on LP64
systems; we would truncate the output from strtol before the
comparison.

Clang's -Wtautological-constant-out-of-range-compare notices
this and rightly complains.

Let's instead store the result of strtol in a long, and then
compare it against INT_MIN/INT_MAX. This will catch overflow
from strtol, and also overflow when we pass the result as an
int to show_date.

Reported-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

log: do not segfault on gmtime errorsJeff King Mon, 24 Feb 2014 07:49:05 +0000 (02:49 -0500)

log: do not segfault on gmtime errors

Many code paths assume that show_date and show_ident_date
cannot return NULL. For the most part, we handle missing or
corrupt timestamps by showing the epoch time t=0.

However, we might still return NULL if gmtime rejects the
time_t we feed it, resulting in a segfault. Let's catch this
case and just format t=0.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

log: handle integer overflow in timestampsJeff King Mon, 24 Feb 2014 07:46:37 +0000 (02:46 -0500)

log: handle integer overflow in timestamps

If an ident line has a ridiculous date value like (2^64)+1,
we currently just pass ULONG_MAX along to the date code,
which can produce nonsensical dates.

On systems with a signed long time_t (e.g., 64-bit glibc
systems), this actually doesn't end up too bad. The
ULONG_MAX is converted to -1, we apply the timezone field to
that, and the result ends up somewhere between Dec 31, 1969
and Jan 1, 1970.

However, there is still a few good reasons to detect the
overflow explicitly:

1. On systems where "unsigned long" is smaller than
time_t, we get a nonsensical date in the future.

2. Even where it would produce "Dec 31, 1969", it's easier
to recognize "midnight Jan 1" as a consistent sentinel
value for "we could not parse this".

3. Values which do not overflow strtoul but do overflow a
signed time_t produce nonsensical values in the past.
For example, on a 64-bit system with a signed long
time_t, a timestamp of 18446744073000000000 produces a
date in 1947.

We also recognize overflow in the timezone field, which
could produce nonsensical results. In this case we show the
parsed date, but in UTC.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

date: check date overflow against time_tJeff King Mon, 24 Feb 2014 07:39:45 +0000 (02:39 -0500)

date: check date overflow against time_t

When we check whether a timestamp has overflowed, we check
only against ULONG_MAX, meaning that strtoul has overflowed.
However, we also feed these timestamps to system functions
like gmtime, which expect a time_t. On many systems, time_t
is actually smaller than "unsigned long" (e.g., because it
is signed), and we would overflow when using these
functions. We don't know the actual size or signedness of
time_t, but we can easily check for truncation with a simple
assignment.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fsck: report integer overflow in author timestampsJeff King Mon, 24 Feb 2014 07:39:04 +0000 (02:39 -0500)

fsck: report integer overflow in author timestamps

When we check commit objects, we complain if commit->date is
ULONG_MAX, which is an indication that we saw integer
overflow when parsing it. However, we do not do any check at
all for author lines, which also contain a timestamp.

Let's actually check the timestamps on each ident line
with strtoul. This catches both author and committer lines,
and we can get rid of the now-redundant commit->date check.

Note that like the existing check, we compare only against
ULONG_MAX. Now that we are calling strtoul at the site of
the check, we could be slightly more careful and also check
that errno is set to ERANGE. However, this will make further
refactoring in future patches a little harder, and it
doesn't really matter in practice.

For 32-bit systems, one would have to create a commit at the
exact wrong second in 2038. But by the time we get close to
that, all systems will hopefully have moved to 64-bit (and
if they haven't, they have a real problem one second later).

For 64-bit systems, by the time we get close to ULONG_MAX,
all systems will hopefully have been consumed in the fiery
wrath of our expanding Sun.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4212: test bogus timestamps with git-logJeff King Mon, 24 Feb 2014 07:36:22 +0000 (02:36 -0500)

t4212: test bogus timestamps with git-log

When t4212 was originally added by 9dbe7c3d (pretty: handle
broken commit headers gracefully, 2013-04-17), it tested our
handling of commits with broken ident lines in which the
timestamps could not be parsed. It does so using a bogus line
like "Name <email>-<> 1234 -0000", because that simulates an
error that was seen in the wild.

Later, 03818a4 (split_ident: parse timestamp from end of
line, 2013-10-14) made our parser smart enough to actually
find the timestamp on such a line, and t4212 was adjusted to
match. While it's nice that we handle this real-world case,
this meant that we were not actually testing the
bogus-timestamp case anymore.

This patch adds a test with a totally incomprehensible
timestamp to make sure we are testing the code path.

Note that the behavior is slightly different between regular log
output and "--format=%ad". In the former case, we produce a
sentinel value and in the latter, we produce an empty
string. While at first this seems unnecessarily
inconsistent, it matches the original behavior given by
9dbe7c3d.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/git-merge.txt: fix formatting of example... Andreas Schwab Thu, 5 Sep 2013 15:12:45 +0000 (17:12 +0200)

Documentation/git-merge.txt: fix formatting of example block

You need at least four dashes in a line to have it recognized as listing
block delimiter by asciidoc.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fix shell syntax error in templateThorsten Glaser Fri, 30 Aug 2013 10:40:30 +0000 (12:40 +0200)

fix shell syntax error in template

An if clause must not be empty; add a "colon" command.

Signed-off-by: Thorsten Glaser <t.glaser@tarent.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.8.1' into maint-1.8.2Junio C Hamano Wed, 3 Jul 2013 22:26:53 +0000 (15:26 -0700)

Merge branch 'maint-1.8.1' into maint-1.8.2

* maint-1.8.1:
git-config: update doc for --get with multiple values

git-config: update doc for --get with multiple valuesJohn Keeping Wed, 3 Jul 2013 18:27:39 +0000 (19:27 +0100)

git-config: update doc for --get with multiple values

Since commit 00b347d (git-config: do not complain about duplicate
entries, 2012-10-23), "git config --get" does not exit with an error if
there are multiple values for the specified key but instead returns the
last value. Update the documentation to reflect this.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t0070 "mktemp to unwritable directory" needs SANITYTorsten Bögershausen Sat, 8 Jun 2013 12:17:49 +0000 (14:17 +0200)

t0070 "mktemp to unwritable directory" needs SANITY

Use the SANITY prerequisite when testing if a temp file can
be created in a read only directory.
Skip the test under CYGWIN, or skip it under Unix/Linux when
it is run as root.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pre-push.sample: Make the script executableWieland Hoffmann Tue, 11 Jun 2013 12:14:56 +0000 (14:14 +0200)

pre-push.sample: Make the script executable

githooks(5) says that "[...]the .sample files are executable by default"
which was not true.

Signed-off-by: Wieland Hoffmann <themineo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

trivial: Add missing period in documentationPhil Hord Tue, 28 May 2013 19:36:44 +0000 (19:36 +0000)

trivial: Add missing period in documentation

Signed-off-by: Phil Hord <hordp@cisco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.8.2.3 v1.8.2.3Junio C Hamano Thu, 9 May 2013 19:37:53 +0000 (12:37 -0700)

Git 1.8.2.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'tr/copy-revisions-from-stdin' into maintJunio C Hamano Thu, 9 May 2013 19:42:17 +0000 (12:42 -0700)

Merge branch 'tr/copy-revisions-from-stdin' into maint

* tr/copy-revisions-from-stdin:
read_revisions_from_stdin: make copies for handle_revision_arg

t5004: avoid using tar for checking emptiness of archiveRené Scharfe Thu, 9 May 2013 13:13:47 +0000 (15:13 +0200)

t5004: avoid using tar for checking emptiness of archive

Test 2 of t5004 checks if a supposedly empty tar archive really
contains no files. 24676f02 (t5004: fix issue with empty archive test
and bsdtar) removed our commit hash to make it work with bsdtar, but
the test still fails on NetBSD and OpenBSD, which use their own tar
that considers a tar file containing only NULs as broken.

Here's what the different archivers do when asked to create a tar
file without entries:

$ uname -v
NetBSD 6.0.1 (GENERIC)
$ gtar --version | head -1
tar (GNU tar) 1.26
$ bsdtar --version
bsdtar 2.8.4 - libarchive 2.8.4

$ : >zero.tar
$ perl -e 'print "\0" x 10240' >tenk.tar
$ sha1 zero.tar tenk.tar
SHA1 (zero.tar) = da39a3ee5e6b4b0d3255bfef95601890afd80709
SHA1 (tenk.tar) = 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c

$ : | tar cf - -T - | sha1
da39a3ee5e6b4b0d3255bfef95601890afd80709
$ : | gtar cf - -T - | sha1
34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c
$ : | bsdtar cf - -T - | sha1
34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c

So NetBSD's native tar creates an empty file, while GNU tar and bsdtar
both give us 10KB of NULs -- just like git archive with an empty tree.
Now let's see how the archivers handle these two kinds of empty tar
files:

$ tar tf zero.tar; echo $?
tar: Unexpected EOF on archive file
1
$ gtar tf zero.tar; echo $?
gtar: This does not look like a tar archive
gtar: Exiting with failure status due to previous errors
2
$ bsdtar tf zero.tar; echo $?
0

$ tar tf tenk.tar; echo $?
tar: Cannot identify format. Searching...
tar: End of archive volume 1 reached
tar: Sorry, unable to determine archive format.
1
$ gtar tf tenk.tar; echo $?
0
$ bsdtar tf tenk.tar; echo $?
0

NetBSD's tar complains about both, bsdtar happily accepts any of them
and GNU tar doesn't like zero-length archive files. So the safest
course of action is to stay with our block-of-NULs format which is
compatible with GNU tar and bsdtar, as we can't make NetBSD's native
tar happy anyway.

We can simplify our test, however, by taking tar out of the picture.
Instead of extracting the archive and checking for the non-presence of
files, check if the file has a size of 10KB and contains only NULs.
This makes t5004 pass on NetBSD and OpenBSD.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5004: ignore pax global header fileRené Scharfe Thu, 9 May 2013 13:10:48 +0000 (15:10 +0200)

t5004: ignore pax global header file

Versions of tar that don't know pax headers -- like the ones in NetBSD 6
and OpenBSD 5.2 -- extract them as regular files. Explicitly ignore the
file created for our global header when checking the list of extracted
files, as this is normal and harmless fall-back behaviour. This fixes
test 3 of t5004 on these platforms.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mergetools/kdiff3: do not use --auto when diffingDavid Aguilar Thu, 9 May 2013 09:13:28 +0000 (02:13 -0700)

mergetools/kdiff3: do not use --auto when diffing

The `kdiff3 --auto` help message is, "No GUI if all conflicts are auto-
solvable." This flag was carried over from the original mergetool
commands. diff_cmd() is for two-way comparisons only so remove the
superfluous flag.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

transport-helper: trivial style cleanupFelipe Contreras Thu, 9 May 2013 01:16:56 +0000 (20:16 -0500)

transport-helper: trivial style cleanup

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'tr/remote-tighten-commandline-parsing... Junio C Hamano Fri, 3 May 2013 22:12:38 +0000 (15:12 -0700)

Merge branch 'tr/remote-tighten-commandline-parsing' into maint

* tr/remote-tighten-commandline-parsing:
remote: 'show' and 'prune' can take more than one remote
remote: check for superfluous arguments in 'git remote add'
remote: add a test for extra arguments, according to docs

Merge branch 'jn/glossary-revision' into maintJunio C Hamano Fri, 3 May 2013 22:12:16 +0000 (15:12 -0700)

Merge branch 'jn/glossary-revision' into maint

* jn/glossary-revision:
glossary: a revision is just a commit

completion: zsh: don't override suffix on _detaultFelipe Contreras Fri, 3 May 2013 21:35:50 +0000 (16:35 -0500)

completion: zsh: don't override suffix on _detault

zsh is smart enough to add the right suffix while completing, there's no
point in trying to do the same as bash.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/git-commit: Typo under --editAnders Granskogen Bjørnstad Thu, 2 May 2013 18:24:15 +0000 (20:24 +0200)

Documentation/git-commit: Typo under --edit

-C takes a commit object, not a file.

Signed-off-by: Anders Granskogen Bjørnstad <andersgb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'fc/zsh-completion' into maintJunio C Hamano Mon, 29 Apr 2013 16:52:18 +0000 (09:52 -0700)

Merge branch 'fc/zsh-completion' into maint

* fc/zsh-completion:
complete: zsh: use zsh completion for the main cmd
complete: zsh: trivial simplification

complete: zsh: use zsh completion for the main cmdFelipe Contreras Sat, 27 Apr 2013 20:34:06 +0000 (15:34 -0500)

complete: zsh: use zsh completion for the main cmd

So that we can have a nice zsh completion output:

% git <tab>
add -- add file contents to the index
bisect -- find by binary search the change that introduced a bug
branch -- list, create, or delete branches
checkout -- checkout a branch or paths to the working tree
clone -- clone a repository into a new directory
commit -- record changes to the repository
diff -- show changes between commits, commit and working tree, etc
fetch -- download objects and refs from another repository
grep -- print lines matching a pattern
init -- create an empty Git repository or reinitialize an existing one
log -- show commit logs
merge -- join two or more development histories together
mv -- move or rename a file, a directory, or a symlink
pull -- fetch from and merge with another repository or a local branch
push -- update remote refs along with associated objects
rebase -- forward-port local commits to the updated upstream head
reset -- reset current HEAD to the specified state
rm -- remove files from the working tree and from the index
show -- show various types of objects
status -- show the working tree status
tag -- create, list, delete or verify a tag object signed with GPG

And other niceties, like 'git --git-dir=<tab>' showing only directories.

For the rest, the bash completion stuff is still used.

Also, add my copyright, since this more than a thin wrapper.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

complete: zsh: trivial simplificationFelipe Contreras Sat, 27 Apr 2013 20:34:05 +0000 (15:34 -0500)

complete: zsh: trivial simplification

There should be no functional changes.

The only reason I wrapped this code around a sub-function is because zsh
did the same in it's bashcompinit script in order to declare the special
variable 'words' as hidden, but only in this context.

There's no need for that any more since we access __git_main directly,
so 'words' is not modified, so there's no need for the sub-function.

In zsh mode the array indexes are different though.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-completion.bash: complete branch.*.rebase as booleanRamkumar Ramachandra Mon, 29 Apr 2013 12:49:39 +0000 (18:19 +0530)

git-completion.bash: complete branch.*.rebase as boolean

6fac1b83 (completion: add missing config variables, 2009-06-29) added
"rebase" to the list of completions for "branch.*.*", but forgot to
specify completions for the values that this configuration variable
can take (namely "false" and "true"). Fix this.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-completion.bash: add diff.submodule to config listRamkumar Ramachandra Mon, 29 Apr 2013 12:49:38 +0000 (18:19 +0530)

git-completion.bash: add diff.submodule to config list

c47ef57 (diff: introduce diff.submodule configuration variable,
2012-11-13) introduced the diff.submodule configuration variable, but
forgot to teach git-completion.bash about it. Fix this.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-completion.bash: lexical sorting for diff.statGraph... Ramkumar Ramachandra Mon, 29 Apr 2013 12:49:37 +0000 (18:19 +0530)

git-completion.bash: lexical sorting for diff.statGraphWidth

df44483a (diff --stat: add config option to limit graph width,
2012-03-01) added the option diff.startGraphWidth to the list of
configuration variables in git-completion.bash, but failed to notice
that the list is sorted alphabetically. Move it to its rightful place
in the list.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

documentation: trivial whitespace cleanupsFelipe Contreras Sat, 27 Apr 2013 22:00:07 +0000 (17:00 -0500)

documentation: trivial whitespace cleanups

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/Makefile: remove smoke test targetsJohn Keeping Fri, 26 Apr 2013 17:58:24 +0000 (18:58 +0100)

t/Makefile: remove smoke test targets

Commit d24fbca (Remove Git's support for smoke testing - 2011-12-23)
removed the smoke test support from the test suite but it was
re-added by commit 342e9ef (Introduce a performance testing
framework - 2012-02-17). This appears to be the result of a
mis-rebase, since re-adding the smoke testing infrastructure does
not relate to the subject of that commit.

The current 'smoke' target is broken since the 'harness' script it
uses no longer exists, so just reapply this section of commit d24fbca
and remove all of the smoke testing section in the makefile.

Signed-off-by: John Keeping <john@keeping.me.uk>
Acked-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.8.2.2 v1.8.2.2Junio C Hamano Fri, 26 Apr 2013 18:30:08 +0000 (11:30 -0700)

Git 1.8.2.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jk/a-thread-only-dies-once' into maintJunio C Hamano Fri, 26 Apr 2013 18:25:59 +0000 (11:25 -0700)

Merge branch 'jk/a-thread-only-dies-once' into maint

* jk/a-thread-only-dies-once:
run-command: use thread-aware die_is_recursing routine
usage: allow pluggable die-recursion checks

Merge branch 'jn/gitweb-install-doc' into maintJunio C Hamano Fri, 26 Apr 2013 18:12:48 +0000 (11:12 -0700)

Merge branch 'jn/gitweb-install-doc' into maint

* jn/gitweb-install-doc:
gitweb/INSTALL: GITWEB_CONFIG_SYSTEM is for backward compatibility
gitweb/INSTALL: Simplify description of GITWEB_CONFIG_SYSTEM

Merge branch 'fc/untracked-zsh-prompt' into maintJunio C Hamano Fri, 26 Apr 2013 18:12:30 +0000 (11:12 -0700)

Merge branch 'fc/untracked-zsh-prompt' into maint

* fc/untracked-zsh-prompt:
prompt: fix untracked files for zsh

Merge branch 'jk/receive-pack-deadlocks-with-early... Junio C Hamano Fri, 26 Apr 2013 18:12:17 +0000 (11:12 -0700)

Merge branch 'jk/receive-pack-deadlocks-with-early-failure' into maint

* jk/receive-pack-deadlocks-with-early-failure:
receive-pack: close sideband fd on early pack errors

Merge branch 'jk/chopped-ident' into maintJunio C Hamano Fri, 26 Apr 2013 18:11:51 +0000 (11:11 -0700)

Merge branch 'jk/chopped-ident' into maint

* jk/chopped-ident:
blame: handle broken commit headers gracefully
pretty: handle broken commit headers gracefully
cat-file: print tags raw for "cat-file -p"

Merge branch 'rt/commentchar-fmt-merge-msg' into maintJunio C Hamano Fri, 26 Apr 2013 18:10:47 +0000 (11:10 -0700)

Merge branch 'rt/commentchar-fmt-merge-msg' into maint

* rt/commentchar-fmt-merge-msg:
t6200: avoid path mangling issue on Windows
fmt-merge-msg: use core.commentchar in tag signatures completely
fmt-merge-msg: respect core.commentchar in people credits

Merge branch 'rs/empty-archive' into maintJunio C Hamano Fri, 26 Apr 2013 18:03:31 +0000 (11:03 -0700)

Merge branch 'rs/empty-archive' into maint

* rs/empty-archive:
t5004: fix issue with empty archive test and bsdtar

Merge branch 'pe/pull-rebase-v-q' into maintJunio C Hamano Fri, 26 Apr 2013 18:00:14 +0000 (11:00 -0700)

Merge branch 'pe/pull-rebase-v-q' into maint

* pe/pull-rebase-v-q:
pull: Apply -q and -v options to rebase mode as well

t7409: do not use export X=YTorsten Bögershausen Fri, 26 Apr 2013 09:18:28 +0000 (11:18 +0200)

t7409: do not use export X=Y

The shell syntax "export X=Y A=B" is not understood by all shells.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-hg-hg-git.sh: do not use export X=YTorsten Bögershausen Fri, 26 Apr 2013 09:17:43 +0000 (11:17 +0200)

test-hg-hg-git.sh: do not use export X=Y

The shell syntax "export X=Y" is not understood by all shells.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-hg-bidi.sh: do not use export X=YTorsten Bögershausen Fri, 26 Apr 2013 09:17:56 +0000 (11:17 +0200)

test-hg-bidi.sh: do not use export X=Y

The shell syntax "export X=Y A=B" is not understood by all shells.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t9501: do not use export X=YTorsten Bögershausen Fri, 26 Apr 2013 09:18:07 +0000 (11:18 +0200)

t9501: do not use export X=Y

The shell syntax "export X=Y" is not understood by all shells.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t9020: do not use export X=YTorsten Bögershausen Fri, 26 Apr 2013 09:18:16 +0000 (11:18 +0200)

t9020: do not use export X=Y

The shell syntax "export X=Y" is not understood by all shells.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.8.2.2Junio C Hamano Wed, 24 Apr 2013 23:22:07 +0000 (16:22 -0700)

Update draft release notes to 1.8.2.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jk/diff-algo-finishing-touches' into... Junio C Hamano Wed, 24 Apr 2013 23:17:13 +0000 (16:17 -0700)

Merge branch 'jk/diff-algo-finishing-touches' into maint

"git diff --diff-algorithm=algo" was understood by the command line
parser, but "git diff --diff-algorithm algo" was not.

* jk/diff-algo-finishing-touches:
diff: allow unstuck arguments with --diff-algorithm
git-merge(1): document diff-algorithm option to merge-recursive

Merge branch 'sr/log-SG-no-textconv' into maintJunio C Hamano Wed, 24 Apr 2013 23:15:44 +0000 (16:15 -0700)

Merge branch 'sr/log-SG-no-textconv' into maint

"git log -S/-G" started paying attention to textconv filter, but
there was no way to disable this. Make it honor --no-textconv
option.

* sr/log-SG-no-textconv:
diffcore-pickaxe: unify code for log -S/-G
diffcore-pickaxe: fix leaks in "log -S<block>" and "log -G<pattern>"
diffcore-pickaxe: port optimization from has_changes() to diff_grep()
diffcore-pickaxe: respect --no-textconv
diffcore-pickaxe: remove fill_one()
diffcore-pickaxe: remove unnecessary call to get_textconv()

Merge branch 'jc/merge-tag-object' into maintJunio C Hamano Wed, 24 Apr 2013 23:14:06 +0000 (16:14 -0700)

Merge branch 'jc/merge-tag-object' into maint

"git merge $(git rev-parse v1.8.2)" behaved quite differently from
"git merge v1.8.2", as if v1.8.2 were written as v1.8.2^0 and did
not pay much attention to the annotated tag payload. Make the code
notice the type of the tag object, in addition to the dwim_ref()
based classification the current code uses (i.e. the name appears in
refs/tags/) to decide when to special case merging of tags.

* jc/merge-tag-object:
t6200: test message for merging of an annotated tag
t6200: use test_config/test_unconfig
merge: a random object may not necssarily be a commit

completion: remove duplicate block for "git commit -c"Mårten Kongstad Wed, 24 Apr 2013 20:49:06 +0000 (22:49 +0200)

completion: remove duplicate block for "git commit -c"

Remove one of two consecutive, identical blocks for "git commit -c".

This was caused by a mechanical mismerge at d931e2fb252e (Merge
branch 'mp/complete-paths', 2013-02-08). The side branch wanted to
add this block at fea16b47 but the same fix was done independently
at 685397585 already.

Signed-off-by: Mårten Kongstad <marten.kongstad@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote: 'show' and 'prune' can take more than one remoteThomas Rast Wed, 24 Apr 2013 13:54:37 +0000 (15:54 +0200)

remote: 'show' and 'prune' can take more than one remote

The 'git remote show' and 'prune' subcommands are documented as taking
only a single remote name argument, but that is not the case; they
will simply iterate the action over all remotes given. Update the
documentation and tests to match.

With the last user of the -f flag gone, we also remove the code
supporting it.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote: check for superfluous arguments in 'git remote... Thomas Rast Wed, 24 Apr 2013 13:54:36 +0000 (15:54 +0200)

remote: check for superfluous arguments in 'git remote add'

The 'git remote add' subcommand did not check for superfluous command
line arguments. Make it so.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote: add a test for extra arguments, according to... Thomas Rast Wed, 24 Apr 2013 13:54:35 +0000 (15:54 +0200)

remote: add a test for extra arguments, according to docs

This adds one test or comment for each subcommand of git-remote
according to its current documentation. All but 'set-branches' and
'update' are listed as taking only a fixed number of arguments; for
those we can write a test with one more (bogus) argument, and see if
the command notices that.

They fail on several counts: 'add' does not check for extra arguments,
and 'show' and 'prune' actually iterate over remotes (i.e., take any
number of args). We'll fix them in the next two patches.

The -f machinery is only there to make the tests readable while still
ensuring they pass as a whole, and will be removed in the final patch.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cherry-pick/revert: make usage say '<commit-ish>...'Kevin Bracey Mon, 22 Apr 2013 15:57:37 +0000 (18:57 +0300)

cherry-pick/revert: make usage say '<commit-ish>...'

The usage string for cherry-pick and revert has never been updated to
reflect their ability to handle multiple commits. Other documentation is
already correct.

Signed-off-by: Kevin Bracey <kevin@bracey.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Start preparing for 1.8.2.2Junio C Hamano Mon, 22 Apr 2013 18:32:58 +0000 (11:32 -0700)

Start preparing for 1.8.2.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'ta/glossary' into maintJunio C Hamano Mon, 22 Apr 2013 18:26:58 +0000 (11:26 -0700)

Merge branch 'ta/glossary' into maint

* 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

Merge branch 'jk/doc-http-backend' into maintJunio C Hamano Mon, 22 Apr 2013 18:26:58 +0000 (11:26 -0700)

Merge branch 'jk/doc-http-backend' into maint

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

Merge branch 'jk/test-trash' into maintJunio C Hamano Mon, 22 Apr 2013 18:26:58 +0000 (11:26 -0700)

Merge branch 'jk/test-trash' into maint

* jk/test-trash:
t/test-lib.sh: drop "$test" variable
t/test-lib.sh: fix TRASH_DIRECTORY handling

Merge branch 'jk/daemon-user-doc' into maintJunio C Hamano Mon, 22 Apr 2013 18:26:58 +0000 (11:26 -0700)

Merge branch 'jk/daemon-user-doc' into maint

* jk/daemon-user-doc:
doc: clarify that "git daemon --user=<user>" option does not export HOME=~user

Merge branch 'jc/detached-head-doc' into maintJunio C Hamano Mon, 22 Apr 2013 18:26:57 +0000 (11:26 -0700)

Merge branch 'jc/detached-head-doc' into maint

* jc/detached-head-doc:
glossary: extend "detached HEAD" description

Conflicts:
Documentation/glossary-content.txt

Merge branch 'jk/show-branch-strbuf' into maintJunio C Hamano Mon, 22 Apr 2013 18:26:57 +0000 (11:26 -0700)

Merge branch 'jk/show-branch-strbuf' into maint

* jk/show-branch-strbuf:
show-branch: use strbuf instead of static buffer

Merge branch 'js/rerere-forget-protect-against-NUL... Junio C Hamano Mon, 22 Apr 2013 18:26:56 +0000 (11:26 -0700)

Merge branch 'js/rerere-forget-protect-against-NUL' into maint

* js/rerere-forget-protect-against-NUL:
rerere forget: do not segfault if not all stages are present
rerere forget: grok files containing NUL

Merge branch 'jc/apply-ws-fix-tab-in-indent' into maintJunio C Hamano Mon, 22 Apr 2013 18:26:56 +0000 (11:26 -0700)

Merge branch 'jc/apply-ws-fix-tab-in-indent' into maint

* jc/apply-ws-fix-tab-in-indent:
test: resurrect q_to_tab
apply --whitespace=fix: avoid running over the postimage buffer

Merge branch 'ap/combine-diff-ignore-whitespace' into... Junio C Hamano Mon, 22 Apr 2013 18:26:56 +0000 (11:26 -0700)

Merge branch 'ap/combine-diff-ignore-whitespace' into maint

* ap/combine-diff-ignore-whitespace:
Allow combined diff to ignore white-spaces

Merge branch 'jk/suppress-clang-warning' into maintJunio C Hamano Mon, 22 Apr 2013 18:26:55 +0000 (11:26 -0700)

Merge branch 'jk/suppress-clang-warning' into maint

* jk/suppress-clang-warning:
fix clang -Wtautological-compare with unsigned enum

Merge branch 'tr/perl-keep-stderr-open' into maintJunio C Hamano Mon, 22 Apr 2013 18:26:55 +0000 (11:26 -0700)

Merge branch 'tr/perl-keep-stderr-open' into maint

* tr/perl-keep-stderr-open:
t9700: do not close STDERR
perl: redirect stderr to /dev/null instead of closing

Merge branch 'lf/bundle-with-tip-wo-message' into maintJunio C Hamano Mon, 22 Apr 2013 18:26:55 +0000 (11:26 -0700)

Merge branch 'lf/bundle-with-tip-wo-message' into maint

* lf/bundle-with-tip-wo-message:
bundle: Accept prerequisites without commit messages

Merge branch 'jk/filter-branch-come-back-to-original... Junio C Hamano Mon, 22 Apr 2013 18:26:55 +0000 (11:26 -0700)

Merge branch 'jk/filter-branch-come-back-to-original' into maint

* jk/filter-branch-come-back-to-original:
filter-branch: return to original dir after filtering

Merge branch 'rr/prompt-revert-head' into maintJunio C Hamano Mon, 22 Apr 2013 18:26:54 +0000 (11:26 -0700)

Merge branch 'rr/prompt-revert-head' into maint

* rr/prompt-revert-head:
bash: teach __git_ps1 about REVERT_HEAD

glossary: a revision is just a commitJonathan Nieder Sun, 21 Apr 2013 08:17:05 +0000 (01:17 -0700)

glossary: a revision is just a commit

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>

prompt: fix untracked files for zshFelipe Contreras Sun, 21 Apr 2013 22:00:16 +0000 (15:00 -0700)

prompt: fix untracked files for zsh

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>

receive-pack: close sideband fd on early pack errorsJeff King Fri, 19 Apr 2013 21:24:29 +0000 (17:24 -0400)

receive-pack: close sideband fd on early pack errors

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>

t6200: avoid path mangling issue on WindowsJohannes Sixt Thu, 18 Apr 2013 06:42:25 +0000 (08:42 +0200)

t6200: avoid path mangling issue on Windows

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>

remote-hg: fix commit messagesFelipe Contreras Thu, 18 Apr 2013 06:06:31 +0000 (01:06 -0500)

remote-hg: fix commit messages

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>

gitweb/INSTALL: GITWEB_CONFIG_SYSTEM is for backward... Jonathan Nieder Tue, 16 Apr 2013 22:26:00 +0000 (15:26 -0700)

gitweb/INSTALL: GITWEB_CONFIG_SYSTEM is for backward compatibility

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.

blame: handle broken commit headers gracefullyRené Scharfe Wed, 17 Apr 2013 18:33:54 +0000 (20:33 +0200)

blame: handle broken commit headers gracefully

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>

pretty: handle broken commit headers gracefullyRené Scharfe Wed, 17 Apr 2013 18:33:35 +0000 (20:33 +0200)

pretty: handle broken commit headers gracefully

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>

cat-file: print tags raw for "cat-file -p"Jeff King Wed, 17 Apr 2013 21:00:48 +0000 (17:00 -0400)

cat-file: print tags raw for "cat-file -p"

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>

run-command: use thread-aware die_is_recursing routineJeff King Tue, 16 Apr 2013 19:50:07 +0000 (15:50 -0400)

run-command: use thread-aware die_is_recursing routine

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>

usage: allow pluggable die-recursion checksJeff King Tue, 16 Apr 2013 19:46:22 +0000 (15:46 -0400)

usage: allow pluggable die-recursion checks

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>

help.c: add a compatibility comment to cmd_version()David Aguilar Tue, 16 Apr 2013 20:33:25 +0000 (13:33 -0700)

help.c: add a compatibility comment to cmd_version()

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>

read_revisions_from_stdin: make copies for handle_revis... Thomas Rast Tue, 16 Apr 2013 09:57:45 +0000 (11:57 +0200)

read_revisions_from_stdin: make copies for handle_revision_arg

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>

glossary: improve definitions of refspec and pathspecThomas Ackermann Mon, 15 Apr 2013 17:50:07 +0000 (19:50 +0200)

glossary: improve definitions of refspec and pathspec

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>

The name of the hash function is "SHA-1", not "SHA1"Thomas Ackermann Mon, 15 Apr 2013 17:49:04 +0000 (19:49 +0200)

The name of the hash function is "SHA-1", not "SHA1"

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>

glossary: improve description of SHA-1 related topicsThomas Ackermann Mon, 15 Apr 2013 17:47:50 +0000 (19:47 +0200)

glossary: improve description of SHA-1 related topics

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>

glossary: remove outdated/misleading/irrelevant entriesThomas Ackermann Mon, 15 Apr 2013 17:46:56 +0000 (19:46 +0200)

glossary: remove outdated/misleading/irrelevant entries

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb/INSTALL: Simplify description of GITWEB_CONFIG_S... Jakub Narębski Fri, 12 Apr 2013 22:20:48 +0000 (00:20 +0200)

gitweb/INSTALL: Simplify description of GITWEB_CONFIG_SYSTEM

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>

t/test-lib.sh: drop "$test" variableJeff King Sun, 14 Apr 2013 19:38:21 +0000 (15:38 -0400)

t/test-lib.sh: drop "$test" variable

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>

t/test-lib.sh: fix TRASH_DIRECTORY handlingJohn Keeping Sun, 14 Apr 2013 16:34:56 +0000 (17:34 +0100)

t/test-lib.sh: fix TRASH_DIRECTORY handling

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>

doc/http-backend: match query-string in apache half... Jeff King Sat, 13 Apr 2013 03:33:36 +0000 (23:33 -0400)

doc/http-backend: match query-string in apache half-auth example

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>

Merge branch 'rr/test-3200-style' into maintJunio C Hamano Fri, 12 Apr 2013 20:41:48 +0000 (13:41 -0700)

Merge branch 'rr/test-3200-style' into maint

* rr/test-3200-style:
t3200 (branch): modernize style

Conflicts:
t/t3200-branch.sh

Merge branch 'mg/texinfo-5' into maintJunio C Hamano Fri, 12 Apr 2013 20:41:48 +0000 (13:41 -0700)

Merge branch 'mg/texinfo-5' into maint

* mg/texinfo-5:
Documentation: Strip texinfo anchors to avoid duplicates

Merge branch 'jk/diffcore-break-divzero' into maintJunio C Hamano Fri, 12 Apr 2013 20:41:47 +0000 (13:41 -0700)

Merge branch 'jk/diffcore-break-divzero' into maint

* jk/diffcore-break-divzero:
diffcore-break: don't divide by zero

Merge branch 'cn/commit-amend-doc' into maintJunio C Hamano Fri, 12 Apr 2013 20:41:47 +0000 (13:41 -0700)

Merge branch 'cn/commit-amend-doc' into maint

* cn/commit-amend-doc:
Documentation/git-commit: reword the --amend explanation

Merge branch 'jk/bisect-prn-unsigned' into maintJunio C Hamano Fri, 12 Apr 2013 20:41:46 +0000 (13:41 -0700)

Merge branch 'jk/bisect-prn-unsigned' into maint

* jk/bisect-prn-unsigned:
bisect: avoid signed integer overflow

Merge branch 'jk/no-more-self-assignment' into maintJunio C Hamano Fri, 12 Apr 2013 20:41:46 +0000 (13:41 -0700)

Merge branch 'jk/no-more-self-assignment' into maint

* jk/no-more-self-assignment:
match-trees: simplify score_trees() using tree_entry()
submodule: clarify logic in show_submodule_summary

Merge branch 'rr/send-email-perl-critique' into maintJunio C Hamano Fri, 12 Apr 2013 20:41:46 +0000 (13:41 -0700)

Merge branch 'rr/send-email-perl-critique' into maint

* 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

Merge branch 'jc/t5516-pushInsteadOf-vs-pushURL' into... Junio C Hamano Fri, 12 Apr 2013 20:41:45 +0000 (13:41 -0700)

Merge branch 'jc/t5516-pushInsteadOf-vs-pushURL' into maint

* jc/t5516-pushInsteadOf-vs-pushURL:
t5516: test interaction between pushURL and pushInsteadOf correctly

Correct common spelling mistakes in comments and testsStefano Lattarini Thu, 11 Apr 2013 22:36:10 +0000 (00:36 +0200)

Correct common spelling mistakes in comments and tests

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>