gitweb.git
Merge branch 'js/userdiff-cc'Junio C Hamano Mon, 31 Mar 2014 23:30:54 +0000 (16:30 -0700)

Merge branch 'js/userdiff-cc'

Improves the pattern to match the hunk-header for C/C++.

* js/userdiff-cc:
userdiff: have 'cpp' hunk header pattern catch more C++ anchor points
t4018: test cases showing that the cpp pattern misses many anchor points
t4018: test cases for the built-in cpp pattern
t4018: reduce test files for pattern compilation tests
t4018: convert custom pattern test to the new infrastructure
t4018: convert java pattern test to the new infrastructure
t4018: convert perl pattern tests to the new infrastructure
t4018: an infrastructure to test hunk headers
userdiff: support unsigned and long long suffixes of integer constants
userdiff: support C++ ->* and .* operators in the word regexp

Merge branch 'dw/doc-status-no-longer-shows-pound-prefix'Junio C Hamano Mon, 31 Mar 2014 23:30:52 +0000 (16:30 -0700)

Merge branch 'dw/doc-status-no-longer-shows-pound-prefix'

* dw/doc-status-no-longer-shows-pound-prefix:
doc: status, remove leftover statement about '#' prefix

Merge branch 'ca/doc-config-third-party'Junio C Hamano Mon, 31 Mar 2014 23:30:49 +0000 (16:30 -0700)

Merge branch 'ca/doc-config-third-party'

* ca/doc-config-third-party:
config.txt: third-party tools may and do use their own variables

Merge branch 'hs/simplify-bit-setting-in-fsck-tree'Junio C Hamano Mon, 31 Mar 2014 23:30:44 +0000 (16:30 -0700)

Merge branch 'hs/simplify-bit-setting-in-fsck-tree'

* hs/simplify-bit-setting-in-fsck-tree:
fsck: use bitwise-or assignment operator to set flag

Merge branch 'dt/tests-with-env-not-subshell'Junio C Hamano Mon, 31 Mar 2014 23:30:40 +0000 (16:30 -0700)

Merge branch 'dt/tests-with-env-not-subshell'

* dt/tests-with-env-not-subshell:
tests: use "env" to run commands with temporary env-var settings

Update draft release notes to 2.0Junio C Hamano Fri, 28 Mar 2014 20:56:29 +0000 (13:56 -0700)

Update draft release notes to 2.0

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

Merge branch 'ys/fsck-commit-parsing'Junio C Hamano Fri, 28 Mar 2014 20:51:24 +0000 (13:51 -0700)

Merge branch 'ys/fsck-commit-parsing'

* ys/fsck-commit-parsing:
fsck.c:fsck_commit(): use skip_prefix() to verify and skip constant
fsck.c:fsck_ident(): ident points at a const string

Merge branch 'bg/rebase-off-of-previous-branch'Junio C Hamano Fri, 28 Mar 2014 20:51:20 +0000 (13:51 -0700)

Merge branch 'bg/rebase-off-of-previous-branch'

* bg/rebase-off-of-previous-branch:
rebase: allow "-" short-hand for the previous branch

Merge branch 'bp/commit-p-editor'Junio C Hamano Fri, 28 Mar 2014 20:51:11 +0000 (13:51 -0700)

Merge branch 'bp/commit-p-editor'

When it is not necessary to edit a commit log message (e.g. "git
commit -m" is given a message without specifying "-e"), we used to
disable the spawning of the editor by overriding GIT_EDITOR, but
this means all the uses of the editor, other than to edit the
commit log message, are also affected.

* bp/commit-p-editor:
run-command: mark run_hook_with_custom_index as deprecated
merge hook tests: fix and update tests
merge: fix GIT_EDITOR override for commit hook
commit: fix patch hunk editing with "commit -p -m"
test patch hunk editing with "commit -p -m"
merge hook tests: use 'test_must_fail' instead of '!'
merge hook tests: fix missing '&&' in test

Merge branch 'ah/doc-gitk-config'Junio C Hamano Fri, 28 Mar 2014 20:51:08 +0000 (13:51 -0700)

Merge branch 'ah/doc-gitk-config'

* ah/doc-gitk-config:
Documentation/gitk: document the location of the configulation file

Merge branch 'fr/add-interactive-argv-array'Junio C Hamano Fri, 28 Mar 2014 20:51:04 +0000 (13:51 -0700)

Merge branch 'fr/add-interactive-argv-array'

* fr/add-interactive-argv-array:
add: use struct argv_array in run_add_interactive()

Merge branch 'jk/subtree-prefix'Junio C Hamano Fri, 28 Mar 2014 20:50:59 +0000 (13:50 -0700)

Merge branch 'jk/subtree-prefix'

A stray environment variable $prefix could have leaked into and
affected the behaviour of the "subtree" script.

* jk/subtree-prefix:
subtree: initialize "prefix" variable

Merge branch 'jk/pack-bitmap-progress'Junio C Hamano Fri, 28 Mar 2014 20:50:56 +0000 (13:50 -0700)

Merge branch 'jk/pack-bitmap-progress'

The progress output while repacking and transferring objects showed
an apparent large silence while writing the objects out of existing
packfiles, when the reachability bitmap was in use.

* jk/pack-bitmap-progress:
pack-objects: show reused packfile objects in "Counting objects"
pack-objects: show progress for reused packfiles

Merge branch 'jk/pack-bitmap'Junio C Hamano Fri, 28 Mar 2014 20:50:50 +0000 (13:50 -0700)

Merge branch 'jk/pack-bitmap'

Instead of dying when asked to (re)pack with the reachability
bitmap when a bitmap cannot be built, just (re)pack without
producing a bitmap in such a case, with a warning.

* jk/pack-bitmap:
pack-objects: turn off bitmaps when skipping objects

Update draft release notes to 2.0Junio C Hamano Tue, 25 Mar 2014 19:01:39 +0000 (12:01 -0700)

Update draft release notes to 2.0

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

Merge branch 'ss/test-on-mingw-rsync-path-no-absolute'Junio C Hamano Tue, 25 Mar 2014 18:08:35 +0000 (11:08 -0700)

Merge branch 'ss/test-on-mingw-rsync-path-no-absolute'

* ss/test-on-mingw-rsync-path-no-absolute:
t5510: Do not use $(pwd) when fetching / pushing / pulling via rsync

Merge branch 'bb/diff-no-index-dotdot'Junio C Hamano Tue, 25 Mar 2014 18:08:31 +0000 (11:08 -0700)

Merge branch 'bb/diff-no-index-dotdot'

* bb/diff-no-index-dotdot:
diff-no-index: replace manual "."/".." check with is_dot_or_dotdot()
diff-no-index: rename read_directory()

Merge branch 'us/printf-not-echo'Junio C Hamano Tue, 25 Mar 2014 18:08:26 +0000 (11:08 -0700)

Merge branch 'us/printf-not-echo'

* us/printf-not-echo:
test-lib.sh: do not "echo" caller-supplied strings
rebase -i: do not "echo" random user-supplied strings

Merge branch 'rr/doc-merge-strategies'Junio C Hamano Tue, 25 Mar 2014 18:08:23 +0000 (11:08 -0700)

Merge branch 'rr/doc-merge-strategies'

* rr/doc-merge-strategies:
Documentation/merge-strategies: avoid hyphenated commands

Merge branch 'nd/index-pack-error-message'Junio C Hamano Tue, 25 Mar 2014 18:08:19 +0000 (11:08 -0700)

Merge branch 'nd/index-pack-error-message'

* nd/index-pack-error-message:
index-pack: report error using the correct variable

Merge branch 'jk/lib-terminal-lazy'Junio C Hamano Tue, 25 Mar 2014 18:08:09 +0000 (11:08 -0700)

Merge branch 'jk/lib-terminal-lazy'

The test helper lib-terminal always run an actual test_expect_* when
included, which screwed up with the use of skil-all that may have to
be done later.

* jk/lib-terminal-lazy:
t/lib-terminal: make TTY a lazy prerequisite

Merge branch 'dm/configure-iconv-locale-charset'Junio C Hamano Tue, 25 Mar 2014 18:07:51 +0000 (11:07 -0700)

Merge branch 'dm/configure-iconv-locale-charset'

* dm/configure-iconv-locale-charset:
configure.ac: link with -liconv for locale_charset()

Merge branch 'nd/commit-editor-cleanup'Junio C Hamano Tue, 25 Mar 2014 18:07:47 +0000 (11:07 -0700)

Merge branch 'nd/commit-editor-cleanup'

"git commit --cleanup=<mode>" learned a new mode, scissors.

* nd/commit-editor-cleanup:
commit: add --cleanup=scissors
wt-status.c: move cut-line print code out to wt_status_add_cut_line
wt-status.c: make cut_line[] const to shrink .data section a bit

Merge branch 'jk/warn-on-object-refname-ambiguity'Junio C Hamano Tue, 25 Mar 2014 18:07:36 +0000 (11:07 -0700)

Merge branch 'jk/warn-on-object-refname-ambiguity'

* jk/warn-on-object-refname-ambiguity:
rev-list: disable object/refname ambiguity check with --stdin
cat-file: restore warn_on_object_refname_ambiguity flag
cat-file: fix a minor memory leak in batch_objects
cat-file: refactor error handling of batch_objects

Merge branch 'mh/remove-subtree-long-pathname-fix'Junio C Hamano Tue, 25 Mar 2014 18:07:09 +0000 (11:07 -0700)

Merge branch 'mh/remove-subtree-long-pathname-fix'

* mh/remove-subtree-long-pathname-fix:
entry.c: fix possible buffer overflow in remove_subtree()
checkout_entry(): use the strbuf throughout the function

Merge branch 'nd/indent-fix-connect-c'Junio C Hamano Tue, 25 Mar 2014 18:07:05 +0000 (11:07 -0700)

Merge branch 'nd/indent-fix-connect-c'

* nd/indent-fix-connect-c:
connect.c: SP after "}", not TAB

Merge branch 'jk/mv-submodules-fix'Junio C Hamano Tue, 25 Mar 2014 18:02:01 +0000 (11:02 -0700)

Merge branch 'jk/mv-submodules-fix'

"git mv" that moves a submodule forgot to adjust the array that uses
to keep track of which submodules were to be moved to update its
configuration.

* jk/mv-submodules-fix:
mv: prevent mismatched data when ignoring errors.
builtin/mv: fix out of bounds write

Merge branch 'cp/am-patch-format-doc'Junio C Hamano Tue, 25 Mar 2014 18:01:31 +0000 (11:01 -0700)

Merge branch 'cp/am-patch-format-doc'

* cp/am-patch-format-doc:
Documentation/git-am: typofix
Documentation/git-am: Document supported --patch-format options

userdiff: have 'cpp' hunk header pattern catch more... Johannes Sixt Fri, 21 Mar 2014 21:07:22 +0000 (22:07 +0100)

userdiff: have 'cpp' hunk header pattern catch more C++ anchor points

The hunk header pattern 'cpp' is intended for C and C++ source code, but
it is actually not particularly useful for the latter, and even misses
some use-cases for the former.

The parts of the pattern have the following flaws:

- The first part matches an identifier followed immediately by a colon
and arbitrary text and is intended to reject goto labels and C++
access specifiers (public, private, protected). But this pattern also
rejects C++ constructs, which look like this:

MyClass::MyClass()
MyClass::~MyClass()
MyClass::Item MyClass::Find(...

- The second part matches an identifier followed by a list of qualified
names (i.e. identifiers separated by the C++ scope operator '::')
separated by space or '*' followed by an opening parenthesis (with
space between the tokens). It matches function declarations like

struct item* get_head(...
int Outer::Inner::Func(...

Since the pattern requires at least two identifiers, GNU-style
function definitions are ignored:

void
func(...

Moreover, since the pattern does not allow punctuation other than '*',
the following C++ constructs are not recognized:

. template definitions:
template<class T> int func(T arg)

. functions returning references:
const string& get_message()

. functions returning templated types:
vector<int> foo()

. operator definitions:
Value operator+(Value l, Value r)

- The third part of the pattern finally matches compound definitions.
But it forgets about unions and namespaces, and also skips single-line
definitions

struct random_iterator_tag {};

because no semicolon can occur on the line.

Change the first pattern to require a colon at the end of the line
(except for trailing space and comments), so that it does not reject
constructor or destructor definitions.

Notice that all interesting anchor points begin with an identifier or
keyword. But since there is a large variety of syntactical constructs
after the first "word", the simplest is to require only this word and
accept everything else. Therefore, this boils down to a line that begins
with a letter or underscore (optionally preceded by the C++ scope
operator '::' to accept functions returning a type anchored at the
global namespace). Replace the second and third part by a single pattern
that picks such a line.

This has the following desirable consequence:

- All constructs mentioned above are recognized.

and the following likely desirable consequences:

- Definitions of global variables and typedefs are recognized:

int num_entries = 0;
extern const char* help_text;
typedef basic_string<wchar_t> wstring;

- Commonly used marco-ized boilerplate code is recognized:

BEGIN_MESSAGE_MAP(CCanvas,CWnd)
Q_DECLARE_METATYPE(MyStruct)
PATTERNS("tex",...)

(The last one is from this very patch.)

but also the following possibly undesirable consequence:

- When a label is not on a line by itself (except for a comment) it is
no longer rejected, but can appear as a hunk header if it occurs at
the beginning of a line:

next:;

IMO, the benefits of the change outweigh the (possible) regressions by a
large margin.

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

t4018: test cases showing that the cpp pattern misses... Johannes Sixt Fri, 21 Mar 2014 21:07:21 +0000 (22:07 +0100)

t4018: test cases showing that the cpp pattern misses many anchor points

Most of the tests show C++ code, but there is also a union definition and
a GNU style function definition that are not recognized.

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

t4018: test cases for the built-in cpp patternJohannes Sixt Fri, 21 Mar 2014 21:07:20 +0000 (22:07 +0100)

t4018: test cases for the built-in cpp pattern

A later patch changes the built-in cpp pattern. These test cases
demonstrate aspects of the pattern that we do not want to change.

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

t4018: reduce test files for pattern compilation testsJohannes Sixt Fri, 21 Mar 2014 21:07:19 +0000 (22:07 +0100)

t4018: reduce test files for pattern compilation tests

All test cases that need a file with specific text patterns have been
converted to utilize texts in the t4018/ directory. The remaining tests
in the test script deal only with the validity of the regular
expressions. These tests do not depend on the contents of files that
'git diff' is invoked on. Remove the largish here-document and use only
tiny files.

While we are touching these tests, convert grep to test_i18ngrep as the
texts checked for may undergo translation in the future.

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

t4018: convert custom pattern test to the new infrastru... Johannes Sixt Fri, 21 Mar 2014 21:07:18 +0000 (22:07 +0100)

t4018: convert custom pattern test to the new infrastructure

For the test case "matches to end of line", extend the pattern by a few
wildcards so that the pattern captures the "RIGHT" token, which is needed
for verification, without mentioning it in the pattern.

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

t4018: convert java pattern test to the new infrastructureJohannes Sixt Fri, 21 Mar 2014 21:07:17 +0000 (22:07 +0100)

t4018: convert java pattern test to the new infrastructure

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

t4018: convert perl pattern tests to the new infrastructureJohannes Sixt Fri, 21 Mar 2014 21:07:16 +0000 (22:07 +0100)

t4018: convert perl pattern tests to the new infrastructure

There is one subtlety: The old test case 'perl pattern gets full line of
POD header' does not have its own new test case, but the feature is
tested nevertheless by placing the RIGHT tag at the end of the expected
hunk header in t4018/perl-skip-sub-in-pod.

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

t4018: an infrastructure to test hunk headersJohannes Sixt Fri, 21 Mar 2014 21:07:15 +0000 (22:07 +0100)

t4018: an infrastructure to test hunk headers

Add an infrastructure that simplifies adding new tests of the hunk
header regular expressions.

To add new tests, a file with the syntax to test can be dropped in the
directory t4018. The README file explains how a test file must contain;
the README itself tests the default behavior.

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

userdiff: support unsigned and long long suffixes of... Johannes Sixt Fri, 21 Mar 2014 21:07:14 +0000 (22:07 +0100)

userdiff: support unsigned and long long suffixes of integer constants

Do not split constants such as 123U, 456ll, 789UL at the first U or
second L.

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

userdiff: support C++ ->* and .* operators in the word... Johannes Sixt Fri, 21 Mar 2014 21:07:13 +0000 (22:07 +0100)

userdiff: support C++ ->* and .* operators in the word regexp

The character sequences ->* and .* are valid C++ operators. Keep them
together in --word-diff mode.

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

Update draft release notes to 2.0Junio C Hamano Fri, 21 Mar 2014 20:41:27 +0000 (13:41 -0700)

Update draft release notes to 2.0

Merge branch 'lt/request-pull'Junio C Hamano Fri, 21 Mar 2014 19:50:44 +0000 (12:50 -0700)

Merge branch 'lt/request-pull'

Discard the accumulated "heuristics" to guess from which branch the
result wants to be pulled from and make sure what the end user
specified is not second-guessed by "git request-pull", to avoid
mistakes.

* lt/request-pull:
request-pull: documentation updates
request-pull: resurrect "pretty refname" feature
request-pull: test updates
request-pull: pick up tag message as before
request-pull: allow "local:remote" to specify names on both ends
request-pull: more strictly match local/remote branches

Merge branch 'es/sh-i18n-envsubst'Junio C Hamano Fri, 21 Mar 2014 19:50:39 +0000 (12:50 -0700)

Merge branch 'es/sh-i18n-envsubst'

* es/sh-i18n-envsubst:
sh-i18n--envsubst: retire unused string_list_member()

Merge branch 'nd/upload-pack-shallow'Junio C Hamano Fri, 21 Mar 2014 19:49:08 +0000 (12:49 -0700)

Merge branch 'nd/upload-pack-shallow'

Serving objects from a shallow repository needs to write a
temporary file to be used, but the serving upload-pack may not have
write access to the repository which is meant to be read-only.

Instead feed these temporary shallow bounds from the standard input
of pack-objects so that we do not have to use a temporary file.

* nd/upload-pack-shallow:
upload-pack: send shallow info over stdin to pack-objects

Merge branch 'jn/wt-status'Junio C Hamano Fri, 21 Mar 2014 19:48:59 +0000 (12:48 -0700)

Merge branch 'jn/wt-status'

Unify the codepaths that format new/modified/changed sections and
conflicted paths in the "git status" output and make it possible to
properly internationalize their output.

* jn/wt-status:
wt-status: lift the artificual "at least 20 columns" floor
wt-status: i18n of section labels
wt-status: extract the code to compute width for labels
wt-status: make full label string to be subject to l10n

Merge branch 'jc/stash-pop-not-popped'Junio C Hamano Fri, 21 Mar 2014 19:48:51 +0000 (12:48 -0700)

Merge branch 'jc/stash-pop-not-popped'

"stash pop", upon failing to apply the stash, refrains from
discarding the stash to avoid information loss. Be more explicit
in the error message.

The wording may want to get a bit more bikeshedding.

* jc/stash-pop-not-popped:
stash pop: mention we did not drop the stash upon failing to apply

Merge branch 'dk/skip-prefix-scan-only-once'Junio C Hamano Fri, 21 Mar 2014 19:47:41 +0000 (12:47 -0700)

Merge branch 'dk/skip-prefix-scan-only-once'

Update implementation of skip_prefix() to scan only once; given
that most "prefix" arguments to the inline function are constant
strings whose strlen() can be determined at the compile time, this
might actually make things worse with a compiler with sufficient
intelligence.

* dk/skip-prefix-scan-only-once:
skip_prefix(): scan prefix only once

Merge branch 'nd/tag-version-sort'Junio C Hamano Fri, 21 Mar 2014 19:47:38 +0000 (12:47 -0700)

Merge branch 'nd/tag-version-sort'

Allow v1.9.0 sorted before v1.10.0 in "git tag --list" output.

* nd/tag-version-sort:
tag: support --sort=<spec>

Merge branch 'jk/shallow-update-fix'Junio C Hamano Fri, 21 Mar 2014 19:33:29 +0000 (12:33 -0700)

Merge branch 'jk/shallow-update-fix'

Serving objects from a shallow repository needs to write a
new file to hold the temporary shallow boundaries but it was not
cleaned when we exit due to die() or a signal.

* jk/shallow-update-fix:
shallow: verify shallow file after taking lock
shallow: automatically clean up shallow tempfiles
shallow: use stat_validity to check for up-to-date file

Merge branch 'tc/commit-dry-run-exit-status-tests'Junio C Hamano Fri, 21 Mar 2014 19:33:25 +0000 (12:33 -0700)

Merge branch 'tc/commit-dry-run-exit-status-tests'

* tc/commit-dry-run-exit-status-tests:
demonstrate git-commit --dry-run exit code behaviour

config.txt: third-party tools may and do use their... Chris Angelico Fri, 21 Mar 2014 04:07:08 +0000 (15:07 +1100)

config.txt: third-party tools may and do use their own variables

Signed-off-by: Chris Angelico <rosuav@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

doc: status, remove leftover statement about '#' prefixDirk Wallenstein Fri, 21 Mar 2014 14:10:18 +0000 (15:10 +0100)

doc: status, remove leftover statement about '#' prefix

This hasn't been true since 2556b996 (status: disable display of '#'
comment prefix by default, 2013-09-06).

Signed-off-by: Dirk Wallenstein <halsmit@t-online.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fsck: use bitwise-or assignment operator to set flagHiroyuki Sano Wed, 19 Mar 2014 23:02:04 +0000 (08:02 +0900)

fsck: use bitwise-or assignment operator to set flag

fsck_tree() has two different ways to set a flag variable, either by
using a if-statement that guards an assignment, or by using a
bitwise-or assignment operator. Most are done with the former, and
only one variable is assigned with the latter.

Since all the conditions are short-and-sweet, we can afford to
uniformly use the latter style, which makes the resulting code
shorter and easier to read.

Signed-off-by: Hiroyuki Sano <sh19910711@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/gitk: document the location of the config... Astril Hayato Thu, 20 Mar 2014 13:33:49 +0000 (13:33 +0000)

Documentation/gitk: document the location of the configulation file

User config file location complies with the XDG base directory
specification while supporting the traditional $HOME/.gitk as a
fallback.

Signed-off-by: Astril Hayato <astrilhayato@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fsck.c:fsck_commit(): use skip_prefix() to verify and... Yuxuan Shui Thu, 13 Mar 2014 04:45:51 +0000 (12:45 +0800)

fsck.c:fsck_commit(): use skip_prefix() to verify and skip constant

fsck_commit() uses memcmp() to check if the buffer starts with a
certain prefix, and skips the prefix if it does.

This is exactly what skip_prefix() was designed for.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5510: Do not use $(pwd) when fetching / pushing /... Sebastian Schuberth Wed, 19 Mar 2014 19:43:53 +0000 (20:43 +0100)

t5510: Do not use $(pwd) when fetching / pushing / pulling via rsync

On MINGW, "pwd" is defined as "pwd -W" in test-lib.sh. This usually is the
right thing, but the absolute Windows path with a colon confuses rsync. We
could use $PWD in this case to work around the issue, but in fact there is
no need to use an absolute path in the first place, so get rid of it.

This was discovered in the context of the mingwGitDevEnv project and only
did not surface before with msysgit because the latter does not ship
rsync.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tests: use "env" to run commands with temporary env... David Tran Tue, 18 Mar 2014 18:54:05 +0000 (18:54 +0000)

tests: use "env" to run commands with temporary env-var settings

Ordinarily, we would say "VAR=VAL command" to execute a tested
command with environment variable(s) set only for that command.
This however does not work if 'command' is a shell function (most
notably 'test_must_fail'); the result of the assignment is retained
and affects later commands.

To avoid this, we used to assign and export environment variables
and run such a test in a subshell, like so:

(
VAR=VAL && export VAR &&
test_must_fail git command to be tested
)

But with "env" utility, we should be able to say:

test_must_fail env VAR=VAL git command to be tested

which is much shorter and easier to read.

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

diff-no-index: replace manual "."/".." check with is_do... Brian Bourn Wed, 19 Mar 2014 15:58:22 +0000 (11:58 -0400)

diff-no-index: replace manual "."/".." check with is_dot_or_dotdot()

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Brian Bourn <ba.bourn@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff-no-index: rename read_directory()Brian Bourn Wed, 19 Mar 2014 15:58:21 +0000 (11:58 -0400)

diff-no-index: rename read_directory()

In the next patch, we will replace a manual checking of "." or ".."
with a call to is_dot_or_dotdot() defined in dir.h. The private
function read_directory() defined in this file will conflict with
the global function declared there when we do so.

As a preparatory step, rename the private read_directory() to avoid
the name collision.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Brian Bourn <ba.bourn@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: allow "-" short-hand for the previous branchBrian Gesiak Wed, 19 Mar 2014 11:02:15 +0000 (20:02 +0900)

rebase: allow "-" short-hand for the previous branch

Teach rebase the same shorthand as checkout and merge to name the
branch to rebase the current branch on; that is, that "-" means "the
branch we were previously on".

Requested-by: Tim Chase <git@tim.thechases.com>
Signed-off-by: Brian Gesiak <modocache@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with 1.9.1Junio C Hamano Tue, 18 Mar 2014 21:34:25 +0000 (14:34 -0700)

Sync with 1.9.1

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

Update draft release notes to Git 2.0Junio C Hamano Tue, 18 Mar 2014 21:33:34 +0000 (14:33 -0700)

Update draft release notes to Git 2.0

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

Git 1.9.1 v1.9.1Junio C Hamano Tue, 18 Mar 2014 21:06:49 +0000 (14:06 -0700)

Git 1.9.1

The version numbering scheme has changed since Git 1.9 and we
dropped the third dewey-decimal from the traditional numbering
(e.g. both 1.8.4 and 1.8.5 were major feature releases). This
release 1.9.1 is the first maintenance relase for Git 1.9.

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

Merge branch 'jk/clean-d-pathspec' into maintJunio C Hamano Tue, 18 Mar 2014 21:04:59 +0000 (14:04 -0700)

Merge branch 'jk/clean-d-pathspec' into maint

"git clean -d pathspec" did not use the given pathspec correctly
and ended up cleaning too much.

* jk/clean-d-pathspec:
clean: simplify dir/not-dir logic
clean: respect pathspecs with "-d"

Merge branch 'da/difftool-git-files' into maintJunio C Hamano Tue, 18 Mar 2014 21:04:36 +0000 (14:04 -0700)

Merge branch 'da/difftool-git-files' into maint

"git difftool" misbehaved when the repository is bound to the
working tree with the ".git file" mechanism, where a textual file
".git" tells us where it is.

* da/difftool-git-files:
t7800: add a difftool test for .git-files
difftool: support repositories with .git-files

Merge branch 'jk/remote-pushremote-config-reading'... Junio C Hamano Tue, 18 Mar 2014 21:04:16 +0000 (14:04 -0700)

Merge branch 'jk/remote-pushremote-config-reading' into maint

"git push" did not pay attention to branch.*.pushremote if it is
defined earlier than remote.pushdefault; the order of these two
variables in the configuration file should not matter, but it did by
mistake.

* jk/remote-pushremote-config-reading:
remote: handle pushremote config in any order

Merge branch 'jk/commit-dates-parsing-fix' into maintJunio C Hamano Tue, 18 Mar 2014 21:04:01 +0000 (14:04 -0700)

Merge branch 'jk/commit-dates-parsing-fix' into maint

Codepaths that parse timestamps in commit objects have been
tightened.

* jk/commit-dates-parsing-fix:
show_ident_date: fix tz range check
log: do not segfault on gmtime errors
log: handle integer overflow in timestamps
date: check date overflow against time_t
fsck: report integer overflow in author timestamps
t4212: test bogus timestamps with git-log

Merge branch 'tr/diff-submodule-no-reuse-worktree'... Junio C Hamano Tue, 18 Mar 2014 21:03:41 +0000 (14:03 -0700)

Merge branch 'tr/diff-submodule-no-reuse-worktree' into maint

"git diff --external-diff" incorrectly fed the submodule directory
in the working tree to the external diff driver when it knew it is
the same as one of the versions being compared.

* tr/diff-submodule-no-reuse-worktree:
diff: do not reuse_worktree_file for submodules

Merge branch 'nd/reset-setup-worktree' into maintJunio C Hamano Tue, 18 Mar 2014 21:03:24 +0000 (14:03 -0700)

Merge branch 'nd/reset-setup-worktree' into maint

"git reset" needs to refresh the index when working in a working
tree (it can also be used to match the index to the HEAD in an
otherwise bare repository), but it failed to set up the working
tree properly, causing GIT_WORK_TREE to be ignored.

* nd/reset-setup-worktree:
reset: optionally setup worktree and refresh index on --mixed

Merge branch 'jc/check-attr-honor-working-tree' into... Junio C Hamano Tue, 18 Mar 2014 21:03:03 +0000 (14:03 -0700)

Merge branch 'jc/check-attr-honor-working-tree' into maint

"git check-attr" when working on a repository with a working tree
did not work well when the working tree was specified via the
--work-tree (and obviously with --git-dir) option.

* jc/check-attr-honor-working-tree:
check-attr: move to the top of working tree when in non-bare repository
t0003: do not chdir the whole test process

Merge branch 'bk/refresh-missing-ok-in-merge-recursive... Junio C Hamano Tue, 18 Mar 2014 21:02:37 +0000 (14:02 -0700)

Merge branch 'bk/refresh-missing-ok-in-merge-recursive' into maint

"merge-recursive" was broken in 1.7.7 era and stopped working in an
empty (temporary) working tree, when there are renames involved.
This has been corrected.

* bk/refresh-missing-ok-in-merge-recursive:
merge-recursive.c: tolerate missing files while refreshing index
read-cache.c: extend make_cache_entry refresh flag with options
read-cache.c: refactor --ignore-missing implementation
t3030-merge-recursive: test known breakage with empty work tree

Merge branch 'ds/rev-parse-required-args' into maintJunio C Hamano Tue, 18 Mar 2014 21:01:05 +0000 (14:01 -0700)

Merge branch 'ds/rev-parse-required-args' into maint

"git rev-parse" was loose in rejecting command line arguments that
do not make sense, e.g. "--default" without the required value for
that option.

* ds/rev-parse-required-args:
rev-parse: check i before using argv[i] against argc

Merge branch 'jk/config-path-include-fix' into maintJunio C Hamano Tue, 18 Mar 2014 21:00:15 +0000 (14:00 -0700)

Merge branch 'jk/config-path-include-fix' into maint

include.path variable (or any variable that expects a path that can
use ~username expansion) in the configuration file is not a boolean,
but the code failed to check it.

* jk/config-path-include-fix:
handle_path_include: don't look at NULL value
expand_user_path: do not look at NULL path

Merge branch 'nd/diff-quiet-stat-dirty' into maintJunio C Hamano Tue, 18 Mar 2014 20:59:55 +0000 (13:59 -0700)

Merge branch 'nd/diff-quiet-stat-dirty' into maint

"git diff --quiet -- pathspec1 pathspec2" sometimes did not return
correct status value.

* nd/diff-quiet-stat-dirty:
diff: do not quit early on stat-dirty files
diff.c: move diffcore_skip_stat_unmatch core logic out for reuse later

Merge branch 'nd/http-fetch-shallow-fix' into maintJunio C Hamano Tue, 18 Mar 2014 20:59:37 +0000 (13:59 -0700)

Merge branch 'nd/http-fetch-shallow-fix' into maint

Attempting to deepen a shallow repository by fetching over smart
HTTP transport failed in the protocol exchange, when no-done
extension was used. The fetching side waited for the list of
shallow boundary commits after the sending end stopped talking to
it.

* nd/http-fetch-shallow-fix:
t5537: move http tests out to t5539
fetch-pack: fix deepen shallow over smart http with no-done cap
protocol-capabilities.txt: document no-done
protocol-capabilities.txt: refer multi_ack_detailed back to pack-protocol.txt
pack-protocol.txt: clarify 'obj-id' in the last ACK after 'done'
test: rename http fetch and push test files
tests: auto-set LIB_HTTPD_PORT from test name

Merge branch 'nd/submodule-pathspec-ending-with-slash... Junio C Hamano Tue, 18 Mar 2014 20:58:58 +0000 (13:58 -0700)

Merge branch 'nd/submodule-pathspec-ending-with-slash' into maint

Allow "git cmd path/", when the 'path' is where a submodule is
bound to the top-level working tree, to match 'path', despite the
extra and unnecessary trailing slash (such a slash is often
given by command line completion).

* nd/submodule-pathspec-ending-with-slash:
clean: use cache_name_is_other()
clean: replace match_pathspec() with dir_path_match()
pathspec: pass directory indicator to match_pathspec_item()
match_pathspec: match pathspec "foo/" against directory "foo"
dir.c: prepare match_pathspec_item for taking more flags
pathspec: rename match_pathspec_depth() to match_pathspec()
pathspec: convert some match_pathspec_depth() to dir_path_match()
pathspec: convert some match_pathspec_depth() to ce_path_match()

Merge branch 'rs/grep-h-c'Junio C Hamano Tue, 18 Mar 2014 20:51:20 +0000 (13:51 -0700)

Merge branch 'rs/grep-h-c'

"git grep" learns to handle combination of "-h (no header)" and "-c
(counts)".

* rs/grep-h-c:
grep: support -h (no header) with --count
t7810: add missing variables to tests in loop

Merge branch 'rm/strchrnul-not-strlen'Junio C Hamano Tue, 18 Mar 2014 20:51:18 +0000 (13:51 -0700)

Merge branch 'rm/strchrnul-not-strlen'

* rm/strchrnul-not-strlen:
use strchrnul() in place of strchr() and strlen()

Merge branch 'jc/tag-contains-with'Junio C Hamano Tue, 18 Mar 2014 20:51:14 +0000 (13:51 -0700)

Merge branch 'jc/tag-contains-with'

* jc/tag-contains-with:
tag: grok "--with" as synonym to "--contains"

Merge branch 'bg/install-branch-config-skip-prefix'Junio C Hamano Tue, 18 Mar 2014 20:51:09 +0000 (13:51 -0700)

Merge branch 'bg/install-branch-config-skip-prefix'

* bg/install-branch-config-skip-prefix:
branch: use skip_prefix() in install_branch_config()
t3200-branch: test setting branch as own upstream

Merge branch 'jc/no-need-for-env-in-sh-scripts'Junio C Hamano Tue, 18 Mar 2014 20:51:07 +0000 (13:51 -0700)

Merge branch 'jc/no-need-for-env-in-sh-scripts'

* jc/no-need-for-env-in-sh-scripts:
*.sh: drop useless use of "env"

Merge branch 'sh/use-hashcpy'Junio C Hamano Tue, 18 Mar 2014 20:51:04 +0000 (13:51 -0700)

Merge branch 'sh/use-hashcpy'

* sh/use-hashcpy:
Use hashcpy() when copying object names

Merge branch 'mh/simplify-cache-tree-find'Junio C Hamano Tue, 18 Mar 2014 20:51:02 +0000 (13:51 -0700)

Merge branch 'mh/simplify-cache-tree-find'

* mh/simplify-cache-tree-find:
cache_tree_find(): use path variable when passing over slashes
cache_tree_find(): remove early return
cache_tree_find(): remove redundant check
cache_tree_find(): fix comment formatting
cache_tree_find(): find the end of path component using strchrnul()
cache_tree_find(): remove redundant checks

Merge branch 'jn/branch-lift-unnecessary-name-length... Junio C Hamano Tue, 18 Mar 2014 20:50:48 +0000 (13:50 -0700)

Merge branch 'jn/branch-lift-unnecessary-name-length-limit'

* jn/branch-lift-unnecessary-name-length-limit:
branch.c: delete size check of newly tracked branch names

Merge branch 'jk/doc-deprecate-grafts'Junio C Hamano Tue, 18 Mar 2014 20:50:40 +0000 (13:50 -0700)

Merge branch 'jk/doc-deprecate-grafts'

* jk/doc-deprecate-grafts:
docs: mark info/grafts as outdated

Merge branch 'jk/detect-push-typo-early'Junio C Hamano Tue, 18 Mar 2014 20:50:33 +0000 (13:50 -0700)

Merge branch 'jk/detect-push-typo-early'

Catch "git push $there no-such-branch" early.

* jk/detect-push-typo-early:
push: detect local refspec errors early
match_explicit_lhs: allow a "verify only" mode
match_explicit: hoist refspec lhs checks into their own function

Merge branch 'jk/repack-pack-keep-objects'Junio C Hamano Tue, 18 Mar 2014 20:50:29 +0000 (13:50 -0700)

Merge branch 'jk/repack-pack-keep-objects'

* jk/repack-pack-keep-objects:
repack: add `repack.packKeptObjects` config var

Merge branch 'sh/finish-tmp-packfile'Junio C Hamano Tue, 18 Mar 2014 20:50:24 +0000 (13:50 -0700)

Merge branch 'sh/finish-tmp-packfile'

* sh/finish-tmp-packfile:
finish_tmp_packfile():use strbuf for pathname construction

Merge branch 'dd/use-alloc-grow'Junio C Hamano Tue, 18 Mar 2014 20:50:21 +0000 (13:50 -0700)

Merge branch 'dd/use-alloc-grow'

Replace open-coded reallocation with ALLOC_GROW() macro.

* dd/use-alloc-grow:
sha1_file.c: use ALLOC_GROW() in pretend_sha1_file()
read-cache.c: use ALLOC_GROW() in add_index_entry()
builtin/mktree.c: use ALLOC_GROW() in append_to_tree()
attr.c: use ALLOC_GROW() in handle_attr_line()
dir.c: use ALLOC_GROW() in create_simplify()
reflog-walk.c: use ALLOC_GROW()
replace_object.c: use ALLOC_GROW() in register_replace_object()
patch-ids.c: use ALLOC_GROW() in add_commit()
diffcore-rename.c: use ALLOC_GROW()
diff.c: use ALLOC_GROW()
commit.c: use ALLOC_GROW() in register_commit_graft()
cache-tree.c: use ALLOC_GROW() in find_subtree()
bundle.c: use ALLOC_GROW() in add_to_ref_list()
builtin/pack-objects.c: use ALLOC_GROW() in check_pbase_path()

Merge branch 'dd/find-graft-with-sha1-pos'Junio C Hamano Tue, 18 Mar 2014 20:50:11 +0000 (13:50 -0700)

Merge branch 'dd/find-graft-with-sha1-pos'

Replace a hand-rolled binary search with a call to our generic
binary search helper function.

* dd/find-graft-with-sha1-pos:
commit.c: use the generic "sha1_pos" function for lookup

Merge branch 'fc/transport-helper-fixes'Junio C Hamano Tue, 18 Mar 2014 20:49:32 +0000 (13:49 -0700)

Merge branch 'fc/transport-helper-fixes'

Updates transport-helper, fast-import and fast-export to allow the
ref mapping and ref deletion in a way similar to the natively
supported transports.

* fc/transport-helper-fixes:
remote-bzr: support the new 'force' option
test-hg.sh: tests are now expected to pass
transport-helper.c: do not overwrite forced bit
transport-helper: check for 'forced update' message
transport-helper: add 'force' to 'export' helpers
transport-helper: don't update refs in dry-run
transport-helper: mismerge fix

Merge branch 'nd/sha1-file-delta-stack-leakage-fix'Junio C Hamano Tue, 18 Mar 2014 20:49:22 +0000 (13:49 -0700)

Merge branch 'nd/sha1-file-delta-stack-leakage-fix'

Fix a small leak in the delta stack used when resolving a long
delta chain at runtime.

* nd/sha1-file-delta-stack-leakage-fix:
sha1_file: fix delta_stack memory leak in unpack_entry

Merge branch 'jk/diff-filespec-cleanup'Junio C Hamano Tue, 18 Mar 2014 20:48:50 +0000 (13:48 -0700)

Merge branch 'jk/diff-filespec-cleanup'

Portability fix to a topic already in v1.9

* jk/diff-filespec-cleanup:
diffcore.h: be explicit about the signedness of is_binary

Merge branch 'jk/clean-d-pathspec'Junio C Hamano Tue, 18 Mar 2014 20:47:57 +0000 (13:47 -0700)

Merge branch 'jk/clean-d-pathspec'

"git clean -d pathspec" did not use the given pathspec correctly
and ended up cleaning too much.

* jk/clean-d-pathspec:
clean: simplify dir/not-dir logic
clean: respect pathspecs with "-d"

add: use struct argv_array in run_add_interactive()Fabian Ruch Sat, 15 Mar 2014 11:14:40 +0000 (12:14 +0100)

add: use struct argv_array in run_add_interactive()

run_add_interactive() in builtin/add.c manually computes array bounds
and allocates a static args array to build the add--interactive command
line, which is error-prone. Use the argv-array helper functions instead.

Signed-off-by: Fabian Ruch <bafain@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-lib.sh: do not "echo" caller-supplied stringsUwe Storbeck Tue, 18 Mar 2014 00:14:11 +0000 (01:14 +0100)

test-lib.sh: do not "echo" caller-supplied strings

In some places we "echo" a string that is supplied by the calling
test script and may contain backslash sequences. The echo command
of some shells, most notably "dash", interprets these backslash
sequences (POSIX.1 allows this) which may scramble the test
output.

Signed-off-by: Uwe Storbeck <uwe@ibr.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

run-command: mark run_hook_with_custom_index as deprecatedBenoit Pierre Tue, 18 Mar 2014 10:00:56 +0000 (11:00 +0100)

run-command: mark run_hook_with_custom_index as deprecated

Signed-off-by: Benoit Pierre <benoit.pierre@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge hook tests: fix and update testsBenoit Pierre Tue, 18 Mar 2014 10:00:55 +0000 (11:00 +0100)

merge hook tests: fix and update tests

- update 'no editor' hook test and add 'editor' hook test
- make sure the tree is reset to a clean state after running a test
(using test_when_finished) so later tests are not impacted

Signed-off-by: Benoit Pierre <benoit.pierre@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge: fix GIT_EDITOR override for commit hookBenoit Pierre Tue, 18 Mar 2014 10:00:54 +0000 (11:00 +0100)

merge: fix GIT_EDITOR override for commit hook

Don't set GIT_EDITOR to ":" when calling prepare-commit-msg hook if the
editor is going to be called (e.g. with "merge -e").

Signed-off-by: Benoit Pierre <benoit.pierre@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit: fix patch hunk editing with "commit -p -m"Benoit Pierre Tue, 18 Mar 2014 10:00:53 +0000 (11:00 +0100)

commit: fix patch hunk editing with "commit -p -m"

Don't change git environment: move the GIT_EDITOR=":" override to the
hook command subprocess, like it's already done for GIT_INDEX_FILE.

Signed-off-by: Benoit Pierre <benoit.pierre@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test patch hunk editing with "commit -p -m"Benoit Pierre Tue, 18 Mar 2014 10:00:52 +0000 (11:00 +0100)

test patch hunk editing with "commit -p -m"

Add (failing) tests: with commit changing the environment to let hooks
know that no editor will be used (by setting GIT_EDITOR to ":"), the
"edit hunk" functionality does not work (no editor is launched and the
whole hunk is committed).

Signed-off-by: Benoit Pierre <benoit.pierre@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

subtree: initialize "prefix" variableJeff King Mon, 17 Mar 2014 19:59:47 +0000 (15:59 -0400)

subtree: initialize "prefix" variable

We parse the "--prefix" command-line option into the
"$prefix" shell variable. However, if we do not see such an
option, the variable is left with whatever value it had in
the environment. We should initialize it to a known value,
like we do for other variables.

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