gitweb.git
remote-hg: fix bad state issueFelipe Contreras Thu, 11 Apr 2013 12:23:14 +0000 (07:23 -0500)

remote-hg: fix bad state issue

The problem reportedly happened after doing a push that fails, the abort
causes the state of remote-hg to go bad, this happens because
remote-hg's marks are not stored, but 'git fast-export' marks are.

Ensure that the marks are _always_ stored.

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

remote-hg: add 'insecure' optionSimon Ruderich Thu, 11 Apr 2013 12:23:13 +0000 (07:23 -0500)

remote-hg: add 'insecure' option

If set to true acts as hg's clone/pull --insecure option.

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

remote-hg: add simple mail testFelipe Contreras Thu, 11 Apr 2013 12:23:12 +0000 (07:23 -0500)

remote-hg: add simple mail test

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

remote-hg: add basic author testsFelipe Contreras Thu, 11 Apr 2013 12:23:11 +0000 (07:23 -0500)

remote-hg: add basic author tests

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

remote-hg: show more proper errorsFelipe Contreras Thu, 11 Apr 2013 12:23:10 +0000 (07:23 -0500)

remote-hg: show more proper errors

When cloning or pushing fails, we don't want to show a stack-trace.

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

remote-hg: force remote pushFelipe Contreras Thu, 11 Apr 2013 12:23:09 +0000 (07:23 -0500)

remote-hg: force remote push

Ideally we shouldn't do this, as it's not recommended in mercurial
documentation, but there's no other way to push multiple bookmarks (on
the same branch), which would be the behavior most similar to git.

At the same time, add a configuration option for the people that don't
want to risk creating new remote heads.

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

remote-hg: push to the appropriate branchDusty Phillips Thu, 11 Apr 2013 12:23:08 +0000 (07:23 -0500)

remote-hg: push to the appropriate branch

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

remote-hg: update tags globallyFelipe Contreras Thu, 11 Apr 2013 12:23:07 +0000 (07:23 -0500)

remote-hg: update tags globally

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

remote-hg: update remote bookmarksFelipe Contreras Thu, 11 Apr 2013 12:23:06 +0000 (07:23 -0500)

remote-hg: update remote bookmarks

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

remote-hg: refactor exportFelipe Contreras Thu, 11 Apr 2013 12:23:05 +0000 (07:23 -0500)

remote-hg: refactor export

No functional changes.

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

remote-hg: split bookmark handlingFelipe Contreras Thu, 11 Apr 2013 12:23:04 +0000 (07:23 -0500)

remote-hg: split bookmark handling

Will be useful for remote bookmarks.

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

remote-hg: redirect buggy mercurial outputFelipe Contreras Thu, 11 Apr 2013 12:23:03 +0000 (07:23 -0500)

remote-hg: redirect buggy mercurial output

Mercurial emits messages like "searching for changes", "no changes
found", etc. meant for the use of its own UI layer, which break the pipe
between transport helper and remote helper.

Since there's no way to silence Mercurial, let's redirect to standard
error.

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

remote-hg: trivial test cleanupsFelipe Contreras Thu, 11 Apr 2013 12:23:02 +0000 (07:23 -0500)

remote-hg: trivial test cleanups

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

remote-hg: make sure fake bookmarks are updatedFelipe Contreras Thu, 11 Apr 2013 12:23:01 +0000 (07:23 -0500)

remote-hg: make sure fake bookmarks are updated

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

remote-hg: fix for files with spacesPeter van Zetten Thu, 11 Apr 2013 12:23:00 +0000 (07:23 -0500)

remote-hg: fix for files with spaces

Set the maximum number of splits to make when dividing the diff stat
lines based on space characters.

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

remote-hg: properly report errors on bookmark pushesFelipe Contreras Thu, 11 Apr 2013 12:22:59 +0000 (07:22 -0500)

remote-hg: properly report errors on bookmark pushes

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

remote-hg: add missing config variable in docDusty Phillips Thu, 11 Apr 2013 12:22:58 +0000 (07:22 -0500)

remote-hg: add missing config variable in doc

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

remote-hg: trivial cleanupsFelipe Contreras Thu, 11 Apr 2013 12:22:57 +0000 (07:22 -0500)

remote-hg: trivial cleanups

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

cherry-pick: make sure all input objects are commitsMiklos Vajna Thu, 11 Apr 2013 13:06:52 +0000 (15:06 +0200)

cherry-pick: make sure all input objects are commits

When a single argument was a non-commit, the error message used to be:

fatal: BUG: expected exactly one commit from walk

For multiple arguments, when none of the arguments was a commit, the error was:

fatal: empty commit set passed

Finally, when some of the arguments were non-commits, we ignored those
arguments. Fix this bug and make sure all arguments are commits, and
for the first non-commit, error out with:

fatal: <name>: Can't cherry-pick a <type>

Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

count-objects: add -H option to humanize sizesAntoine Pelisse Wed, 10 Apr 2013 19:03:24 +0000 (21:03 +0200)

count-objects: add -H option to humanize sizes

Use the new humanize() function to print loose objects size, pack size,
and garbage size in verbose mode, or loose objects size in regular mode.
This patch doesn't change the way anything is displayed when the option
is not used.

Also update the documentation.

Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

strbuf: create strbuf_humanise_bytes() to show byte... Antoine Pelisse Wed, 10 Apr 2013 19:03:23 +0000 (21:03 +0200)

strbuf: create strbuf_humanise_bytes() to show byte sizes

Humanization of downloaded size is done in the same function as text
formatting in 'process.c'. The code cannot be reused easily elsewhere.

Separate text formatting from size simplification and make the
function public in strbuf so that it can easily be used by other
callers.

We now can use strbuf_humanise_bytes() for both downloaded size and
download speed calculation. One of the drawbacks is that speed will
now look like this when download is stalled: "0 bytes/s" instead of
"0 KiB/s".

Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5004: fix issue with empty archive test and bsdtarRené Scharfe Wed, 10 Apr 2013 17:00:20 +0000 (19:00 +0200)

t5004: fix issue with empty archive test and bsdtar

bsdtar, which is the default tar on Mac OS X, handles empty archives
just fine but reports archives containing only a pax extended header
comment as damaged. Work around the issue by explicitly generating
the archive for the tree and not the commit, which causes git archive
to omit the commit hash comment record from the tar file.

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

http-backend: respect GIT_NAMESPACE with dumb clientsJohn Koleszar Wed, 10 Apr 2013 00:55:08 +0000 (17:55 -0700)

http-backend: respect GIT_NAMESPACE with dumb clients

Filter the list of refs returned via the dumb HTTP protocol according
to the active namespace, consistent with other clients of the
upload-pack service.

Signed-off-by: John Koleszar <jkoleszar@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/README: --immediate skips cleanup commands for failed... Simon Ruderich Tue, 9 Apr 2013 21:48:36 +0000 (23:48 +0200)

t/README: --immediate skips cleanup commands for failed tests

Signed-off-by: Simon Ruderich <simon@ruderich.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

checkout: abbreviate hash in suggest_reattachKevin Bracey Mon, 8 Apr 2013 15:53:42 +0000 (18:53 +0300)

checkout: abbreviate hash in suggest_reattach

After printing the list of left-behind commits (with abbreviated
hashes), use an abbreviated hash in the suggested 'git branch' command;
there's no point in outputting a full 40-character hex string in some
friendly advice.

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

remote-bzr: improve tag handlingFelipe Contreras Mon, 8 Apr 2013 18:36:39 +0000 (13:36 -0500)

remote-bzr: improve tag handling

revision_history() is deprecated and doesn't do what we want (revno
instead of dotted_revno?).

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

remote-bzr: fix utf-8 support for fetchingChristophe Simonis Mon, 8 Apr 2013 18:36:38 +0000 (13:36 -0500)

remote-bzr: fix utf-8 support for fetching

The previous patches didn't deal with all the scenarios.

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

Revert 4b7f53da7618 (simplify-merges: drop merge from... Junio C Hamano Mon, 8 Apr 2013 20:10:27 +0000 (13:10 -0700)

Revert 4b7f53da7618 (simplify-merges: drop merge from irrelevant side branch, 2013-01-17)

Kevin Bracey reports that the change regresses a case shown in the
user manual.

Trading one fix with another breakage is not worth it. Just keep
the test to document the existing breakage, and revert the change
for now.

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

merge-tree: don't print entries that match "local"John Keeping Sun, 7 Apr 2013 21:07:51 +0000 (22:07 +0100)

merge-tree: don't print entries that match "local"

The documentation says:

the output from the command omits entries that match the
<branch1> tree.

But currently "added in branch1" and "removed in branch1" (both while
unchanged in branch2) do print output. Change this so that the
behaviour matches the documentation.

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

Sync with 1.8.2.1Junio C Hamano Sun, 7 Apr 2013 22:28:50 +0000 (15:28 -0700)

Sync with 1.8.2.1

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

Git 1.8.2.1 v1.8.2.1Junio C Hamano Sun, 7 Apr 2013 22:27:23 +0000 (15:27 -0700)

Git 1.8.2.1

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

bundle: Accept prerequisites without commit messagesLukas Fleischer Sun, 7 Apr 2013 11:53:15 +0000 (13:53 +0200)

bundle: Accept prerequisites without commit messages

While explicitly stating that the commit message in a prerequisite
line is optional, we required all lines with 40 or more characters
to contain a space after the object name, bailing out if a line
consisted of an object name only. This was to allow bundling a
history to a commit without an message, but the code forgot that it
already called rtrim() to remove that whitespace.

As a workaround, only check for SP when the line has more than 40
characters.

Signed-off-by: Lukas Fleischer <git@cryptocrack.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.8.3Junio C Hamano Sun, 7 Apr 2013 21:40:26 +0000 (14:40 -0700)

Update draft release notes to 1.8.3

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

Merge branch 'jk/rm-removed-paths'Junio C Hamano Sun, 7 Apr 2013 21:33:14 +0000 (14:33 -0700)

Merge branch 'jk/rm-removed-paths'

A handful of test cases and a corner case bugfix for "git rm".

* jk/rm-removed-paths:
t3600: document failure of rm across symbolic links
t3600: test behavior of reverse-d/f conflict
rm: do not complain about d/f conflicts during deletion

Merge branch 'tb/shared-perm'Junio C Hamano Sun, 7 Apr 2013 21:33:11 +0000 (14:33 -0700)

Merge branch 'tb/shared-perm'

Simplifies adjust_shared_perm() implementation.

* tb/shared-perm:
path.c: optimize adjust_shared_perm()
path.c: simplify adjust_shared_perm()

Merge branch 'cn/commit-amend-doc'Junio C Hamano Sun, 7 Apr 2013 21:33:06 +0000 (14:33 -0700)

Merge branch 'cn/commit-amend-doc'

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

Merge branch 'fc/remote-helpers-test-updates'Junio C Hamano Sun, 7 Apr 2013 21:33:02 +0000 (14:33 -0700)

Merge branch 'fc/remote-helpers-test-updates'

* fc/remote-helpers-test-updates:
remote-hg: fix hg-git test-case
remote-bzr: remove stale check code for tests
remote-helpers: fix the run of all tests
remote-bzr: avoid echo -n

Merge branch 'mg/texinfo-5'Junio C Hamano Sun, 7 Apr 2013 21:32:59 +0000 (14:32 -0700)

Merge branch 'mg/texinfo-5'

Strip @anchor elements in the texinfo output of the documentation,
as a single document created by concatenating our entire manual set
will produce many duplicates that makes newer texinfo unhappy.

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

Merge branch 'jk/diffcore-break-divzero'Junio C Hamano Sun, 7 Apr 2013 21:32:57 +0000 (14:32 -0700)

Merge branch 'jk/diffcore-break-divzero'

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

Merge branch 'jk/bisect-prn-unsigned'Junio C Hamano Sun, 7 Apr 2013 21:32:54 +0000 (14:32 -0700)

Merge branch 'jk/bisect-prn-unsigned'

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

Merge branch 'rr/triangle'Junio C Hamano Sun, 7 Apr 2013 21:32:50 +0000 (14:32 -0700)

Merge branch 'rr/triangle'

Support "pull from one place, push to another place" workflow
better by introducing remote.pushdefault (overrides the "origin"
thing) and branch.*.pushremote (overrides the branch.*.remote).

* rr/triangle:
remote.c: introduce branch.<name>.pushremote
remote.c: introduce remote.pushdefault
remote.c: introduce a way to have different remotes for fetch/push
t5516 (fetch-push): drop implicit arguments from helper functions
t5516 (fetch-push): update test description
remote.c: simplify a bit of code using git_config_string()

Merge branch 'mm/status-during-revert'Junio C Hamano Sun, 7 Apr 2013 21:32:03 +0000 (14:32 -0700)

Merge branch 'mm/status-during-revert'

"git status" learned to report that you are in the middle of a
revert session, just like it does for a cherry-pick and a bisect
session.

* mm/status-during-revert:
status: show commit sha1 in "You are currently reverting" message
status: show 'revert' state and status hint

Merge branch 'jk/set-upstream-error-cases'Junio C Hamano Sun, 7 Apr 2013 21:31:08 +0000 (14:31 -0700)

Merge branch 'jk/set-upstream-error-cases'

The handing by "git branch --set-upstream-to" against various forms
of errorneous inputs were suboptimal.

* jk/set-upstream-error-cases:
branch: give advice when tracking start-point is missing
branch: mention start_name in set-upstream error messages
branch: improve error message for missing --set-upstream-to ref
branch: factor out "upstream is not a branch" error messages
t3200: test --set-upstream-to with bogus refs

Merge branch 'jk/filter-branch-come-back-to-original'Junio C Hamano Sun, 7 Apr 2013 21:29:34 +0000 (14:29 -0700)

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

When used with "-d temporary-directory" option, "git filter-branch"
failed to come back to the original working tree to perform the
final clean-up procedure.

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

format-patch: trivial cleanupsFelipe Contreras Sun, 7 Apr 2013 17:46:24 +0000 (12:46 -0500)

format-patch: trivial cleanups

Now that the cover-letter code has been shuffled, we can do some
cleanups.

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

format-patch: add format.coverLetter configuration... Felipe Contreras Sun, 7 Apr 2013 17:46:23 +0000 (12:46 -0500)

format-patch: add format.coverLetter configuration variable

Also, add a new option: 'auto', so if there's more than one patch, the
cover letter is generated, otherwise it's not.

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

log: update to OPT_BOOLFelipe Contreras Sun, 7 Apr 2013 17:46:22 +0000 (12:46 -0500)

log: update to OPT_BOOL

OPT_BOOLEAN is deprecated, and this is what we want.

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

format-patch: refactor branch name calculationFelipe Contreras Sun, 7 Apr 2013 17:46:21 +0000 (12:46 -0500)

format-patch: refactor branch name calculation

By moving the part that relies on rev->pending earlier, where we are
already checking the special case where there's only one ref.

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

format-patch: improve head calculation for cover-letterFelipe Contreras Sun, 7 Apr 2013 17:46:20 +0000 (12:46 -0500)

format-patch: improve head calculation for cover-letter

If we do it after the revision traversal we can be sure that this is
indeed a commit that will be processed (i.e. not a merge) and it's the
top most one (thus removing the NEEDSWORK comment, at least we show the
same as 'git diff --stat' output that appears in the cover-letter).

While we are at it, since we know there's nothing to generate, exit
sooner in all cases, like --cover-letter currently does.

Also, if there's nothing to generate and cover-letter is specified, a
different code-path might be triggered that is not currently covered in
the test-case, so add a test for it.

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

Sync with 1.8.1.6Junio C Hamano Sun, 7 Apr 2013 16:10:11 +0000 (09:10 -0700)

Sync with 1.8.1.6

fmt-merge-msg: use core.commentchar in tag signatures... Ralf Thielow Sun, 7 Apr 2013 15:25:44 +0000 (17:25 +0200)

fmt-merge-msg: use core.commentchar in tag signatures completely

Commit eff80a9 (Allow custom "comment char") introduced a custom
comment character for commit messages but didn't use it completely
in the tag signature part.

This commit fixes that.

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fmt-merge-msg: respect core.commentchar in people creditsRalf Thielow Sun, 7 Apr 2013 15:25:43 +0000 (17:25 +0200)

fmt-merge-msg: respect core.commentchar in people credits

Commit eff80a9 (Allow custom "comment char") introduced a custom
comment character for commit messages but forgot to use it in
people credits which can be a part of a commit message.

With this commit, the custom comment character is also used
in people credits.

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.8.1.6 v1.8.1.6Junio C Hamano Sun, 7 Apr 2013 15:58:30 +0000 (08:58 -0700)

Git 1.8.1.6

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

Merge branch 'jc/directory-attrs-regression-fix' into... Junio C Hamano Sun, 7 Apr 2013 15:45:03 +0000 (08:45 -0700)

Merge branch 'jc/directory-attrs-regression-fix' into maint-1.8.1

A pattern "dir" (without trailing slash) in the attributes file
stopped matching a directory "dir" by mistake with an earlier change
that wanted to allow pattern "dir/" to also match.

* jc/directory-attrs-regression-fix:
t: check that a pattern without trailing slash matches a directory
dir.c::match_pathname(): pay attention to the length of string parameters
dir.c::match_pathname(): adjust patternlen when shifting pattern
dir.c::match_basename(): pay attention to the length of string parameters
attr.c::path_matches(): special case paths that end with a slash
attr.c::path_matches(): the basename is part of the pathname

remote-helpers/test-bzr.sh: do not use "grep '\s'"Torsten Bögershausen Sun, 7 Apr 2013 08:48:30 +0000 (10:48 +0200)

remote-helpers/test-bzr.sh: do not use "grep '\s'"

Using grep "devel\s\+3:" to find at least one whitspace is not
portable on all grep versions; not all grep versions understand "\s"
as a "whitespace".

Use a literal TAB followed by SPACE.

The + as a qualifier for "one or more" is not a basic regular
expression; use egrep instead of grep.

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

send-email: make annotate configurableFelipe Contreras Sun, 7 Apr 2013 07:10:27 +0000 (01:10 -0600)

send-email: make annotate configurable

Some people always do --annotate, lets not force them to always type
that.

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

gitremote-helpers(1): clarify refspec behaviourJohn Keeping Sat, 6 Apr 2013 18:13:41 +0000 (19:13 +0100)

gitremote-helpers(1): clarify refspec behaviour

The documentation says that "If no 'refspec' capability is advertised,
there is an implied `refspec *:*`" but this is only the case for the
"import" command.

Since there is a comment in transport-helper.c indicating that this
default is for historical reasons, change the documentation to clarify
that a refspec should always be specified.

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

fast-export: Allow pruned-references in mark fileAntoine Pelisse Sat, 6 Apr 2013 17:04:31 +0000 (19:04 +0200)

fast-export: Allow pruned-references in mark file

fast-export can fail because of some pruned-reference when importing a
mark file.

The problem happens in the following scenario:

$ git fast-export --export-marks=MARKS master
(rewrite master)
$ git prune
$ git fast-export --import-marks=MARKS master

This might fail if some references have been removed by prune
because some marks will refer to no longer existing commits.
git-fast-export will not need these objects anyway as they were no
longer reachable.

We still need to update last_numid so we don't change the mapping
between marks and objects for remote-helpers.
Unfortunately, the mark file should not be rewritten without lost marks
if no new objects has been exported, as we could lose track of the last
last_numid.

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

remote-bzr: add utf-8 support for pushingFelipe Contreras Sat, 6 Apr 2013 03:49:23 +0000 (21:49 -0600)

remote-bzr: add utf-8 support for pushing

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

remote-bzr: add utf-8 support for fetchingTimotheus Pokorra Sat, 6 Apr 2013 03:49:22 +0000 (21:49 -0600)

remote-bzr: add utf-8 support for fetching

[fc: added tests]

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

remote-bzr: avoid unreferred tagsFelipe Contreras Sat, 6 Apr 2013 03:49:21 +0000 (21:49 -0600)

remote-bzr: avoid unreferred tags

They have no content, there's nothing we can do with them.

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

remote-bzr: only update workingtree on local reposFelipe Contreras Sat, 6 Apr 2013 03:49:20 +0000 (21:49 -0600)

remote-bzr: only update workingtree on local repos

Apparently, that's the only way it's possible.

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

remote-bzr: set author if availableDavid Engster Sat, 6 Apr 2013 03:49:19 +0000 (21:49 -0600)

remote-bzr: set author if available

[fc: added tests]

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

remote-bzr: remove files before modificationsChristophe Simonis Sat, 6 Apr 2013 03:49:18 +0000 (21:49 -0600)

remote-bzr: remove files before modifications

Allow re-add of a deleted file in the same commit.

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

remote-bzr: fix directory renamingChristophe Simonis Sat, 6 Apr 2013 03:49:17 +0000 (21:49 -0600)

remote-bzr: fix directory renaming

Git does not handle directories, renaming a directory is renaming every
files in this directory.

[fc: added tests]

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

show-branch: use strbuf instead of static bufferJeff King Fri, 5 Apr 2013 21:15:50 +0000 (17:15 -0400)

show-branch: use strbuf instead of static buffer

When we generate relative names (e.g., "master~20^2"), we
format the name into a static buffer, then xstrdup the
result to attach it to the commit. Since the first thing we
add into the static buffer is the already-computed name of
the child commit, the names may get longer and longer as
the traversal gets deeper, and we may eventually overflow
the fixed-size buffer.

Fix this by converting the fixed-size buffer into a dynamic
strbuf. The performance implications should be minimal, as
we end up allocating a heap copy of the name anyway (and now
we can just detach the heap copy from the strbuf).

Reported-by: Eric Roman <eroman@chromium.org>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http: drop http_error functionJeff King Fri, 5 Apr 2013 22:22:31 +0000 (18:22 -0400)

http: drop http_error function

This function is a single-liner and is only called from one
place. Just inline it, which makes the code more obvious.

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

remote-curl: die directly with http error messagesJeff King Fri, 5 Apr 2013 22:22:15 +0000 (18:22 -0400)

remote-curl: die directly with http error messages

When we encounter an unknown http error (e.g., a 403), we
hand the error code to http_error, which then prints it with
error(). After that we die with the redundant message "HTTP
request failed".

Instead, let's just drop http_error entirely, which does
nothing but pass arguments to error(), and instead die
directly with a useful message.

So before:

$ git clone https://example.com/repo.git
Cloning into 'repo'...
error: unable to access 'https://example.com/repo.git': The requested URL returned error: 403 Forbidden
fatal: HTTP request failed

and after:

$ git clone https://example.com/repo.git
Cloning into 'repo'...
fatal: unable to access 'https://example.com/repo.git': The requested URL returned error: 403 Forbidden

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

http: re-word http error messageJeff King Fri, 5 Apr 2013 22:22:01 +0000 (18:22 -0400)

http: re-word http error message

When we report an http error code, we say something like:

error: The requested URL reported failure: 403 Forbidden while accessing http://example.com/repo.git

Everything between "error:" and "while" is written by curl,
and the resulting sentence is hard to read (especially
because there is no punctuation between curl's sentence and
the remainder of ours). Instead, let's re-order this to give
better flow:

error: unable to access 'http://example.com/repo.git: The requested URL reported failure: 403 Forbidden

This is still annoyingly long, but at least reads more
clearly left to right.

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

http: simplify http_error helper functionJeff King Fri, 5 Apr 2013 22:21:34 +0000 (18:21 -0400)

http: simplify http_error helper function

This helper function should really be a one-liner that
prints an error message, but it has ended up unnecessarily
complicated:

1. We call error() directly when we fail to start the curl
request, so we must later avoid printing a duplicate
error in http_error().

It would be much simpler in this case to just stuff the
error message into our usual curl_errorstr buffer
rather than printing it ourselves. This means that
http_error does not even have to care about curl's exit
value (the interesting part is in the errorstr buffer
already).

2. We return the "ret" value passed in to us, but none of
the callers actually cares about our return value. We
can just drop this entirely.

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

remote-curl: consistently report repo url for http... Jeff King Fri, 5 Apr 2013 22:21:14 +0000 (18:21 -0400)

remote-curl: consistently report repo url for http errors

When we report http errors in fetching the initial ref
advertisement, we show the full URL we attempted to use,
including "info/refs?service=git-upload-pack". While this
may be useful for debugging a broken server, it is
unnecessarily verbose and confusing for most cases, in which
the client user is not even the same person as the owner of
the repository.

Let's just show the repository URL; debugging can happen
with GIT_CURL_VERBOSE, which shows way more useful
information, anyway.

At the same time, let's also make sure to mention the
repository URL when we report failed authentication
(previously we said only "Authentication failed"). Knowing
the URL can help the user realize why authentication failed
(e.g., they meant to push to remote A, not remote B).

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

remote-curl: always show friendlier 404 messageJeff King Fri, 5 Apr 2013 22:20:43 +0000 (18:20 -0400)

remote-curl: always show friendlier 404 message

When we get an http 404 trying to get the initial list of
refs from the server, we try to be helpful and remind the
user that update-server-info may need to be run. This looks
like:

$ git clone https://github.com/non/existent
Cloning into 'existent'...
fatal: https://github.com/non/existent/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?

Suggesting update-server-info may be a good suggestion for
users who are in control of the server repo and who are
planning to set up dumb http. But for users of smart http,
and especially users who are not in control of the server
repo, the advice is useless and confusing.

Since most people are expected to use smart http these days,
it does not make sense to keep the update-server-info hint.

We not only drop the mention of update-server-info, but also
show only the main repo URL, not the full "info/refs" and
service parameter. These elements may be useful for
debugging a broken server configuration, but in the majority
of cases, users are not fetching from their own
repositories, but rather from other people's repositories;
they have neither the power nor interest to fix a broken
configuration, and the extra components just make the
message more confusing. Users who do want to debug can and
should use GIT_CURL_VERBOSE to get more complete information
on the actual URLs visited.

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

remote-curl: let servers override http 404 adviceJeff King Fri, 5 Apr 2013 22:17:40 +0000 (18:17 -0400)

remote-curl: let servers override http 404 advice

When we get an http 404 trying to get the initial list of
refs from the server, we try to be helpful and remind the
user that update-server-info may need to be run. This looks
like:

$ git clone https://github.com/non/existent
Cloning into 'existent'...
fatal: https://github.com/non/existent/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?

Suggesting update-server-info may be a good suggestion for
users who are in control of the server repo and who are
planning to set up dumb http. But for users of smart http,
and especially users who are not in control of the server
repo, the advice is useless and confusing.

The previous patch taught remote-curl to show custom advice
from the server when it is available. When we have shown
messages from the server, we can also drop our custom
advice; what the server has to say is likely to be more
accurate and helpful.

We not only drop the mention of update-server-info, but also
show only the main repo URL, not the full "info/refs" and
service parameter. These elements may be useful for
debugging a broken server configuration, but again, anything
the server has provided is likely to be more useful (and one
can still use GIT_CURL_VERBOSE to get much more complete
debugging information).

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

remote-curl: show server content on http errorsJeff King Fri, 5 Apr 2013 22:17:23 +0000 (18:17 -0400)

remote-curl: show server content on http errors

If an http request to a remote git server fails, we show
only the http response code, or sometimes a custom message
for particular codes. This gives the server no opportunity
to offer a more detailed explanation of the reason for the
failure, or to give extra advice.

This patch teaches remote-curl to record and display the
body content of a failed http response. We only display such
responses when the content-type is advertised as text/plain,
as it is the most likely to look presentable on the user's
terminal (and it is hoped to be a good indication that the
message is intended for git clients, and not for a web
browser).

Each line of the new output is prepended with "remote:".
Example output may look like this (assuming the server is
configured to display such a helpful message):

$ GIT_SMART_HTTP=0 git clone https://example.com/some/repo.git
Cloning into 'repo'...
remote: Sorry, fetching via dumb http is forbidden.
remote: Please upgrade your git client to v1.6.6 or greater
remote: and make sure that smart-http is enabled.
error: The requested URL returned error: 403 while accessing http://localhost:5001/some/repo.git/info/refs
fatal: HTTP request failed

For the sake of simplicity, we only record and display these
errors during the initial fetch of the ref list, as that is
the initial contact with the server and where the most
common, interesting errors happen (and there is already
precedent, as that is the only place we currently massage
http error codes into more helpful messages).

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

http: add HTTP_KEEP_ERROR optionJeff King Fri, 5 Apr 2013 22:14:06 +0000 (18:14 -0400)

http: add HTTP_KEEP_ERROR option

We currently set curl's FAILONERROR option, which means that
any http failures are reported as curl errors, and the
http body content from the server is thrown away.

This patch introduces a new option to http_get_strbuf which
specifies that the body content from a failed http response
should be placed in the destination strbuf, where it can be
accessed by the caller.

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

Update draft release notes to 1.8.3Junio C Hamano Fri, 5 Apr 2013 21:19:57 +0000 (14:19 -0700)

Update draft release notes to 1.8.3

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

Merge branch 'mh/rev-parse-verify-doc'Junio C Hamano Fri, 5 Apr 2013 21:15:20 +0000 (14:15 -0700)

Merge branch 'mh/rev-parse-verify-doc'

"rev-parse --verify" was documented in a misleading way.

* mh/rev-parse-verify-doc:
rev-parse: clarify documentation for the --verify option

Merge branch 'sg/gpg-sig'Junio C Hamano Fri, 5 Apr 2013 21:15:16 +0000 (14:15 -0700)

Merge branch 'sg/gpg-sig'

Teach "merge/pull" to optionally verify and reject commits that are
not signed properly.

* sg/gpg-sig:
pretty printing: extend %G? to include 'N' and 'U'
merge/pull Check for untrusted good GPG signatures
merge/pull: verify GPG signatures of commits being merged
commit.c/GPG signature verification: Also look at the first GPG status line
Move commit GPG signature verification to commit.c

Merge branch 'jl/submodule-deinit'Junio C Hamano Fri, 5 Apr 2013 21:15:13 +0000 (14:15 -0700)

Merge branch 'jl/submodule-deinit'

A finishing touch to the new topic in 1.8.3.

* jl/submodule-deinit:
submodule deinit: clarify work tree removal message

Merge branch 'rr/send-email-perl-critique'Junio C Hamano Fri, 5 Apr 2013 21:14:48 +0000 (14:14 -0700)

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

Update "git send-email" for issues noticed by PerlCritic.

* 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/merge-tag-object'Junio C Hamano Fri, 5 Apr 2013 21:14:41 +0000 (14:14 -0700)

Merge branch 'jc/merge-tag-object'

"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.

This makes 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

path.c: optimize adjust_shared_perm()Torsten Bögershausen Sat, 30 Mar 2013 09:53:47 +0000 (10:53 +0100)

path.c: optimize adjust_shared_perm()

Sometimes the chown() function is called even when not needed (This
can be provoked by running t1301, and adding some debug code).

Save a chmod from 400 to 400, or from 600 to 600 on these files:

.git/info/refs+
.git/objects/info/packs+

Save chmod on directories from 2770 to 2770:

.git/refs
.git/refs/heads
.git/refs/tags

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

path.c: simplify adjust_shared_perm()Torsten Bögershausen Sat, 30 Mar 2013 09:53:32 +0000 (10:53 +0100)

path.c: simplify adjust_shared_perm()

All calls to set_shared_perm() use mode == 0, so simplify the
function.

Because all callers use the macro adjust_shared_perm(path) from
cache.h to call this function, convert it to a proper function,
losing set_shared_perm().

Since path.c has much more functions than just mkpath() these days,
drop the stale comment about it.

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

submodule: print graph output next to submodule logJohn Keeping Fri, 5 Apr 2013 16:12:08 +0000 (17:12 +0100)

submodule: print graph output next to submodule log

When running "git log -p --submodule=log", the submodule log is not
indented by the graph output, although all other lines are. Fix this by
prepending the current line prefix to each line of the submodule log.

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

diff: allow unstuck arguments with --diff-algorithmJohn Keeping Fri, 5 Apr 2013 12:19:14 +0000 (13:19 +0100)

diff: allow unstuck arguments with --diff-algorithm

The argument to --diff-algorithm is mandatory, so there is no reason to
require the argument to be stuck to the option with '='. Change this
for consistency with other Git commands.

Note that this does not change the handling of diff-algorithm in
merge-recursive.c since the primary interface to that is via the -X
option to 'git merge' where the unstuck form does not make sense.

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

git-merge(1): document diff-algorithm option to merge... John Keeping Fri, 5 Apr 2013 11:37:30 +0000 (12:37 +0100)

git-merge(1): document diff-algorithm option to merge-recursive

Commit 07924d4 (diff: Introduce --diff-algorithm command line option
2013-01-16) added diff-algorithm as a parameter to the recursive merge
strategy but did not document it. Do so.

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

glossary: extend "detached HEAD" descriptionJunio C Hamano Fri, 5 Apr 2013 15:19:41 +0000 (08:19 -0700)

glossary: extend "detached HEAD" description

When we introduced the concept of "detached HEAD", we made sure that
commands that operate on the history of the current branch "just
work" in that state. They update the HEAD to point at the new
history without affecting any branch when the HEAD is detached, just
like they update the tip of the "current branch" to point at the new
history when HEAD points at a specific branch.

As this is done as the natural extension for these commands, we did
not, we still do not, and we do not want to repeat "A detached HEAD
is updated without affecting any branch" when describing what each
and every one of these commands that operates "on the current branch"
does.

Add a blanket description to the glossary to cover them instead.
The general principle is that operations to update the branch work
on and affect the HEAD, while operations to update the information
about a branch do not.

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

diffcore-pickaxe: unify code for log -S/-GJeff King Fri, 5 Apr 2013 05:28:10 +0000 (01:28 -0400)

diffcore-pickaxe: unify code for log -S/-G

The logic flow of has_changes() used for "log -S" and diff_grep()
used for "log -G" are essentially the same. See if we have both
sides that could be different in any interesting way, slurp the
contents in core, possibly after applying textconv, inspect the
contents, clean-up and report the result. The only difference
between the two is how "inspect" step works.

Unify this codeflow in a helper, pickaxe_match(), which takes a
callback function that implements the specific "inspect" step.

After removing the common scaffolding code from the existing
has_changes() and diff_grep(), they each becomes such a callback
function suitable for passing to pickaxe_match().

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

diffcore-pickaxe: fix leaks in "log -S<block>" and... Junio C Hamano Fri, 5 Apr 2013 04:03:21 +0000 (21:03 -0700)

diffcore-pickaxe: fix leaks in "log -S<block>" and "log -G<pattern>"

The diff_grep() and has_changes() functions had early return
codepaths for unmerged filepairs, which simply returned 0. When we
taught textconv filter to them, one was ignored and continued to
return early without freeing the result filtered by textconv, and
the other had a failed attempt to fix, which allowed the planned
return value 0 to be overwritten by a bogus call to contains().

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

diffcore-pickaxe: port optimization from has_changes... Junio C Hamano Fri, 5 Apr 2013 03:40:31 +0000 (20:40 -0700)

diffcore-pickaxe: port optimization from has_changes() to diff_grep()

These two functions are called in the same codeflow to implement
"log -S<block>" and "log -G<pattern>", respectively, but the latter
lacked two obvious optimizations the former implemented, namely:

- When a pickaxe limit is not given at all, they should return
without wasting any cycle;

- When both sides of the filepair are the same, and the same
textconv conversion apply to them, return early, as there will be
no interesting differences between the two anyway.

Also release the filespec data once the processing is done (this is
not about leaking memory--it is about releasing data we finished
looking at as early as possible).

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

diffcore-pickaxe: respect --no-textconvSimon Ruderich Fri, 5 Apr 2013 13:16:30 +0000 (15:16 +0200)

diffcore-pickaxe: respect --no-textconv

git log -S doesn't respect --no-textconv:

$ echo '*.txt diff=wrong' > .gitattributes
$ git -c diff.wrong.textconv='xxx' log --no-textconv -Sfoo
error: cannot run xxx: No such file or directory
fatal: unable to read files to diff

Reported-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Simon Ruderich <simon@ruderich.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/git-commit: reword the --amend explanationCarlos Martín Nieto Wed, 3 Apr 2013 13:07:21 +0000 (15:07 +0200)

Documentation/git-commit: reword the --amend explanation

The explanation for 'git commit --amend' talks about preparing a tree
object, which shouldn't be how user-facing documentation talks about
commit.

Reword it to say it works as usual, but replaces the current commit.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t3600: document failure of rm across symbolic linksJeff King Fri, 5 Apr 2013 00:00:09 +0000 (20:00 -0400)

t3600: document failure of rm across symbolic links

If we have a symlink "d" that points to a directory, we
should not be able to remove "d/f". In the normal case,
where "d/f" does not exist in the index, we already disallow
this, as we only remove things that git knows about in the
index. So for something like:

ln -s /outside/repo foo
git add foo
git rm foo/bar

we will properly produce an error (as there is no index
entry for foo/bar). However, if there is an index entry for
the path (e.g., because the movement is due to working tree
changes that have not yet been reflected in the index), we
will happily delete it, even though the path we delete from the
filesystem is not the same as the path in the index.

This patch documents that failure with a test.

While this is a bug, it should not be possible to cause
serious data loss with it. For any path that does not have
an index entry, we will complain and bail. For a path which
does have an index entry, we will do the usual up-to-date
content check. So even if the deleted path in the filesystem
is not the same as the one we are removing from the index,
we do know that they at least have the same content, and
that the content is included in HEAD.

That means the worst case is not the accidental loss of
content, but rather confusion by the user when a copy of a
file another part of the tree is removed. Which makes this
bug a minor and hard-to-trigger annoyance rather than a
data-loss bug (and hence the fix can be saved for a rainy
day when somebody feels like working on it).

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

diffcore-pickaxe: remove fill_one()Jeff King Fri, 5 Apr 2013 00:08:47 +0000 (20:08 -0400)

diffcore-pickaxe: remove fill_one()

fill_one is _almost_ identical to just calling fill_textconv; the
exception is that for the !DIFF_FILE_VALID case, fill_textconv gives us
an empty buffer rather than a NULL one. Since we currently use the NULL
pointer as a signal that the file is not present on one side of the
diff, we must now switch to using DIFF_FILE_VALID to make the same
check.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Simon Ruderich <simon@ruderich.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diffcore-pickaxe: remove unnecessary call to get_textconv()Simon Ruderich Thu, 4 Apr 2013 20:20:29 +0000 (22:20 +0200)

diffcore-pickaxe: remove unnecessary call to get_textconv()

The fill_one() function is responsible for finding and filling the
textconv filter as necessary, and is called by diff_grep() function
that implements "git log -G<pattern>".

The has_changes() function that implements "git log -S<block>" calls
get_textconv() for two sides being compared, before it checks to see
if it was asked to perform the pickaxe limiting. Move the code
around to avoid this wastage.

After has_changes() calls get_textconv() to obtain textconv for both
sides, fill_one() is called to use them.

By adding get_textconv() to diff_grep() and relieving fill_one() of
responsibility to find the textconv filter, we can avoid calling
get_textconv() twice in has_changes().

With this change it's also no longer necessary for fill_one() to
modify the textconv argument, therefore pass a pointer instead of a
pointer to a pointer.

Signed-off-by: Simon Ruderich <simon@ruderich.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t9700: do not close STDERRThomas Rast Thu, 4 Apr 2013 20:41:42 +0000 (22:41 +0200)

t9700: do not close STDERR

Much like the previous patch, this triggered an unrelated bug.
Closing STDERR is not worth it anyway, as we risk writing die() and
such to random files that happen to be subsequently opened on FD 2.
Don't do it.

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

perl: redirect stderr to /dev/null instead of closingThomas Rast Thu, 4 Apr 2013 20:41:41 +0000 (22:41 +0200)

perl: redirect stderr to /dev/null instead of closing

On my system, t9100.1 triggers the following warning:

==352== Syscall param write(buf) points to uninitialised byte(s)
==352== at 0x57119C0: __write_nocancel (in /lib64/libc-2.17.so)
==352== by 0x56AC1D2: _IO_file_write@@GLIBC_2.2.5 (in /lib64/libc-2.17.so)
==352== by 0x56AC0B1: new_do_write (in /lib64/libc-2.17.so)
==352== by 0x56AD3B4: _IO_do_write@@GLIBC_2.2.5 (in /lib64/libc-2.17.so)
==352== by 0x56AD6FE: _IO_file_overflow@@GLIBC_2.2.5 (in /lib64/libc-2.17.so)
==352== by 0x56AE3D8: _IO_default_xsputn (in /lib64/libc-2.17.so)
==352== by 0x56ACAA2: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.17.so)
==352== by 0x5682133: buffered_vfprintf (in /lib64/libc-2.17.so)
==352== by 0x567CE9D: vfprintf (in /lib64/libc-2.17.so)
==352== by 0x5687096: fprintf (in /lib64/libc-2.17.so)
==352== by 0x4E7AC5: vreportf (usage.c:15)
==352== by 0x4E7B14: die_builtin (usage.c:38)

The actual complaint appears to be a bug in the underlying
implementation. What's interesting here is that it is apparently
_triggered_ by closing stderr, which results in (from strace)

write(2, "fatal: Needed a single revision\n", 32) = -1 EBADF (Bad file descriptor)
write(2, "\0", 1) = -1 EBADF (Bad file descriptor)

Closing stderr is a bad idea anyway: there is a very real chance that
we print fatal error messages to some other file that just happens to
be opened on the now-free FD 2. So let's not do that.

As pointed out by Eric Wong (thanks), the initial close needs to go:
die() would again write nowhere if we close STDERR beforehand.

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

Sync with maintJunio C Hamano Thu, 4 Apr 2013 20:03:50 +0000 (13:03 -0700)

Sync with maint

* maint:
mailmap: update Pasky's address
git-remote-mediawiki: new wiki URL in documentation

mailmap: update Pasky's addressJunio C Hamano Thu, 4 Apr 2013 20:03:34 +0000 (13:03 -0700)

mailmap: update Pasky's address

Eric Wong noticed that the address at suse.cz no longer works.
We may want to update in-code addresses as well, but let's do
this first in 'maint'.

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

Merge branch 'nd/index-pack-threaded-fixes' into maintJunio C Hamano Thu, 4 Apr 2013 20:00:41 +0000 (13:00 -0700)

Merge branch 'nd/index-pack-threaded-fixes' into maint

* nd/index-pack-threaded-fixes:
index-pack: guard nr_resolved_deltas reads by lock
index-pack: protect deepest_delta in multithread code