gitweb.git
Merge branch 'rr/column-doc' into maintJunio C Hamano Fri, 19 Jul 2013 17:39:06 +0000 (10:39 -0700)

Merge branch 'rr/column-doc' into maint

* rr/column-doc:
column doc: rewrite documentation for column.ui

Merge branch 'rs/discard-index-discard-array' into... Junio C Hamano Fri, 19 Jul 2013 17:39:01 +0000 (10:39 -0700)

Merge branch 'rs/discard-index-discard-array' into maint

* rs/discard-index-discard-array:
read-cache: free cache in discard_index
read-cache: add simple performance test

Merge branch 'tr/coverage' into maintJunio C Hamano Fri, 19 Jul 2013 17:38:18 +0000 (10:38 -0700)

Merge branch 'tr/coverage' into maint

The test coverage framework was left broken for some time.

* tr/coverage:
coverage: build coverage-untested-functions by default
coverage: set DEFAULT_TEST_TARGET to avoid using prove
coverage: do not delete .gcno files before building
coverage: split build target into compile and test

Documentation: "git reset <tree-ish> <pathspec>" takes... Stefan Beller Fri, 19 Jul 2013 16:26:24 +0000 (18:26 +0200)

Documentation: "git reset <tree-ish> <pathspec>" takes a tree-ish, not tree-sh

Reported-By: Ibrahim M. Ghazal <imgx64@gmail.com>
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.8.3.3 v1.8.3.3Junio C Hamano Mon, 15 Jul 2013 17:39:43 +0000 (10:39 -0700)

Git 1.8.3.3

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

Merge branch 'tr/maint-apply-non-git-patch-parsefix... Junio C Hamano Mon, 15 Jul 2013 17:36:14 +0000 (10:36 -0700)

Merge branch 'tr/maint-apply-non-git-patch-parsefix' into maint

"git apply" parsed patches that add new files, generated by programs
other than Git, incorrectly. This is an old breakage in v1.7.11.

* tr/maint-apply-non-git-patch-parsefix:
apply: carefully strdup a possibly-NULL name

Merge branch 'bc/http-keep-memory-given-to-curl' into... Junio C Hamano Mon, 15 Jul 2013 17:36:01 +0000 (10:36 -0700)

Merge branch 'bc/http-keep-memory-given-to-curl' into maint

Older cURL wanted piece of memory we call it with to be stable, but
we updated the auth material after handing it to a call.

* bc/http-keep-memory-given-to-curl:
http.c: don't rewrite the user:passwd string multiple times

Merge branch 'jk/pull-into-dirty-unborn' into maintJunio C Hamano Mon, 15 Jul 2013 17:35:43 +0000 (10:35 -0700)

Merge branch 'jk/pull-into-dirty-unborn' into maint

"git pull" into nothing trashed "local changes" that were in the
index.

* jk/pull-into-dirty-unborn:
pull: merge into unborn by fast-forwarding from empty tree
pull: update unborn branch tip after index

Merge branch 'fg/submodule-non-ascii-path' into maintJunio C Hamano Mon, 15 Jul 2013 17:35:17 +0000 (10:35 -0700)

Merge branch 'fg/submodule-non-ascii-path' into maint

Many "git submodule" operations did not work on a submodule at a
path whose name is not in ASCII.

* fg/submodule-non-ascii-path:
t7400: test of UTF-8 submodule names pass under Mac OS
handle multibyte characters in name

Merge branch 'fc/sequencer-plug-leak' into maintJunio C Hamano Mon, 15 Jul 2013 17:35:04 +0000 (10:35 -0700)

Merge branch 'fc/sequencer-plug-leak' into maint

"cherry-pick" had a small leak in its error codepath.

* fc/sequencer-plug-leak:
sequencer: avoid leaking message buffer when refusing to create an empty commit
sequencer: remove useless indentation

Merge branch 'mt/send-email-cc-match-fix' into maintJunio C Hamano Mon, 15 Jul 2013 17:34:36 +0000 (10:34 -0700)

Merge branch 'mt/send-email-cc-match-fix' into maint

Logic used by git-send-email to suppress cc mishandled names like "A
U. Thor" <author@example.xz>, where the human readable part needs to
be quoted (the user input may not have the double quotes around the
name, and comparison was done between quoted and unquoted strings).
It also mishandled names that need RFC2047 quoting.

* mt/send-email-cc-match-fix:
send-email: sanitize author when writing From line
send-email: add test for duplicate utf8 name
test-send-email: test for pre-sanitized self name
t/send-email: test suppress-cc=self with non-ascii
t/send-email: add test with quoted sender
send-email: make --suppress-cc=self sanitize input
t/send-email: test suppress-cc=self on cccmd
send-email: fix suppress-cc=self on cccmd
t/send-email.sh: add test for suppress-cc=self

fixup-builtins: retire an old transition helper scriptRamkumar Ramachandra Fri, 28 Jun 2013 15:46:19 +0000 (21:16 +0530)

fixup-builtins: retire an old transition helper script

This script was added in 36e5e70 (Start deprecating "git-command" in
favor of "git command", 2007-06-30) with the intent of aiding the
transition away from dashed forms.

It has already been used to help the transision and served its
purpose, and is no longer very useful for follow-up work, because
the majority of remaining matches it finds are false positives.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.8.3.3Junio C Hamano Wed, 3 Jul 2013 22:43:41 +0000 (15:43 -0700)

Update draft release notes to 1.8.3.3

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

Merge branch 'rr/diffcore-pickaxe-doc' into maintJunio C Hamano Wed, 3 Jul 2013 22:41:17 +0000 (15:41 -0700)

Merge branch 'rr/diffcore-pickaxe-doc' into maint

* rr/diffcore-pickaxe-doc:
diffcore-pickaxe doc: document -S and -G properly
diffcore-pickaxe: make error messages more consistent

Merge branch 'cr/git-work-tree-sans-git-dir' into maintJunio C Hamano Wed, 3 Jul 2013 22:41:05 +0000 (15:41 -0700)

Merge branch 'cr/git-work-tree-sans-git-dir' into maint

* cr/git-work-tree-sans-git-dir:
git.txt: remove stale comment regarding GIT_WORK_TREE

Merge branch 'fc/do-not-use-the-index-in-add-to-index... Junio C Hamano Wed, 3 Jul 2013 22:40:38 +0000 (15:40 -0700)

Merge branch 'fc/do-not-use-the-index-in-add-to-index' into maint

* fc/do-not-use-the-index-in-add-to-index:
read-cache: trivial style cleanups
read-cache: fix wrong 'the_index' usage

Merge branch 'dm/unbash-subtree' into maintJunio C Hamano Wed, 3 Jul 2013 22:39:37 +0000 (15:39 -0700)

Merge branch 'dm/unbash-subtree' into maint

* dm/unbash-subtree:
contrib/git-subtree: Use /bin/sh interpreter instead of /bin/bash

Merge branch 'jc/core-checkstat' into maintJunio C Hamano Wed, 3 Jul 2013 22:39:15 +0000 (15:39 -0700)

Merge branch 'jc/core-checkstat' into maint

* jc/core-checkstat:
deprecate core.statinfo at Git 2.0 boundary

Merge branch 'jc/t5551-posix-sed-bre' into maintJunio C Hamano Wed, 3 Jul 2013 22:37:58 +0000 (15:37 -0700)

Merge branch 'jc/t5551-posix-sed-bre' into maint

* jc/t5551-posix-sed-bre:
t5551: do not use unportable sed '\+'

Merge branch 'vv/help-unknown-ref' into maintJunio C Hamano Wed, 3 Jul 2013 22:37:50 +0000 (15:37 -0700)

Merge branch 'vv/help-unknown-ref' into maint

* vv/help-unknown-ref:
merge: use help_unknown_ref()
help: add help_unknown_ref()

Merge branch 'rs/empty-archive' into maintJunio C Hamano Wed, 3 Jul 2013 22:36:54 +0000 (15:36 -0700)

Merge branch 'rs/empty-archive' into maint

* rs/empty-archive:
t5004: resurrect original empty tar archive test
t5004: avoid using tar for checking emptiness of archive

Conflicts:
t/t5004-archive-corner-cases.sh

Merge branch 'rh/merge-options-doc-fix' into maintJunio C Hamano Wed, 3 Jul 2013 22:36:30 +0000 (15:36 -0700)

Merge branch 'rh/merge-options-doc-fix' into maint

* rh/merge-options-doc-fix:
Documentation/merge-options.txt: restore `-e` option

Merge branch 'an/diff-index-doc' into maintJunio C Hamano Wed, 3 Jul 2013 22:35:55 +0000 (15:35 -0700)

Merge branch 'an/diff-index-doc' into maint

* an/diff-index-doc:
Documentation/diff-index: mention two modes of operation

Merge branch 'cm/gitweb-project-list-persistent-cgi... Junio C Hamano Wed, 3 Jul 2013 22:31:36 +0000 (15:31 -0700)

Merge branch 'cm/gitweb-project-list-persistent-cgi-fix' into maint

"gitweb" forgot to clear a global variable $search_regexp upon each
request, mistakenly carrying over the previous search to a new one
when used as a persistent CGI.

* cm/gitweb-project-list-persistent-cgi-fix:
gitweb: fix problem causing erroneous project list

Merge branch 'ar/wildmatch-foldcase' into maintJunio C Hamano Wed, 3 Jul 2013 22:31:27 +0000 (15:31 -0700)

Merge branch 'ar/wildmatch-foldcase' into maint

The wildmatch engine did not honor WM_CASEFOLD option correctly.

* ar/wildmatch-foldcase:
wildmatch: properly fold case everywhere

Merge branch 'cb/log-follow-with-combined' into maintJunio C Hamano Wed, 3 Jul 2013 22:30:59 +0000 (15:30 -0700)

Merge branch 'cb/log-follow-with-combined' into maint

"git log -c --follow $path" segfaulted upon hitting the commit that
renamed the $path being followed.

* cb/log-follow-with-combined:
fix segfault with git log -c --follow

Merge branch 'rr/die-on-missing-upstream' into maintJunio C Hamano Wed, 3 Jul 2013 22:30:24 +0000 (15:30 -0700)

Merge branch 'rr/die-on-missing-upstream' into maint

When a reflog notation is used for implicit "current branch", we did
not say which branch, and worse said "branch ''".

* rr/die-on-missing-upstream:
sha1_name: fix error message for @{<N>}, @{<date>}
sha1_name: fix error message for @{u}

Merge branch 'maint-1.8.2' into maintJunio C Hamano Wed, 3 Jul 2013 22:27:19 +0000 (15:27 -0700)

Merge branch 'maint-1.8.2' into maint

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

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>

t7500: fix flipped actual/expectAndrew Pimlott Mon, 1 Jul 2013 16:20:36 +0000 (09:20 -0700)

t7500: fix flipped actual/expect

Signed-off-by: Andrew Pimlott <andrew@pimlott.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

lib-rebase: document exec_ in FAKE_LINESAndrew Pimlott Mon, 1 Jul 2013 16:20:35 +0000 (09:20 -0700)

lib-rebase: document exec_ in FAKE_LINES

Signed-off-by: Andrew Pimlott <andrew@pimlott.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Start preparing for 1.8.3.3Junio C Hamano Sun, 30 Jun 2013 22:36:03 +0000 (15:36 -0700)

Start preparing for 1.8.3.3

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

Merge branch 'fc/macos-x-clipped-write' into maintJunio C Hamano Sun, 30 Jun 2013 22:33:40 +0000 (15:33 -0700)

Merge branch 'fc/macos-x-clipped-write' into maint

Mac OS X does not like to write(2) more than INT_MAX number of
bytes; work it around by chopping write(2) into smaller pieces.

* fc/macos-x-clipped-write:
compate/clipped-write.c: large write(2) fails on Mac OS X/XNU

Merge branch 'da/darwin' into maintJunio C Hamano Sun, 30 Jun 2013 22:33:13 +0000 (15:33 -0700)

Merge branch 'da/darwin' into maint

Newer MacOS X encourages the programs to compile and link with their
CommonCrypto, not with OpenSSL.

* da/darwin:
imap-send: eliminate HMAC deprecation warnings on Mac OS X
cache.h: eliminate SHA-1 deprecation warnings on Mac OS X
Makefile: add support for Apple CommonCrypto facility
Makefile: fix default regex settings on Darwin

check-ignore doc: fix broken link to ls-files pageRamkumar Ramachandra Sun, 30 Jun 2013 12:05:28 +0000 (17:35 +0530)

check-ignore doc: fix broken link to ls-files page

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

test: spell 'ls-files --delete' option correctly in... SZEDER Gábor Sun, 30 Jun 2013 10:45:25 +0000 (12:45 +0200)

test: spell 'ls-files --delete' option correctly in test descriptions

The option is spelled '--deleted'.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.8.3.2 v1.8.3.2Junio C Hamano Fri, 28 Jun 2013 21:56:30 +0000 (14:56 -0700)

Git 1.8.3.2

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

configure: fix option help message for --disable-pthreadsStefano Lattarini Fri, 28 Jun 2013 17:19:42 +0000 (19:19 +0200)

configure: fix option help message for --disable-pthreads

The configure option to disable threading is '--disable-pthreads',
not '--without-pthreads'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'nd/clone-connectivity-shortcut' (early... Junio C Hamano Fri, 28 Jun 2013 17:00:00 +0000 (10:00 -0700)

Merge branch 'nd/clone-connectivity-shortcut' (early part) into maint

Cloning with "git clone --depth N" while fetch.fsckobjects (or
transfer.fsckobjects) is set to true did not tell the cut-off points
of the shallow history to the process that validates the objects and
the history received, causing the validation to fail.

* 'nd/clone-connectivity-shortcut' (early part):
fetch-pack: prepare updated shallow file before fetching the pack
clone: let the user know when check_everything_connected is run

Start preparing for 1.8.3.2Junio C Hamano Thu, 27 Jun 2013 21:48:14 +0000 (14:48 -0700)

Start preparing for 1.8.3.2

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

Merge branch 'ks/difftool-dir-diff-copy-fix' into maintJunio C Hamano Thu, 27 Jun 2013 21:38:22 +0000 (14:38 -0700)

Merge branch 'ks/difftool-dir-diff-copy-fix' into maint

* ks/difftool-dir-diff-copy-fix:
difftool --dir-diff: allow changing any clean working tree file

Merge branch 'rr/push-head' into maintJunio C Hamano Thu, 27 Jun 2013 21:38:17 +0000 (14:38 -0700)

Merge branch 'rr/push-head' into maint

* rr/push-head:
push: make push.default = current use resolved HEAD
push: fail early with detached HEAD and current
push: factor out the detached HEAD error message

Merge branch 'fc/show-branch-in-rebase-am' into maintJunio C Hamano Thu, 27 Jun 2013 21:38:16 +0000 (14:38 -0700)

Merge branch 'fc/show-branch-in-rebase-am' into maint

* fc/show-branch-in-rebase-am:
prompt: fix for simple rebase

Merge branch 'tg/maint-zsh-svn-remote-prompt' into... Junio C Hamano Thu, 27 Jun 2013 21:38:14 +0000 (14:38 -0700)

Merge branch 'tg/maint-zsh-svn-remote-prompt' into maint

* tg/maint-zsh-svn-remote-prompt:
prompt: fix show upstream with svn and zsh

Merge branch 'nd/urls-doc-no-file-hyperlink-fix' into... Junio C Hamano Thu, 27 Jun 2013 21:38:12 +0000 (14:38 -0700)

Merge branch 'nd/urls-doc-no-file-hyperlink-fix' into maint

* nd/urls-doc-no-file-hyperlink-fix:
urls.txt: avoid auto converting to hyperlink

Merge branch 'tr/push-no-verify-doc' into maintJunio C Hamano Thu, 27 Jun 2013 21:38:09 +0000 (14:38 -0700)

Merge branch 'tr/push-no-verify-doc' into maint

* tr/push-no-verify-doc:
Document push --no-verify

Merge branch 'rs/commit-m-no-edit' into maintJunio C Hamano Thu, 27 Jun 2013 21:38:07 +0000 (14:38 -0700)

Merge branch 'rs/commit-m-no-edit' into maint

* rs/commit-m-no-edit:
commit: don't start editor if empty message is given with -m

Merge branch 'jc/strbuf-branchname-fix' into maintJunio C Hamano Thu, 27 Jun 2013 21:38:02 +0000 (14:38 -0700)

Merge branch 'jc/strbuf-branchname-fix' into maint

* jc/strbuf-branchname-fix:
strbuf_branchname(): do not double-expand @{-1}~22

Merge branch 'mk/combine-diff-context-horizon-fix'... Junio C Hamano Thu, 27 Jun 2013 21:37:55 +0000 (14:37 -0700)

Merge branch 'mk/combine-diff-context-horizon-fix' into maint

* mk/combine-diff-context-horizon-fix:
combine-diff.c: Fix output when changes are exactly 3 lines apart

Merge branch 'kb/ancestry-path-threedots' into maintJunio C Hamano Thu, 27 Jun 2013 21:37:52 +0000 (14:37 -0700)

Merge branch 'kb/ancestry-path-threedots' into maint

* kb/ancestry-path-threedots:
revision.c: treat A...B merge bases as if manually specified
t6019: demonstrate --ancestry-path A...B breakage

Merge branch 'jk/subtree-do-not-push-if-split-fails... Junio C Hamano Thu, 27 Jun 2013 21:37:44 +0000 (14:37 -0700)

Merge branch 'jk/subtree-do-not-push-if-split-fails' into maint

* jk/subtree-do-not-push-if-split-fails:
contrib/subtree: don't delete remote branches if split fails

Merge branch 'mh/fetch-into-shallow' into maintJunio C Hamano Thu, 27 Jun 2013 21:37:41 +0000 (14:37 -0700)

Merge branch 'mh/fetch-into-shallow' into maint

* mh/fetch-into-shallow:
t5500: add test for fetching with an unknown 'shallow'
upload-pack: ignore 'shallow' lines with unknown obj-ids

Merge branch 'jh/checkout-auto-tracking' into maintJunio C Hamano Thu, 27 Jun 2013 21:37:21 +0000 (14:37 -0700)

Merge branch 'jh/checkout-auto-tracking' into maint

* jh/checkout-auto-tracking:
glossary: Update and rephrase the definition of a remote-tracking branch
branch.c: Validate tracking branches with refspecs instead of refs/remotes/*
t9114.2: Don't use --track option against "svn-remote"-tracking branches
t7201.24: Add refspec to keep --track working
t3200.39: tracking setup should fail if there is no matching refspec.
checkout: Use remote refspecs when DWIMming tracking branches
t2024: Show failure to use refspec when DWIMming remote branch names
t2024: Add tests verifying current DWIM behavior of 'git checkout <branch>'

column doc: rewrite documentation for column.uiRamkumar Ramachandra Tue, 25 Jun 2013 15:54:36 +0000 (21:24 +0530)

column doc: rewrite documentation for column.ui

The configuration option column.ui is very poorly documented, and it is
unclear what the defaults are, and what option can be combined with
what. Rewrite it by splitting up the options into three sections
clearly showing how COL_ENABLED, COL_LAYOUT_MASK, and COL_DENSE work.

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

completion: complete diff --word-diffRamkumar Ramachandra Tue, 18 Jun 2013 19:24:05 +0000 (00:54 +0530)

completion: complete diff --word-diff

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

apply: carefully strdup a possibly-NULL nameThomas Rast Fri, 21 Jun 2013 11:38:00 +0000 (13:38 +0200)

apply: carefully strdup a possibly-NULL name

2901bbe (apply: free patch->{def,old,new}_name fields, 2012-03-21)
cleaned up the memory management of filenames in the patches, but
forgot that find_name_traditional() can return NULL as a way of saying
"I couldn't find a name".

That NULL unfortunately gets passed into xstrdup() next, resulting in
a segfault. Use null_strdup() so as to safely propagate the null,
which will let us emit the correct error message.

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

pull: merge into unborn by fast-forwarding from empty... Thomas Rast Thu, 20 Jun 2013 22:38:28 +0000 (18:38 -0400)

pull: merge into unborn by fast-forwarding from empty tree

The logic for pulling into an unborn branch was originally
designed to be used on a newly-initialized repository
(d09e79c, git-pull: allow pulling into an empty repository,
2006-11-16). It thus did not initially deal with
uncommitted changes in the unborn branch. The case of an
_unstaged_ untracked file was fixed by 4b3ffe5 (pull: do not
clobber untracked files on initial pull, 2011-03-25).
However, it still clobbered existing staged files, both when
the file exists in the merged commit (it will be
overwritten), and when it does not (it will be deleted).

We fix this by doing a two-way merge, where the "current"
side of the merge is an empty tree, and the "target" side is
HEAD (already updated to FETCH_HEAD at this point). This
amounts to claiming that all work in the index was done vs.
an empty tree, and thus all content of the index is
precious.

Note that this use of read-tree just gives us protection
against overwriting index and working tree changes. It will
not actually result in a 3-way merge conflict in the index.
This is fine, as this is a rare situation, and the conflict
would not be interesting anyway (it must, by definition, be
an add/add conflict with the whole content conflicting). And
it makes it simpler for the user to recover, as they have no
HEAD to "git reset" back to.

Reported-by: Stefan Schüßler <mail@stefanschuessler.de>
Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pull: update unborn branch tip after indexJeff King Thu, 20 Jun 2013 22:36:31 +0000 (18:36 -0400)

pull: update unborn branch tip after index

When commit d09e79c taught git to pull into an unborn
branch, it first updated the unborn branch to point at the
pulled commit, and then used read-tree to update the index
and working tree. That ordering made sense, since any
failure of the latter step would be due to filesystem
errors, and one could then recover with "git reset --hard".

Later, commit 4b3ffe5 added extra safety for existing files
in the working tree by asking read-tree to bail out when it
would overwrite such a file. This error mode is much less
"your pull failed due to random errors" and more like "we
reject this pull because it would lose data". In that case,
it makes sense not to update the HEAD ref, just as a regular
rejected merge would do.

This patch reverses the order of the update-ref and
read-tree calls, so that we do not touch the HEAD ref at all if a
merge is rejected. This also means that we would not update
HEAD in case of a transient filesystem error, but those are
presumably less rare (and one can still recover by repeating
the pull, or by accessing FETCH_HEAD directly).

While we're reorganizing the code, we can drop the "exit 1"
from the end of our command chain. We exit immediately
either way, and just calling exit without an argument will
use the exit code from the last command.

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

t7400: test of UTF-8 submodule names pass under Mac OSTorsten Bögershausen Thu, 20 Jun 2013 14:58:48 +0000 (16:58 +0200)

t7400: test of UTF-8 submodule names pass under Mac OS

submodules with names using UTF-8 need core.precomposeunicode true
under Mac OS X, set it in the test case.

Improve the portability:

- Not all shells on all OS may understand literal UTF-8 strings.
- Use a help variable filled by printf, as we do it in e.g. t0050.

"strange names" can be called UTF-8, rephrase the heading.

While at it, unbreak &&-chain in the test, and use test_config.

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

send-email: sanitize author when writing From lineMichael S. Tsirkin Tue, 18 Jun 2013 12:49:26 +0000 (15:49 +0300)

send-email: sanitize author when writing From line

sender is now sanitized, but we didn't sanitize author when checking
whether From: line is needed in the message body.

As a result git started writing duplicate From: lines when author
matched sender and has utf8 characters.

Reported-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

send-email: add test for duplicate utf8 nameMichael S. Tsirkin Tue, 18 Jun 2013 12:49:29 +0000 (15:49 +0300)

send-email: add test for duplicate utf8 name

Verify that author name is not duplicated if it matches sender, even
if it is in utf8 (the test expects a failure that will be fixed in
the next patch).

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http.c: don't rewrite the user:passwd string multiple... Brandon Casey Wed, 19 Jun 2013 02:43:49 +0000 (19:43 -0700)

http.c: don't rewrite the user:passwd string multiple times

Curl older than 7.17 (RHEL 4.X provides 7.12 and RHEL 5.X provides
7.15) requires that we manage any strings that we pass to it as
pointers. So, we really shouldn't be modifying this strbuf after we
have passed it to curl.

Our interaction with curl is currently safe (before or after this
patch) since the pointer that is passed to curl is never invalidated;
it is repeatedly rewritten with the same sequence of characters but
the strbuf functions never need to allocate a larger string, so the
same memory buffer is reused.

This "guarantee" of safety is somewhat subtle and could be overlooked
by someone who may want to add a more complex handling of the username
and password. So, let's stop modifying this strbuf after we have
passed it to curl, but also leave a note to describe the assumptions
that have been made about username/password lifetime and to draw
attention to the code.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

handle multibyte characters in nameFredrik Gustafsson Fri, 14 Jun 2013 00:26:02 +0000 (02:26 +0200)

handle multibyte characters in name

Many "git submodule" operations do not work on a submodule at a path whose
name is not in ASCII.

This is because "git ls-files" is used to find which paths are bound to
submodules to the current working tree, and the output is C-quoted by default
for non ASCII pathnames.

Tell "git ls-files" to not C-quote its output, which is easier than unwrapping
C-quote ourselves.

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

Merge branch 'maint-1.8.2' into maintJunio C Hamano Tue, 11 Jun 2013 21:24:56 +0000 (14:24 -0700)

Merge branch 'maint-1.8.2' into maint

* maint-1.8.2:
t0070 "mktemp to unwritable directory" needs SANITY
pre-push.sample: Make the script executable

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>

Git 1.8.3.1 v1.8.3.1Junio C Hamano Mon, 10 Jun 2013 00:16:20 +0000 (17:16 -0700)

Git 1.8.3.1

Primarily to push out two regression issues that seem to affect many
people, namely, the ".gitignore !directory" bug and "daemon cannot
read from $HOME owned by root" bug.

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

mingw: make mingw_signal return the correct handlerErik Faye-Lund Mon, 10 Jun 2013 05:48:17 +0000 (07:48 +0200)

mingw: make mingw_signal return the correct handler

Returning the SIGALRM handler for SIGINT is not very useful.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jn/config-ignore-inaccessible' into maintJunio C Hamano Mon, 10 Jun 2013 00:06:55 +0000 (17:06 -0700)

Merge branch 'jn/config-ignore-inaccessible' into maint

A git daemon that starts as "root" and then drops privilege often
leaves $HOME set to that of the root user, which is unreadable by
the daemon process, which was diagnosed as a configuration error.

Make per-user configuration files that are inaccessible due to
EACCES as though these files do not exist to avoid this issue, as
the tightening which was originally meant as an additional security
has annoyed enough sysadmins.

* jn/config-ignore-inaccessible:
config: allow inaccessible configuration under $HOME

Merge branch 'kb/status-ignored-optim-2' into maintJunio C Hamano Mon, 10 Jun 2013 00:05:15 +0000 (17:05 -0700)

Merge branch 'kb/status-ignored-optim-2' into maint

Fix recent regression of .gitignore files that list !directory to
mark it not-ignored.

* kb/status-ignored-optim-2:
dir.c: fix ignore processing within not-ignored directories

read-cache: free cache in discard_indexRené Scharfe Sun, 9 Jun 2013 17:39:18 +0000 (19:39 +0200)

read-cache: free cache in discard_index

discard_cache doesn't have to free the array of cache entries, because
the next call of read_cache can simply reuse it, as they all operate on
the global variable the_index.

discard_index on the other hand does have to free it, because it can be
used e.g. with index_state variables on the stack, in which case a
missing free would cause an unrecoverable leak. This patch releases the
memory and removes a comment that was relevant for discard_cache but has
become outdated.

Since discard_cache is just a wrapper around discard_index nowadays, we
lose the optimization that avoids reallocation of that array within
loops of read_cache and discard_cache. That doesn't cause a performance
regression for me, however (HEAD = this patch, HEAD^ = master + p0002):

Test // HEAD^ HEAD
---------------\\-----------------------------------------------------
0002.1: read_ca// 1000 times 0.62(0.58+0.04) 0.61(0.58+0.02) -1.6%

Suggested-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

read-cache: add simple performance testRené Scharfe Sun, 9 Jun 2013 17:39:17 +0000 (19:39 +0200)

read-cache: add simple performance test

Add the helper test-read-cache, which can be used to call read_cache and
discard_cache in a loop as well as a performance check based on it.

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

submodule: remove redundant check for the_index.initializedRené Scharfe Sun, 9 Jun 2013 16:33:45 +0000 (18:33 +0200)

submodule: remove redundant check for the_index.initialized

read_cache already performs the same check and returns immediately if
the cache has already been loaded.

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

Document .git/modulesFredrik Gustafsson Sun, 9 Jun 2013 11:11:36 +0000 (13:11 +0200)

Document .git/modules

A note in the beginning of this document describes the behavior already.
This patch just adds where to find the repositories.

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

gitweb: fix problem causing erroneous project listCharles McGarvey Wed, 5 Jun 2013 04:44:28 +0000 (22:44 -0600)

gitweb: fix problem causing erroneous project list

The bug is manifest when running gitweb in a persistent process (e.g.
FastCGI, PSGI), and it's easy to reproduce. If a gitweb request
includes the searchtext parameter (i.e. s), subsequent requests using
the project_list action--which is the default action--and without
a searchtext parameter will be filtered by the searchtext value of the
first request. This is because the value of the $search_regexp global
(the value of which is based on the searchtext parameter) is currently
being persisted between requests.

Instead, clear $search_regexp before dispatching each request.

Signed-off-by: Charles McGarvey <chazmcgarvey@brokenzipper.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sequencer: avoid leaking message buffer when refusing... Felipe Contreras Thu, 6 Jun 2013 08:58:57 +0000 (03:58 -0500)

sequencer: avoid leaking message buffer when refusing to create an empty commit

We should free objects before leaving.

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

test-send-email: test for pre-sanitized self nameMichael S. Tsirkin Wed, 5 Jun 2013 18:11:08 +0000 (21:11 +0300)

test-send-email: test for pre-sanitized self name

Users can sanitize from address manually.
Verify that these are suppressed properly.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/send-email: test suppress-cc=self with non-asciiMichael S. Tsirkin Wed, 5 Jun 2013 18:11:04 +0000 (21:11 +0300)

t/send-email: test suppress-cc=self with non-ascii

test suppress-cc=self when sender is non-acsii

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/send-email: add test with quoted senderMichael S. Tsirkin Wed, 5 Jun 2013 18:11:02 +0000 (21:11 +0300)

t/send-email: add test with quoted sender

add test where sender address needs to be quoted.
Make sure --suppress-cc=self works well in this case.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

send-email: make --suppress-cc=self sanitize inputMichael S. Tsirkin Wed, 5 Jun 2013 18:11:00 +0000 (21:11 +0300)

send-email: make --suppress-cc=self sanitize input

--suppress-cc=self fails to filter sender address in many cases where it
needs to be sanitized in some way, for example quoted:
"A U. Thor" <author@example.com>
To fix, make send-email sanitize both sender and the address it is
compared against.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/send-email: test suppress-cc=self on cccmdMichael S. Tsirkin Wed, 5 Jun 2013 18:10:57 +0000 (21:10 +0300)

t/send-email: test suppress-cc=self on cccmd

Check that suppress-cc=self works when applied
to output of cccmd.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

send-email: fix suppress-cc=self on cccmdMichael S. Tsirkin Wed, 5 Jun 2013 18:10:55 +0000 (21:10 +0300)

send-email: fix suppress-cc=self on cccmd

When cccmd is used, old-style suppress-from filter
is applied by the newer suppress-cc=self isn't.
Fix this up.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/README: test_must_fail is for testing GitJunio C Hamano Tue, 4 Jun 2013 16:50:12 +0000 (09:50 -0700)

t/README: test_must_fail is for testing Git

When a test wants to make sure there is no <string> in an output
file, we should just say "! grep string output".

"test_must_fail" is there only to test Git command and catch unusual
deaths we know about (e.g. segv) as an error, not as an expected
failure. "test_must_fail grep string output" is unnecessary, as
we are not making sure the system binaries do not dump core or
anything like that.

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

sequencer: remove useless indentationFelipe Contreras Wed, 29 May 2013 03:56:21 +0000 (22:56 -0500)

sequencer: remove useless indentation

By using good ol' goto.

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

diffcore-pickaxe doc: document -S and -G properlyRamkumar Ramachandra Fri, 31 May 2013 12:12:15 +0000 (17:42 +0530)

diffcore-pickaxe doc: document -S and -G properly

The documentation of -S and -G is very sketchy. Completely rewrite the
sections in Documentation/diff-options.txt and
Documentation/gitdiffcore.txt.

References:
52e9578 ([PATCH] Introducing software archaeologist's tool "pickaxe".)
f506b8e (git log/diff: add -G<regexp> that greps in the patch text)

Inputs-from: Phil Hord <phil.hord@gmail.com>
Co-authored-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diffcore-pickaxe: make error messages more consistentRamkumar Ramachandra Fri, 31 May 2013 12:12:14 +0000 (17:42 +0530)

diffcore-pickaxe: make error messages more consistent

Currently, diffcore-pickaxe reports two distinct errors for the same
user error:

$ git log --pickaxe-regex -S'\1'
fatal: invalid pickaxe regex: Invalid back reference

$ git log -G'\1'
fatal: invalid log-grep regex: Invalid back reference

This "log-grep" was only an internal name for the -G feature during
development, and invite confusion with "git log --grep=<pattern>".

Change the error messages to say "invalid regex".

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

git.txt: remove stale comment regarding GIT_WORK_TREEChris Rorvick Fri, 31 May 2013 01:11:41 +0000 (20:11 -0500)

git.txt: remove stale comment regarding GIT_WORK_TREE

Official support for specifying --work-tree/GIT_WORK_TREE without
--git-dir/GIT_DIR was added with v1.7.4-rc3~2^2~2. Update description
of GIT_WORK_TREE to reflect this.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sha1_file: trivial style cleanupFelipe Contreras Thu, 30 May 2013 13:56:21 +0000 (08:56 -0500)

sha1_file: trivial style cleanup

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

read-cache: trivial style cleanupsFelipe Contreras Thu, 30 May 2013 13:56:19 +0000 (08:56 -0500)

read-cache: trivial style cleanups

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

read-cache: fix wrong 'the_index' usageFelipe Contreras Thu, 30 May 2013 13:56:18 +0000 (08:56 -0500)

read-cache: fix wrong 'the_index' usage

We are dealing with the 'istate' index, not 'the_index'.

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

t/send-email.sh: add test for suppress-cc=selfMichael S. Tsirkin Thu, 30 May 2013 07:11:13 +0000 (10:11 +0300)

t/send-email.sh: add test for suppress-cc=self

This adds a basic test for --suppress-cc=self
option of git send-email.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

dir.c: fix ignore processing within not-ignored directoriesKarsten Blees Wed, 29 May 2013 20:32:36 +0000 (22:32 +0200)

dir.c: fix ignore processing within not-ignored directories

As of 95c6f271 "dir.c: unify is_excluded and is_path_excluded APIs", the
is_excluded API no longer recurses into directories that match an ignore
pattern, and returns the directory's ignored state for all contained paths.

This is OK for normal ignore patterns, i.e. ignoring a directory affects
the entire contents recursively.

Unfortunately, this also "works" for negated ignore patterns ('!dir'), i.e.
the entire contents is "not-ignored" recursively, regardless of ignore
patterns that match the contents directly.

In prep_exclude, skip recursing into a directory only if it is really
ignored (i.e. the ignore pattern is not negated).

Signed-off-by: Karsten Blees <blees@dcon.de>
Tested-by: Øystein Walle <oystwa@gmail.com>
Reviewed-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

wildmatch: properly fold case everywhereAnthony Ramine Thu, 30 May 2013 10:19:10 +0000 (12:19 +0200)

wildmatch: properly fold case everywhere

Case folding is not done correctly when matching against the [:upper:]
character class and uppercased character ranges (e.g. A-Z).
Specifically, an uppercase letter fails to match against any of them
when case folding is requested because plain characters in the pattern
and the whole string are preemptively lowercased to handle the base case
fast.

That optimization is kept and ISLOWER() is used in the [:upper:] case
when case folding is requested, while matching against a character range
is retried with toupper() if the character was lowercase, as the bounds
of the range itself cannot be modified (in a case-insensitive context,
[A-_] is not equivalent to [a-_]).

Signed-off-by: Anthony Ramine <n.oxyde@gmail.com>
Reviewed-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sha1_name: fix error message for @{<N>}, @{<date>}Ramkumar Ramachandra Wed, 22 May 2013 10:39:55 +0000 (16:09 +0530)

sha1_name: fix error message for @{<N>}, @{<date>}

Currently, when we try to resolve @{<N>} or @{<date>} when the reflog
doesn't go back far enough, we get errors like:

# on branch master
$ git show @{10000}
fatal: Log for '' only has 7 entries.

$ git show @{10000.days.ago}
warning: Log for '' only goes back to Tue, 21 May 2013 14:14:45 +0530.
...

# detached HEAD case
$ git show @{10000}
fatal: Log for '' only has 2005 entries.

$ git show master@{10000}
fatal: Log for 'master' only has 7 entries.

The empty string '' is confusing and does not convey information
about whose logs we are inspecting. Change this so that we get:

# on branch master
$ git show @{10000}
fatal: Log for 'master' only has 7 entries.

$ git show @{10000.days.ago}
warning: Log for 'master' only goes back to Tue, 21 May 2013 14:14:45 +0530.
...

# detached HEAD case
$ git show @{10000}
fatal: Log for 'HEAD' only has 2005 entries.

$ git show master@{10000}
fatal: Log for 'master' only has 7 entries.

Also one of the message strings given to die() now points into
real_ref that was not used in that fashion, so stop freeing the
underlying storage for it.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Bug-spotted-and-fixed-by: Thomas Rast
Signed-off-by: Junio C Hamano <gitster@pobox.com>

push: make push.default = current use resolved HEADRamkumar Ramachandra Wed, 29 May 2013 19:21:51 +0000 (00:51 +0530)

push: make push.default = current use resolved HEAD

With this change, the output of the push (with push.default set to
current) changes subtly from:

$ git push
...
* [new branch] HEAD -> push-current-head

to:

$ git push
...
* [new branch] push-current-head -> push-current-head

This patch was written with a different motivation. There is a problem
unique to push.default = current:

# on branch push-current-head
$ git push
# on another terminal
$ git checkout master
# return to the first terminal
# the push tried to push master!

This happens because the 'git checkout' on the second terminal races
with the 'git push' on the first terminal. Although this patch does not
solve the core problem (there is still no guarantee that 'git push' on
the first terminal will resolve HEAD before 'git checkout' changes HEAD
on the second), it works in practice.

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

push: fail early with detached HEAD and currentRamkumar Ramachandra Wed, 29 May 2013 19:21:50 +0000 (00:51 +0530)

push: fail early with detached HEAD and current

Setting push.default to current adds the refspec "HEAD" for the
transport layer to handle. If "HEAD" doesn't resolve to a branch (and
since no refspec rhs is specified), the push fails after some time with
a cryptic error message:

$ git push
error: unable to push to unqualified destination: HEAD
The destination refspec neither matches an existing ref on the remote nor
begins with refs/, and we are unable to guess a prefix based on the source ref.
error: failed to push some refs to 'git@github.com:artagnon/git'

Fail early with a nicer error message:

$ git push
fatal: You are not currently on a branch.
To push the history leading to the current (detached HEAD)
state now, use

git push ram HEAD:<name-of-remote-branch>

Just like in the upstream and simple cases.

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

Start 1.8.3.1 maintenance trackJunio C Hamano Wed, 29 May 2013 22:21:15 +0000 (15:21 -0700)

Start 1.8.3.1 maintenance track

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

Merge branch 'maint-1.8.2' into maintJunio C Hamano Wed, 29 May 2013 22:20:36 +0000 (15:20 -0700)

Merge branch 'maint-1.8.2' into maint

* maint-1.8.2:
trivial: Add missing period in documentation

difftool --dir-diff: allow changing any clean working... Kenichi Saita Wed, 29 May 2013 16:01:23 +0000 (01:01 +0900)

difftool --dir-diff: allow changing any clean working tree file

The temporary directory prepared by "difftool --dir-diff" to
show the result of a change can be modified by the user via
the tree diff program, and we try hard not to lose changes
to them after tree diff program returns to us.

However, the set of files to be copied back is computed
differently between --symlinks and --no-symlinks modes. The
former checks all paths that start out as identical to the
working tree file, while the latter checks paths that
already had a local modification in the working tree,
allowing changes made in the tree diff program to paths that
did not have any local change to be lost.

Signed-off-by: Kenichi Saita <nitoyon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>