gitweb.git
First batch for 2.1Junio C Hamano Tue, 3 Jun 2014 19:08:37 +0000 (12:08 -0700)

First batch for 2.1

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

Merge branch 'sk/msvc-dynlink-crt'Junio C Hamano Tue, 3 Jun 2014 19:06:46 +0000 (12:06 -0700)

Merge branch 'sk/msvc-dynlink-crt'

* sk/msvc-dynlink-crt:
MSVC: link dynamically to the CRT

Merge branch 'ew/config-protect-mode'Junio C Hamano Tue, 3 Jun 2014 19:06:46 +0000 (12:06 -0700)

Merge branch 'ew/config-protect-mode'

* ew/config-protect-mode:
config: preserve config file permissions on edits

Merge branch 'bg/strbuf-trim'Junio C Hamano Tue, 3 Jun 2014 19:06:46 +0000 (12:06 -0700)

Merge branch 'bg/strbuf-trim'

* bg/strbuf-trim:
api-strbuf.txt: add docs for _trim and _ltrim
strbuf: use _rtrim and _ltrim in strbuf_trim

Merge branch 'jk/commit-date-approxidate'Junio C Hamano Tue, 3 Jun 2014 19:06:46 +0000 (12:06 -0700)

Merge branch 'jk/commit-date-approxidate'

* jk/commit-date-approxidate:
commit: accept more date formats for "--date"
commit: print "Date" line when the user has set date
pretty: make show_ident_date public
commit: use split_ident_line to compare author/committer

Merge branch 'ep/shell-command-substitution'Junio C Hamano Tue, 3 Jun 2014 19:06:45 +0000 (12:06 -0700)

Merge branch 'ep/shell-command-substitution'

Adjust shell scripts to use $(cmd) instead of `cmd`.

* ep/shell-command-substitution: (41 commits)
t5000-tar-tree.sh: use the $( ... ) construct for command substitution
t4204-patch-id.sh: use the $( ... ) construct for command substitution
t4119-apply-config.sh: use the $( ... ) construct for command substitution
t4116-apply-reverse.sh: use the $( ... ) construct for command substitution
t4057-diff-combined-paths.sh: use the $( ... ) construct for command substitution
t4038-diff-combined.sh: use the $( ... ) construct for command substitution
t4036-format-patch-signer-mime.sh: use the $( ... ) construct for command substitution
t4014-format-patch.sh: use the $( ... ) construct for command substitution
t4013-diff-various.sh: use the $( ... ) construct for command substitution
t4012-diff-binary.sh: use the $( ... ) construct for command substitution
t4010-diff-pathspec.sh: use the $( ... ) construct for command substitution
t4006-diff-mode.sh: use the $( ... ) construct for command substitution
t3910-mac-os-precompose.sh: use the $( ... ) construct for command substitution
t3905-stash-include-untracked.sh: use the $( ... ) construct for command substitution
t1050-large.sh: use the $( ... ) construct for command substitution
t1020-subdirectory.sh: use the $( ... ) construct for command substitution
t1004-read-tree-m-u-wf.sh: use the $( ... ) construct for command substitution
t1003-read-tree-prefix.sh: use the $( ... ) construct for command substitution
t1002-read-tree-m-u-2way.sh: use the $( ... ) construct for command substitution
t1001-read-tree-m-2way.sh: use the $( ... ) construct for command substitution
...

Merge branch 'fc/rerere-conflict-style'Junio C Hamano Tue, 3 Jun 2014 19:06:45 +0000 (12:06 -0700)

Merge branch 'fc/rerere-conflict-style'

* fc/rerere-conflict-style:
rerere: fix for merge.conflictstyle

Merge branch 'dt/api-doc-setup-gently'Junio C Hamano Tue, 3 Jun 2014 19:06:45 +0000 (12:06 -0700)

Merge branch 'dt/api-doc-setup-gently'

* dt/api-doc-setup-gently:
docs: document RUN_SETUP_GENTLY and clarify RUN_SETUP

Merge branch 'fc/mergetool-prompt'Junio C Hamano Tue, 3 Jun 2014 19:06:44 +0000 (12:06 -0700)

Merge branch 'fc/mergetool-prompt'

mergetool.prompt used to default to 'true', always causing a confirmation
"do you really want to run the tool on this path" to be shown.

Among the two purposes the prompt serves, ignore the use case to
confirm that the user wants to view particular path with the named
tool, and make the prompt only to confirm the choice of the tool
made by autodetection and defaulting. For those who configured the
tool explicitly, the prompt shown for the latter purpose is simply
annoying.

Strictly speaking, this is a backward incompatible change and the
users need to explicitly set the variable to 'true' if they want to
resurrect the now-ignored use case.

* fc/mergetool-prompt:
mergetool: document the default for --[no-]prompt
mergetool: run prompt only if guessed tool

Merge branch 'mm/mediawiki-encoding-fix'Junio C Hamano Tue, 3 Jun 2014 19:06:44 +0000 (12:06 -0700)

Merge branch 'mm/mediawiki-encoding-fix'

* mm/mediawiki-encoding-fix:
git-remote-mediawiki: fix encoding issue for UTF-8 media files
git-remote-mediawiki: allow stop/start-ing the test server

Merge branch 'sk/tag-contains-wo-recursion'Junio C Hamano Tue, 3 Jun 2014 19:06:44 +0000 (12:06 -0700)

Merge branch 'sk/tag-contains-wo-recursion'

* sk/tag-contains-wo-recursion:
git tag --contains: avoid stack overflow

Merge branch 'ef/send-email-absolute-path-to-the-command'Junio C Hamano Tue, 3 Jun 2014 19:06:44 +0000 (12:06 -0700)

Merge branch 'ef/send-email-absolute-path-to-the-command'

* ef/send-email-absolute-path-to-the-command:
send-email: windows drive prefix (e.g. C:) appears only at the beginning
send-email: recognize absolute path on Windows

Merge branch 'jx/blame-align-relative-time'Junio C Hamano Tue, 3 Jun 2014 19:06:43 +0000 (12:06 -0700)

Merge branch 'jx/blame-align-relative-time'

"git blame" miscounted number of columns needed to show localized
timestamps, resulting in jaggy left-side-edge of the source code
lines in its output.

* jx/blame-align-relative-time:
blame: dynamic blame_date_width for different locales
blame: fix broken time_buf paddings in relative timestamp

Merge branch 'lr/git-run-setup-gently'Junio C Hamano Tue, 3 Jun 2014 19:06:43 +0000 (12:06 -0700)

Merge branch 'lr/git-run-setup-gently'

* lr/git-run-setup-gently:
git.c: treat RUN_SETUP_GENTLY and RUN_SETUP as mutually exclusive

Merge branch 'fc/mergetools-vimdiff3'Junio C Hamano Tue, 3 Jun 2014 19:06:43 +0000 (12:06 -0700)

Merge branch 'fc/mergetools-vimdiff3'

* fc/mergetools-vimdiff3:
mergetools: add vimdiff3 mode

Merge branch 'fc/merge-default-to-upstream'Junio C Hamano Tue, 3 Jun 2014 19:06:43 +0000 (12:06 -0700)

Merge branch 'fc/merge-default-to-upstream'

"git merge" without argument, even when there is an upstream
defined for the current branch, refused to run until
merge.defaultToUpstream is set to true. Flip the default of that
configuration variable to true.

* fc/merge-default-to-upstream:
merge: enable defaulttoupstream by default

Merge branch 'jk/external-diff-use-argv-array'Junio C Hamano Tue, 3 Jun 2014 19:06:42 +0000 (12:06 -0700)

Merge branch 'jk/external-diff-use-argv-array'

Code clean-up (and a bugfix which has been merged for 2.0).

* jk/external-diff-use-argv-array:
run_external_diff: refactor cmdline setup logic
run_external_diff: hoist common bits out of conditional
run_external_diff: drop fflush(NULL)
run_external_diff: clean up error handling
run_external_diff: use an argv_array for the environment

Merge branch 'sk/svn-parse-datestamp'Junio C Hamano Tue, 3 Jun 2014 19:06:42 +0000 (12:06 -0700)

Merge branch 'sk/svn-parse-datestamp'

* sk/svn-parse-datestamp:
SVN.pm::parse_svn_date: allow timestamps with a single-digit hour

Merge branch 'rs/ref-update-check-errors-early'Junio C Hamano Tue, 3 Jun 2014 19:06:42 +0000 (12:06 -0700)

Merge branch 'rs/ref-update-check-errors-early'

* rs/ref-update-check-errors-early:
commit.c: check for lock error and return early
sequencer.c: check for lock failure and bail early in fast_forward_to

Merge branch 'nd/index-pack-one-fd-per-thread'Junio C Hamano Tue, 3 Jun 2014 19:06:42 +0000 (12:06 -0700)

Merge branch 'nd/index-pack-one-fd-per-thread'

Enable threaded index-pack on platforms without thread-unsafe
pread() emulation.

* nd/index-pack-one-fd-per-thread:
index-pack: work around thread-unsafe pread()

Merge branch 'ym/fix-opportunistic-index-update-race'Junio C Hamano Tue, 3 Jun 2014 19:06:41 +0000 (12:06 -0700)

Merge branch 'ym/fix-opportunistic-index-update-race'

Read-only operations such as "git status" that internally refreshes
the index write out the refreshed index to the disk to optimize
future accesses to the working tree, but this could race with a
"read-write" operation that modify the index while it is running.
Detect such a race and avoid overwriting the index.

Duy raised a good point that we may need to do the same for the
normal writeout codepath, not just the "opportunistic" update
codepath. While that is true, nobody sane would be running two
simultaneous operations that are clearly write-oriented competing
with each other against the same index file. So in that sense that
can be done as a less urgent follow-up for this topic.

* ym/fix-opportunistic-index-update-race:
read-cache.c: verify index file before we opportunistically update it
wrapper.c: add xpread() similar to xread()

Merge branch 'mh/ref-transaction'Junio C Hamano Tue, 3 Jun 2014 19:06:40 +0000 (12:06 -0700)

Merge branch 'mh/ref-transaction'

Update "update-ref --stdin [-z]" and then introduce a transactional
support for (multi-)reference updates.

* mh/ref-transaction: (27 commits)
ref_transaction_commit(): work with transaction->updates in place
struct ref_update: add a type field
struct ref_update: add a lock field
ref_transaction_commit(): simplify code using temporary variables
struct ref_update: store refname as a FLEX_ARRAY
struct ref_update: rename field "ref_name" to "refname"
refs: remove API function update_refs()
update-ref --stdin: reimplement using reference transactions
refs: add a concept of a reference transaction
update-ref --stdin: harmonize error messages
update-ref --stdin: improve the error message for unexpected EOF
t1400: test one mistake at a time
update-ref --stdin -z: deprecate interpreting the empty string as zeros
update-ref.c: extract a new function, parse_next_sha1()
t1400: test that stdin -z update treats empty <newvalue> as zeros
update-ref --stdin: simplify error messages for missing oldvalues
update-ref --stdin: make error messages more consistent
update-ref --stdin: improve error messages for invalid values
update-ref.c: extract a new function, parse_refname()
parse_cmd_verify(): copy old_sha1 instead of evaluating <oldvalue> twice
...

Merge branch 'ks/tree-diff-nway'Junio C Hamano Tue, 3 Jun 2014 19:06:40 +0000 (12:06 -0700)

Merge branch 'ks/tree-diff-nway'

Instead of running N pair-wise diff-trees when inspecting a
N-parent merge, find the set of paths that were touched by walking
N+1 trees in parallel. These set of paths can then be turned into
N pair-wise diff-tree results to be processed through rename
detections and such. And N=2 case nicely degenerates to the usual
2-way diff-tree, which is very nice.

* ks/tree-diff-nway:
mingw: activate alloca
combine-diff: speed it up, by using multiparent diff tree-walker directly
tree-diff: rework diff_tree() to generate diffs for multiparent cases as well
Portable alloca for Git
tree-diff: reuse base str(buf) memory on sub-tree recursion
tree-diff: no need to call "full" diff_tree_sha1 from show_path()
tree-diff: rework diff_tree interface to be sha1 based
tree-diff: diff_tree() should now be static
tree-diff: remove special-case diff-emitting code for empty-tree cases
tree-diff: simplify tree_entry_pathcmp
tree-diff: show_path prototype is not needed anymore
tree-diff: rename compare_tree_entry -> tree_entry_pathcmp
tree-diff: move all action-taking code out of compare_tree_entry()
tree-diff: don't assume compare_tree_entry() returns -1,0,1
tree-diff: consolidate code for emitting diffs and recursion in one place
tree-diff: show_tree() is not needed
tree-diff: no need to pass match to skip_uninteresting()
tree-diff: no need to manually verify that there is no mode change for a path
combine-diff: move changed-paths scanning logic into its own function
combine-diff: move show_log_first logic/action out of paths scanning

Merge branch 'jc/apply-ignore-whitespace'Junio C Hamano Tue, 3 Jun 2014 19:06:40 +0000 (12:06 -0700)

Merge branch 'jc/apply-ignore-whitespace'

"--ignore-space-change" option of "git apply" ignored the
spaces at the beginning of line too aggressively, which is
inconsistent with the option of the same name "diff" and "git diff"
have.

* jc/apply-ignore-whitespace:
apply --ignore-space-change: lines with and without leading whitespaces do not match

Merge branch 'as/grep-fullname-config'Junio C Hamano Tue, 3 Jun 2014 19:06:39 +0000 (12:06 -0700)

Merge branch 'as/grep-fullname-config'

Add a configuration variable to force --full-name to be default for
"git grep".

This may cause regressions on scripted users that do not expect
this new behaviour.

* as/grep-fullname-config:
grep: add grep.fullName config variable

refs.c: change read_ref_at to use the reflog iteratorsRonnie Sahlberg Tue, 3 Jun 2014 16:09:59 +0000 (09:09 -0700)

refs.c: change read_ref_at to use the reflog iterators

read_ref_at has its own parsing of the reflog file for no really good reason
so lets change this to use the existing reflog iterators. This removes one
instance where we manually unmarshall the reflog file format.

Remove the now redundant ref_msg function.

Log messages for errors are changed slightly. We no longer print the file
name for the reflog, instead we refer to it as 'Log for ref <refname>'.
This might be a minor useability regression, but I don't really think so, since
experienced users would know where the log is anyway and inexperienced users
would not know what to do about/how to repair 'Log ... has gap ...' anyway.

Adapt the t1400 test to handle the change in log messages.

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

environment.c: enable core.preloadindex by defaultSteve Hoelzer Mon, 2 Jun 2014 16:43:00 +0000 (11:43 -0500)

environment.c: enable core.preloadindex by default

Many people are on filesystems with horrible stat latency (not
limited to Windows but also NFS), which core.preloadindex was
designed to help. We discussed enabling it by default early in 2013
but didn't.

Per

http://thread.gmane.org/gmane.comp.version-control.git/219273/focus=219322

let's enable the setting by default, with the original choice of max
20 threads / min 500 paths per thread parameters.

Signed-off-by: Steve Hoelzer <shoelzer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

error_resolve_conflict: drop quotations around operationJeff King Tue, 3 Jun 2014 07:23:49 +0000 (03:23 -0400)

error_resolve_conflict: drop quotations around operation

When you try to commit with unmerged entries, you get an
error like:

$ git commit
error: 'commit' is not possible because you have unmerged files.

The quotes around "commit" are clunky; the user doesn't care
that this message is a template with the command-name filled
in. Saying:

error: commit is not possible because you have unmerged files

is easier to read. As this code is called from other places,
we may also end up with:

$ git merge
error: merge is not possible because you have unmerged files

$ git cherry-pick foo
error: cherry-pick is not possible because you have unmerged files

$ git revert foo
error: revert is not possible because you have unmerged files

All of which look better without the quotes. This also
happens to match the behavior of "git pull", which generates
a similar message (but does not share code, as it is a shell
script).

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

error_resolve_conflict: rewrap advice messageJeff King Tue, 3 Jun 2014 07:17:17 +0000 (03:17 -0400)

error_resolve_conflict: rewrap advice message

If you try to commit with unresolved conflicts in the index,
you get this message:

$ git commit
U foo
error: 'commit' is not possible because you have unmerged files.
hint: Fix them up in the work tree,
hint: and then use 'git add/rm <file>' as
hint: appropriate to mark resolution and make a commit,
hint: or use 'git commit -a'.
fatal: Exiting because of an unresolved conflict.

The irregular line-wrapping makes this awkward to read, and
it takes up more lines than necessary. Instead, let's rewrap
it to about 60 characters per line:

$ git commit
U foo
error: 'commit' is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit, or use
hint: 'git commit -a'.
fatal: Exiting because of an unresolved conflict.

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

dir.c:trim_trailing_spaces(): fix for " \ " sequencePasha Bolokhov Mon, 2 Jun 2014 22:36:56 +0000 (15:36 -0700)

dir.c:trim_trailing_spaces(): fix for " \ " sequence

Discard the unnecessary 'nr_spaces' variable, remove 'strlen()' and
improve the 'if' structure. Switch to pointers instead of integers
to control the loop.

Slightly more rare occurrences of 'text \ ' with a backslash
in between spaces are handled correctly. Namely, the code in
7e2e4b37 (dir: ignore trailing spaces in exclude patterns, 2014-02-09)
does not reset 'last_space' when a backslash is encountered and the above
line stays intact as a result.

Add a test at the end of t/t0008-ignores.sh to exhibit this behavior.

Signed-off-by: Pasha Bolokhov <pasha.bolokhov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack-objects: use free()+xcalloc() instead of xrealloc... René Scharfe Sun, 1 Jun 2014 11:07:21 +0000 (13:07 +0200)

pack-objects: use free()+xcalloc() instead of xrealloc()+memset()

Whenever the hash table becomes too small then its size is increased,
the original part (and the added space) is zerod out using memset(),
and the table is rebuilt from scratch.

Simplify this proceess by returning the old memory using free() and
allocating the new buffer using xcalloc(), which already clears the
buffer for us. That way we avoid copying the old hash table contents
needlessly inside xrealloc().

While at it, use the first array member with sizeof instead of a
specific type. The old code used uint32_t and int, while index is
actually an array of int32_t. Their sizes are the same basically
everywhere, so it's not actually a problem, but the new code is
cleaner and doesn't have to be touched should the type be changed.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mailinfo: use strcmp() for string comparisonRené Scharfe Sun, 1 Jun 2014 09:00:40 +0000 (11:00 +0200)

mailinfo: use strcmp() for string comparison

The array header is defined as:

static const char *header[MAX_HDR_PARSED] = {
"From","Subject","Date",
};

When looking for the index of a specfic string in that array, simply
use strcmp() instead of memcmp(). This avoids running over the end of
the string (e.g. with memcmp("Subject", "From", 7)) and gets rid of
magic string length constants.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fix brown paper bag breakage in t5150-request-pull.shJohannes Sixt Mon, 2 Jun 2014 07:06:56 +0000 (09:06 +0200)

fix brown paper bag breakage in t5150-request-pull.sh

The recent addition to the test case 'pull request format' interrupted
the single-quoted text, effectively adding a third argument to the
test_expect_success command. Since we do not have a prerequisite named
"pull request format", the test is skipped, no matter what. Additionally,
the file name argument to the grep command is missing. Fix both issues.

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

sideband.c: do not use ANSI control sequence on non... Michael Naumov Wed, 28 May 2014 03:12:15 +0000 (03:12 +0000)

sideband.c: do not use ANSI control sequence on non-terminal

Diagnostic messages received on the sideband #2 from the server side
are sent to the standard error with ANSI terminal control sequence
"\033[K" that erases to the end of line appended at the end of each
line.

However, some programs (e.g. GitExtensions for Windows) read and
interpret and/or show the message without understanding the terminal
control sequences, resulting them to be shown to their end users.
To help these programs, squelch the control sequence when the
standard error stream is not being sent to a tty.

NOTE: I considered to cover the case that a pager has already been
started. But decided that is probably not worth worrying about here,
though, as we shouldn't be using a pager for commands that do network
communications (and if we do, omitting the magic line-clearing signal
is probably a sane thing to do).

Thanks-to: Erik Faye-Lund <kusmabite@gmail.com>
Thanks-to: Jeff King <peff@peff.net>
Signed-off-by: Michael Naumov <mnaoumov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git log: support "auto" decorationsLinus Torvalds Thu, 29 May 2014 22:19:40 +0000 (15:19 -0700)

git log: support "auto" decorations

This works kind of like "--color=auto" - add decorations for interactive
use, but do not change defaults when scripting or when piping the output
to anything but a terminal.

You can use either

[log]
decorate=auto

in the git config files, or the "--decorate=auto" command line option to
choose this behavior.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

compat/bswap.h: fix endianness detectionBen Walton Fri, 30 May 2014 15:22:40 +0000 (16:22 +0100)

compat/bswap.h: fix endianness detection

The changes to make detection of endianness more portable had a bug
that breaks on (at least) Solaris x86.

The bug appears to be a simple copy/paste typo. It checks for
_BIG_ENDIAN and not _LITTLE_ENDIAN for both the case where we would
decide the system is big endian and little endian. Instead, the
second test should be for _LITTLE_ENDIAN and not _BIG_ENDIAN.

Two fixes were possible:

1. Change the negation order of the conditions in the second test.
2. Reverse the order of the conditions in the second test.

Use the second option so that the condition we expect is always a
positive check.

Signed-off-by: Ben Walton <bdwalton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5538: move http push tests out to t5542Nick Alcock Fri, 30 May 2014 17:36:21 +0000 (13:36 -0400)

t5538: move http push tests out to t5542

As 0232852b, but for the push tests instead: this avoids a start_httpd
in the middle of the file, which fails under GIT_TEST_HTTPD=false.

Note that we have to munge the test in a few ways while
moving it:

1. We drop the `test -z "$GIT_TEST_HTTPD"` check; this is
too simplistic since 83d842d, and we should let
lib-httpd.sh handle it.

2. We have to port over some of the old setup from t5538.

3. In the final test, we no longer expect the extra commit
"1" built on top of "4". This was a side effect from an
earlier test in t5538 which was not ported over.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with 1.9.4Junio C Hamano Fri, 30 May 2014 17:57:52 +0000 (10:57 -0700)

Sync with 1.9.4

Git 1.9.4 v1.9.4Junio C Hamano Wed, 28 May 2014 22:50:22 +0000 (15:50 -0700)

Git 1.9.4

This is expected to be the final maintenance release for 1.9 series,
merging the remaining fixes that are relevant and are already in 2.0.

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

t5537: re-drop http testsJeff King Fri, 30 May 2014 01:34:19 +0000 (21:34 -0400)

t5537: re-drop http tests

These were originally removed by 0232852 (t5537: move
http tests out to t5539, 2014-02-13). However, they were
accidentally re-added in 1ddb4d7 (Merge branch
'nd/upload-pack-shallow', 2014-03-21).

This looks like an error in manual conflict resolution.
Here's what happened:

1. v1.9.0 shipped with the http tests in t5537.

2. We realized that this caused problems, and built
0232852 on top to move the tests to their own file.
This fix made it into v1.9.1.

3. We later had another fix in nd/upload-pack-shallow that
also touched t5537. It was built directly on v1.9.0.

When we merged nd/upload-pack-shallow to master, we got a
conflict; it was built on a version with the http tests, but
we had since removed them. The correct resolution was to
drop the http tests and keep the new ones, but instead we
kept everything.

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

Merge branch 'rh/prompt-pcmode-avoid-eval-on-refname... Junio C Hamano Wed, 28 May 2014 22:46:36 +0000 (15:46 -0700)

Merge branch 'rh/prompt-pcmode-avoid-eval-on-refname' into maint

* rh/prompt-pcmode-avoid-eval-on-refname:
git-prompt.sh: don't assume the shell expands the value of PS1

Merge branch 'mw/symlinks' into maintJunio C Hamano Wed, 28 May 2014 22:45:57 +0000 (15:45 -0700)

Merge branch 'mw/symlinks' into maint

* mw/symlinks:
setup: fix windows path buffer over-stepping
setup: don't dereference in-tree symlinks for absolute paths
setup: add abspath_part_inside_repo() function
t0060: add tests for prefix_path when path begins with work tree
t0060: add test for prefix_path when path == work tree
t0060: add test for prefix_path on symlinks via absolute paths
t3004: add test for ls-files on symlinks via absolute paths

How to keep a project's canonical history correct.Stephen P. Smith Fri, 9 May 2014 06:08:41 +0000 (23:08 -0700)

How to keep a project's canonical history correct.

During the mail thread about "Pull is mostly evil" a user asked how
the first parent could become reversed.

This howto explains how the first parent can get reversed when viewed
by the project and then explains a method to keep the history correct.

Signed-off-by: Stephen P. Smith <ischis2@cox.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 2.0 v2.0.0Junio C Hamano Wed, 28 May 2014 18:04:19 +0000 (11:04 -0700)

Git 2.0

Documentation: wording fixes in the user manual and... Jeremiah Mahler Wed, 28 May 2014 02:23:32 +0000 (19:23 -0700)

Documentation: wording fixes in the user manual and glossary

Re-word the section on "Updating a repository with git fetch" in the
user manual.

Various other minor fixes in the manual and glossary.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

transport-helper.c: rearrange xcalloc argumentsBrian Gesiak Mon, 26 May 2014 15:33:56 +0000 (00:33 +0900)

transport-helper.c: rearrange xcalloc arguments

xcalloc() takes two arguments: the number of elements and their size.
transport_helper_init passes the arguments in reverse order, passing the
size of a helper_data*, followed by the number to allocate.

Rearrange them so they are in the correct order.

Signed-off-by: Brian Gesiak <modocache@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote.c: rearrange xcalloc argumentsBrian Gesiak Mon, 26 May 2014 15:33:55 +0000 (00:33 +0900)

remote.c: rearrange xcalloc arguments

xcalloc() takes two arguments: the number of elements and their size.
parse_refspec_internal passes the arguments in reverse order, passing the
size of a refspec, followed by the number to allocate.

Rearrange them so they are in the correct order.

Signed-off-by: Brian Gesiak <modocache@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

reflog-walk.c: rearrange xcalloc argumentsBrian Gesiak Mon, 26 May 2014 15:33:54 +0000 (00:33 +0900)

reflog-walk.c: rearrange xcalloc arguments

xcalloc() takes two arguments: the number of elements and their size.
reflog-walk.c includes several calls to xcalloc() that pass the arguments
in reverse order.

Rearrange them so they are in the correct order.

Signed-off-by: Brian Gesiak <modocache@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack-revindex.c: rearrange xcalloc argumentsBrian Gesiak Mon, 26 May 2014 15:33:53 +0000 (00:33 +0900)

pack-revindex.c: rearrange xcalloc arguments

xcalloc() takes two arguments: the number of elements and their size.
init_pack_revindex() passes the arguments in reverse order, passing the
size of a pack_revindex, followed by the number to allocate.

Rearrange them so they are in the correct order.

Signed-off-by: Brian Gesiak <modocache@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

notes.c: rearrange xcalloc argumentsBrian Gesiak Mon, 26 May 2014 15:33:52 +0000 (00:33 +0900)

notes.c: rearrange xcalloc arguments

xcalloc() takes two arguments: the number of elements and their size.
notes.c includes several calls to xcalloc() that pass the arguments in
reverse order.

Rearrange them so they are in the correct order.

Signed-off-by: Brian Gesiak <modocache@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

imap-send.c: rearrange xcalloc argumentsBrian Gesiak Mon, 26 May 2014 15:33:51 +0000 (00:33 +0900)

imap-send.c: rearrange xcalloc arguments

xcalloc() takes two arguments: the number of elements and their size.
imap_open_store() passes the arguments in reverse order, passing the
size of an imap_store*, followed by the number to allocate.

Rearrange them so they are in the correct order.

Signed-off-by: Brian Gesiak <modocache@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http-push.c: rearrange xcalloc argumentsBrian Gesiak Mon, 26 May 2014 15:33:50 +0000 (00:33 +0900)

http-push.c: rearrange xcalloc arguments

xcalloc() takes two arguments: the number of elements and their size.
http-push passes the arguments in reverse order, passing the size
of a repo, followed by the number to allocate.

Rearrange them so they are in the correct order.

Signed-off-by: Brian Gesiak <modocache@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff.c: rearrange xcalloc argumentsBrian Gesiak Mon, 26 May 2014 15:33:47 +0000 (00:33 +0900)

diff.c: rearrange xcalloc arguments

xcalloc() takes two arguments: the number of elements and their size.
diffstat_add() passes the arguments in reverse order, passing the
size of a diffstat_file*, followed by the number of diffstat_file* to
be allocated.

Rearrange them so they are in the correct order.

Signed-off-by: Brian Gesiak <modocache@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

config.c: rearrange xcalloc argumentsBrian Gesiak Mon, 26 May 2014 15:33:46 +0000 (00:33 +0900)

config.c: rearrange xcalloc arguments

xcalloc() takes two arguments: the number of elements and their size.
config.c includes several calls to xcalloc() that pass the arguments
in reverse order: the size of a struct lock_file*, followed by the
number to allocate.

Rearrange them so they are in the correct order.

Signed-off-by: Brian Gesiak <modocache@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit.c: rearrange xcalloc argumentsBrian Gesiak Mon, 26 May 2014 15:33:45 +0000 (00:33 +0900)

commit.c: rearrange xcalloc arguments

xcalloc() takes two arguments: the number of elements and their size.
reduce_heads() passes the arguments in reverse order, passing the
size of a commit*, followed by the number of commit* to be allocated.

Rearrange them so they are in the correct order.

Signed-off-by: Brian Gesiak <modocache@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin/remote.c: rearrange xcalloc argumentsBrian Gesiak Mon, 26 May 2014 15:33:44 +0000 (00:33 +0900)

builtin/remote.c: rearrange xcalloc arguments

xcalloc() takes two arguments: the number of elements and their size.
builtin/remote.c includes several calls to xcalloc() that pass the
arguments in reverse order.

Rearrange them so they are in the correct order.

Signed-off-by: Brian Gesiak <modocache@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin/ls-remote.c: rearrange xcalloc argumentsBrian Gesiak Mon, 26 May 2014 15:33:43 +0000 (00:33 +0900)

builtin/ls-remote.c: rearrange xcalloc arguments

xcalloc() takes two arguments: the number of elements and their size.
cmd_ls_remote() passes the arguments in reverse order, passing the
size of a char*, followed by the number of char* to be allocated.

Rearrange them so they are in the correct order.

Signed-off-by: Brian Gesiak <modocache@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

config: respect '~' and '~user' in mailmap.fileØystein Walle Tue, 27 May 2014 08:45:58 +0000 (10:45 +0200)

config: respect '~' and '~user' in mailmap.file

git_config_string() does not handle '~' and '~user' as part of the
value. Using git_config_pathname() fixes this.

Signed-off-by: Øystein Walle <oystwa@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-instaweb: add support for Apache 2.4Jonathan McCrohan Tue, 27 May 2014 01:18:10 +0000 (02:18 +0100)

git-instaweb: add support for Apache 2.4

Detect available Apache MPMs and use first available according to
following order of precedence:
mpm_event
mpm_prefork
mpm_worker

Add authz_core module if available to avoid HTTP Error 500 errors.

Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t9138-git-svn-authors-prog.sh fixupsJeremiah Mahler Sun, 25 May 2014 19:24:54 +0000 (12:24 -0700)

t9138-git-svn-authors-prog.sh fixups

Several fixups of the t9138-git-svn-authors-prog.sh test script to
follow current recommendations in t/README.

- Fixed a Perl script with a full "#!/usr/bin/perl" shebang
to use write_script() and $PERL_PATH as per t/README.

- Placed svn-authors data setup inside a test_expect_success.

- Fixed trailing quotes to use the same indentation throughout.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

format-patch: add "--signature-file=<file>" optionJeremiah Mahler Sat, 24 May 2014 04:08:14 +0000 (21:08 -0700)

format-patch: add "--signature-file=<file>" option

Add an option to format-patch for reading a signature from a file.

$ git format-patch -1 --signature-file=$HOME/.signature

The config variable `format.signaturefile` can also be used to make
this the default.

$ git config format.signaturefile $HOME/.signature

$ git format-patch -1

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: Do not include diff in spec file when just... Maxime Coste Sat, 24 May 2014 17:40:35 +0000 (18:40 +0100)

git-p4: Do not include diff in spec file when just preparing p4

The diff information render the spec file unusable as is by p4,
do not include it when run with --prepare-p4-only so that the
given file can be directly passed to p4.

With --prepare-p4-only, git-p4 already tells the user it can use
p4 submit with the generated spec file. This fails because of the
diff being present in the file. Not including the diff fixes that.

Without --prepare-p4-only, keeping the diff makes sense for a
quick review of the patch before submitting it. And does not cause
problems with p4 as we remove it programmatically.

Signed-off-by: Maxime Coste <frrrwww@gmail.com>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gc --auto: do not lock refs in the backgroundNguyễn Thái Ngọc Duy Sun, 25 May 2014 00:38:29 +0000 (07:38 +0700)

gc --auto: do not lock refs in the background

9f673f9 (gc: config option for running --auto in background -
2014-02-08) puts "gc --auto" in background to reduce user's wait
time. Part of the garbage collecting is pack-refs and pruning
reflogs. These require locking some refs and may abort other processes
trying to lock the same ref. If gc --auto is fired in the middle of a
script, gc's holding locks in the background could fail the script,
which could never happen before 9f673f9.

Keep running pack-refs and "reflog --prune" in foreground to stop
parallel ref updates. The remaining background operations (repack,
prune and rerere) should not impact running git processes.

Reported-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote prune: optimize "dangling symref" check/warningJens Lindström Fri, 23 May 2014 10:30:25 +0000 (12:30 +0200)

remote prune: optimize "dangling symref" check/warning

When 'git remote prune' was used to delete many refs in a repository
with many refs, a lot of time was spent checking for (now) dangling
symbolic refs pointing to the deleted ref, since warn_dangling_symref()
was once per deleted ref to check all other refs in the repository.

Avoid this using the new warn_dangling_symrefs() function which
makes one pass over all refs and checks for all the deleted refs in
one go, after they have all been deleted.

Signed-off-by: Jens Lindström <jl@opera.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote: repack packed-refs once when deleting multiple... Jens Lindström Fri, 23 May 2014 10:29:45 +0000 (12:29 +0200)

remote: repack packed-refs once when deleting multiple refs

When 'git remote rm' or 'git remote prune' were used in a repository
with many refs, and needed to delete many remote-tracking refs, a lot
of time was spent deleting those refs since for each deleted ref,
repack_without_refs() was called to rewrite packed-refs without just
that deleted ref.

To avoid this, call repack_without_refs() first to repack without all
the refs that will be deleted, before calling delete_ref() to delete
each one completely. The call to repack_without_ref() in delete_ref()
then becomes a no-op, since packed-refs already won't contain any of
the deleted refs.

Signed-off-by: Jens Lindström <jl@opera.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

completion: add missing options for git-mergeJohn Keeping Thu, 22 May 2014 13:58:38 +0000 (14:58 +0100)

completion: add missing options for git-merge

The options added to __git_merge_options are those that git-pull passes
to git-merge, since that variable is used by both commands.

Those added directly in _git_merge() are specific to git-merge and
are not passed thru from git-pull.

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

completion: add a note that merge options are sharedJohn Keeping Thu, 22 May 2014 13:58:37 +0000 (14:58 +0100)

completion: add a note that merge options are shared

This should avoid future confusion after a subsequent patch has added
some options to __git_merge_options and some directly in _git_merge().

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

http: default text charset to iso-8859-1Jeff King Thu, 22 May 2014 09:36:12 +0000 (05:36 -0400)

http: default text charset to iso-8859-1

This is specified by RFC 2616 as the default if no "charset"
parameter is given.

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

remote-curl: reencode http error messagesJeff King Thu, 22 May 2014 09:30:29 +0000 (05:30 -0400)

remote-curl: reencode http error messages

We currently recognize an error message with a content-type
"text/plain; charset=utf-16" as text, but we ignore the
charset parameter entirely. Let's encode it to
log_output_encoding, which is presumably something the
user's terminal can handle.

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

strbuf: add strbuf_reencode helperJeff King Thu, 22 May 2014 09:30:14 +0000 (05:30 -0400)

strbuf: add strbuf_reencode helper

This is a convenience wrapper around `reencode_string_len`
and `strbuf_attach`.

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

http: optionally extract charset parameter from content... Jeff King Thu, 22 May 2014 09:30:05 +0000 (05:30 -0400)

http: optionally extract charset parameter from content-type

Since the previous commit, we now give a sanitized,
shortened version of the content-type header to any callers
who ask for it.

This patch adds back a way for them to cleanly access
specific parameters to the type. We could easily extract all
parameters and make them available via a string_list, but:

1. That complicates the interface and memory management.

2. In practice, no planned callers care about anything
except the charset.

This patch therefore goes with the simplest thing, and we
can expand or change the interface later if it becomes
necessary.

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

http: extract type/subtype portion of content-typeJeff King Thu, 22 May 2014 09:29:47 +0000 (05:29 -0400)

http: extract type/subtype portion of content-type

When we get a content-type from curl, we get the whole
header line, including any parameters, and without any
normalization (like downcasing or whitespace) applied.
If we later try to match it with strcmp() or even
strcasecmp(), we may get false negatives.

This could cause two visible behaviors:

1. We might fail to recognize a smart-http server by its
content-type.

2. We might fail to relay text/plain error messages to
users (especially if they contain a charset parameter).

This patch teaches the http code to extract and normalize
just the type/subtype portion of the string. This is
technically passing out less information to the callers, who
can no longer see the parameters. But none of the current
callers cares, and a future patch will add back an
easier-to-use method for accessing those parameters.

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

scripts: more "export VAR=VALUE" fixesJunio C Hamano Fri, 23 May 2014 18:19:34 +0000 (11:19 -0700)

scripts: more "export VAR=VALUE" fixes

Found by

git grep '[^-]export [^&]*=' -- \*.sh

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

scripts: "export VAR=VALUE" construct is not portableElia Pinto Fri, 23 May 2014 10:15:31 +0000 (03:15 -0700)

scripts: "export VAR=VALUE" construct is not portable

Found by check-non-portable-shell.pl

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

strbuf: add strbuf_tolower functionJeff King Fri, 23 May 2014 20:03:47 +0000 (16:03 -0400)

strbuf: add strbuf_tolower function

This is a convenience wrapper to call tolower on each
character of the string.

This makes config's lowercase() function obsolete, though
note that because we have a strbuf, we are careful to
operate over the whole strbuf, rather than assuming that a
NUL is the end-of-string.

We could continue to offer a pure-string lowercase, but
there would be no callers (in most pure-string cases, we
actually duplicate and lowercase the duplicate, for which we
have the xstrdup_tolower wrapper).

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

t5550: test display of remote http error messagesJeff King Thu, 22 May 2014 09:29:03 +0000 (05:29 -0400)

t5550: test display of remote http error messages

Since commit 426e70d (remote-curl: show server content on
http errors, 2013-04-05), we relay any text/plain error
messages from the remote server to the user. However, we
never tested it.

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

t/lib-httpd: use write_script to copy CGI scriptsJeff King Thu, 22 May 2014 09:28:56 +0000 (05:28 -0400)

t/lib-httpd: use write_script to copy CGI scripts

Using write_script will set our shebang line appropriately
with $SHELL_PATH. The script that is there now is quite
simple and likely to succeed even with a non-POSIX /bin/sh,
but it does not hurt to be defensive.

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

test-lib: preserve GIT_CURL_VERBOSE from the environmentJeff King Thu, 22 May 2014 09:28:50 +0000 (05:28 -0400)

test-lib: preserve GIT_CURL_VERBOSE from the environment

Turning on this variable can be useful when debugging http
tests. It does break a few tests in t5541, but it is not
a variable that the user is likely to have enabled
accidentally.

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

daemon/config: factor out duplicate xstrdup_tolowerJeff King Thu, 22 May 2014 09:44:09 +0000 (05:44 -0400)

daemon/config: factor out duplicate xstrdup_tolower

We have two implementations of the same function; let's drop
that to one. We take the name from daemon.c, but the
implementation (which is just slightly more efficient) from
the config code.

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

test-lint: find unportable sed, echo, test, and export... Jonathan Nieder Fri, 23 May 2014 18:44:05 +0000 (11:44 -0700)

test-lint: find unportable sed, echo, test, and export usage after &&

Instead of anchoring these checks with "^\s*", just check that the
usage is preceded by a word boundary. So now we can catch

test $cond && export foo=bar

just like we already catch

test $cond &&
export foo=bar

As a side effect, this will detect usage of "sed -i", "echo -n", "test
a == b", and "export a=b" in comments. That is not ideal but it's
potentially useful because people sometimes copy code from comments so
it can be good to also avoid nonportable patterns there.

To avoid false positives, keep the checks for 'declare' and 'which'
anchored. Those are frequently used words in normal English-language
comments.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote rm: delete remote configuration as the lastJens Lindström Fri, 23 May 2014 10:28:43 +0000 (12:28 +0200)

remote rm: delete remote configuration as the last

When removing a remote, delete the remote-tracking branches before
deleting the remote configuration. This way, if the operation fails or
is aborted while deleting the remote-tracking branches, the command can
be rerun to complete the operation.

Signed-off-by: Jens Lindström <jl@opera.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

format-patch: make newline after signature conditionalJeff King Wed, 21 May 2014 21:07:51 +0000 (14:07 -0700)

format-patch: make newline after signature conditional

When we print an email signature, we print the divider
"-- \n", then the signature string, then two newlines.

Usually the signature is a one-liner (and the default is just the
git version), so the extra newline makes sense. But one could
easily specify a multi-line signature, like this:

git format-patch --signature='this is my long signature

it has multiple lines
' ...

and it may end with its own newline, in which case we do not have
to add yet another one.

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

Documentation: use "command-line" when used as a compou... Jason St. John Wed, 21 May 2014 18:52:26 +0000 (14:52 -0400)

Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 2.0Junio C Hamano Wed, 21 May 2014 18:50:35 +0000 (11:50 -0700)

Update draft release notes to 2.0

Hopefully for the last time ;-)

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

pretty.c: format string with truncate respects logOutpu... Alexey Shumkin Wed, 21 May 2014 13:20:07 +0000 (17:20 +0400)

pretty.c: format string with truncate respects logOutputEncoding

Pretty format string %<(N,[ml]trunc)>%s truncates subject to a given
length with an appropriate padding. This works for non-ASCII texts when
i18n.logOutputEncoding is UTF-8 only (independently of a printed commit
message encoding) but does not work when i18n.logOutputEncoding is NOT
UTF-8.

In 7e77df3 (pretty: two phase conversion for non utf-8 commits, 2013-04-19)
'format_commit_item' function assumes commit message to be in UTF-8.
And that was so until ecaee80 (pretty: --format output should honor
logOutputEncoding, 2013-06-26) where conversion to logOutputEncoding was
added before calling 'format_commit_message'.

Correct this by converting a commit message to UTF-8 first (as it
assumed in 7e77df3 (pretty: two phase conversion for non utf-8 commits,
2013-04-19)). Only after that convert a commit message to an actual
logOutputEncoding.

Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>
Reviewed-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4205, t6006: add tests that fail with i18n.logOutputEn... Alexey Shumkin Wed, 21 May 2014 13:20:06 +0000 (17:20 +0400)

t4205, t6006: add tests that fail with i18n.logOutputEncoding set

Pretty format string %<(N,[ml]trunc)>%s truncates subject to a given
length with an appropriate padding. This works for non-ASCII texts when
i18n.logOutputEncoding is UTF-8 only (independently of a printed commit
message encoding) but does not work when i18n.logOutputEncoding is NOT
UTF-8.

There were no breakages as far as were no tests for the case
when both a commit message and logOutputEncoding are not UTF-8.

Add failing tests for that which will be fixed in the next patch.

Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>
Helped-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Helped-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4205 (log-pretty-format): use `tformat` rather than... Alexey Shumkin Wed, 21 May 2014 13:20:05 +0000 (17:20 +0400)

t4205 (log-pretty-format): use `tformat` rather than `format`

Use `tformat` to avoid using of `echo` to complete end of line.

Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4041, t4205, t6006, t7102: don't hardcode tested encod... Alexey Shumkin Wed, 21 May 2014 13:20:04 +0000 (17:20 +0400)

t4041, t4205, t6006, t7102: don't hardcode tested encoding value

The tested encoding is always available in a variable. Use it instead of
hardcoding. Also, to be in line with other tests use ISO8859-1
(uppercase) rather then iso8859-1.

Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 2.0-rc4 v2.0.0-rc4Junio C Hamano Tue, 20 May 2014 19:07:35 +0000 (12:07 -0700)

Git 2.0-rc4

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

RelNotes/2.0.0.txt: Fix several grammar issues, notably... Jason St. John Sat, 17 May 2014 03:30:34 +0000 (23:30 -0400)

RelNotes/2.0.0.txt: Fix several grammar issues, notably a lack of hyphens, double quotes, or articles

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Revert "Merge branch 'jc/graduate-remote-hg-bzr' (early... Junio C Hamano Tue, 20 May 2014 21:18:11 +0000 (14:18 -0700)

Revert "Merge branch 'jc/graduate-remote-hg-bzr' (early part)"

Instead of showing a warning and working as before, fail and show
the message and force immediate upgrade from their upstream
repositories when these tools are run, per request from their
primary author.

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

rebase -i: test "Nothing to do" case with autostashMatthieu Moy Tue, 20 May 2014 07:49:31 +0000 (09:49 +0200)

rebase -i: test "Nothing to do" case with autostash

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

CodingGuidelines: avoid "test <cond> -a/-o <cond>"Junio C Hamano Tue, 20 May 2014 18:12:02 +0000 (11:12 -0700)

CodingGuidelines: avoid "test <cond> -a/-o <cond>"

The construct is error-prone; "test" being built-in in most modern
shells, the reason to avoid "test <cond> && test <cond>" spawning
one extra process by using a single "test <cond> -a <cond>" no
longer exists.

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

move "--follow needs one pathspec" rule to diff_setup_doneJeff King Tue, 20 May 2014 06:49:20 +0000 (02:49 -0400)

move "--follow needs one pathspec" rule to diff_setup_done

Because of the way "--follow" is implemented, we must have
exactly one pathspec. "git log" enforces this restriction,
but other users of the revision traversal code do not. For
example, "git format-patch --follow" will segfault during
try_to_follow_renames, as we have no pathspecs at all.

We can push this check down into diff_setup_done, which is
probably a better place anyway. It is the diff code that
introduces this restriction, so other parts of the code
should not need to care themselves.

Reported-by: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jc/graduate-remote-hg-bzr' (early part)Junio C Hamano Tue, 20 May 2014 00:12:36 +0000 (17:12 -0700)

Merge branch 'jc/graduate-remote-hg-bzr' (early part)

* 'jc/graduate-remote-hg-bzr' (early part):
remote-helpers: point at their upstream repositories
contrib: remote-helpers: add move warnings (v2.0)
Revert "Merge branch 'fc/transport-helper-sync-error-fix'"

remote-helpers: point at their upstream repositoriesJunio C Hamano Thu, 15 May 2014 21:58:16 +0000 (14:58 -0700)

remote-helpers: point at their upstream repositories

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

contrib: remote-helpers: add move warnings (v2.0)Felipe Contreras Tue, 13 May 2014 21:29:56 +0000 (16:29 -0500)

contrib: remote-helpers: add move warnings (v2.0)

The tools are now maintained out-of-tree, and they have a regression
in v2.0. It's better to start warning the users as soon as possible.

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

Revert "Merge branch 'fc/transport-helper-sync-error... Junio C Hamano Wed, 14 May 2014 19:06:35 +0000 (12:06 -0700)

Revert "Merge branch 'fc/transport-helper-sync-error-fix'"

This reverts commit d508e4a8e2391ae2596403b6478d01cf3d5f928f,
reversing changes made to e42552135a2a396f37053a89f44952ea907870b2.

The author of the original topic says he broke the upcoming 2.0
release with something that relates to "synchronization crash
regression" while refusing to give further specifics, so this would
unfortunately be the safest option for the upcoming release.

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

Merge branch 'rh/prompt-pcmode-avoid-eval-on-refname'Junio C Hamano Mon, 19 May 2014 23:10:10 +0000 (16:10 -0700)

Merge branch 'rh/prompt-pcmode-avoid-eval-on-refname'

* rh/prompt-pcmode-avoid-eval-on-refname:
git-prompt.sh: don't assume the shell expands the value of PS1

git-prompt.sh: don't assume the shell expands the value... Richard Hansen Mon, 19 May 2014 22:55:37 +0000 (18:55 -0400)

git-prompt.sh: don't assume the shell expands the value of PS1

Not all shells subject the prompt string to parameter expansion. Test
whether the shell will expand the value of PS1, and use the result to
control whether raw ref names are included directly in PS1.

This fixes a regression introduced in commit 8976500 ("git-prompt.sh:
don't put unsanitized branch names in $PS1"): zsh does not expand PS1
by default, but that commit assumed it did. The bug resulted in
prompts containing the literal string '${__git_ps1_branch_name}'
instead of the actual branch name.

Reported-by: Caleb Thompson <caleb@calebthompson.io>
Signed-off-by: Richard Hansen <rhansen@bbn.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>