gitweb.git
Git 1.7.6-rc3 v1.7.6-rc3Junio C Hamano Wed, 22 Jun 2011 23:13:16 +0000 (16:13 -0700)

Git 1.7.6-rc3

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

Merge branch 'maint'Junio C Hamano Wed, 22 Jun 2011 21:01:18 +0000 (14:01 -0700)

Merge branch 'maint'

* maint:
Documentation: git diff --check respects core.whitespace

Documentation: git diff --check respects core.whitespaceChristof Krüger Wed, 22 Jun 2011 15:33:02 +0000 (17:33 +0200)

Documentation: git diff --check respects core.whitespace

Fix documentation on "git diff --check" by adopting the description from
"git apply --whitespace".

Signed-off-by: Christof Krüger <git@christof-krueger.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Tue, 21 Jun 2011 21:56:59 +0000 (14:56 -0700)

Merge branch 'maint'

* maint:
gitweb: 'pickaxe' and 'grep' features requires 'search' to be enabled

gitweb: 'pickaxe' and 'grep' features requires 'search... Jakub Narebski Tue, 21 Jun 2011 06:41:16 +0000 (08:41 +0200)

gitweb: 'pickaxe' and 'grep' features requires 'search' to be enabled

Both 'pickaxe' (searching changes) and 'grep' (searching files)
require basic 'search' feature to be enabled to work. Enabling
e.g. only 'pickaxe' won't work.

Add a comment about this.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'mk/grep-pcre'Junio C Hamano Mon, 20 Jun 2011 21:49:44 +0000 (14:49 -0700)

Merge branch 'mk/grep-pcre'

* mk/grep-pcre:
t7810: avoid unportable use of "echo"

t7810: avoid unportable use of "echo"Junio C Hamano Mon, 20 Jun 2011 21:49:34 +0000 (14:49 -0700)

t7810: avoid unportable use of "echo"

Michael J Gruber noticed that under /bin/dash this test failed
(as is expected -- \n in the string can be interpreted by the
command), while it passed with bash. We probably could work it
around by using backquote in front of it, but it is safer and
more readable to avoid "echo" altogether in a case like this.

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

plug a few coverity-spotted leaksJim Meyering Mon, 20 Jun 2011 07:40:06 +0000 (09:40 +0200)

plug a few coverity-spotted leaks

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'di/no-no-existant'Junio C Hamano Sun, 19 Jun 2011 23:01:54 +0000 (16:01 -0700)

Merge branch 'di/no-no-existant'

* di/no-no-existant:
Fix typo: existant->existent

Merge branch 'maint'Junio C Hamano Sun, 19 Jun 2011 23:01:51 +0000 (16:01 -0700)

Merge branch 'maint'

* maint:
builtin/gc.c: add missing newline in message

builtin/gc.c: add missing newline in messageAndreas Schwab Sun, 19 Jun 2011 08:03:26 +0000 (10:03 +0200)

builtin/gc.c: add missing newline in message

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

tests: link shell libraries into valgrind directoryJeff King Fri, 17 Jun 2011 20:36:32 +0000 (16:36 -0400)

tests: link shell libraries into valgrind directory

When we run tests under valgrind, we symlink anything
executable that starts with git-* or test-* into a special
valgrind bin directory, and then make that our
GIT_EXEC_PATH.

However, shell libraries like git-sh-setup do not have the
executable bit marked, and did not get symlinked. This
means that any test looking for shell libraries in our
exec-path would fail to find them, even though that is a
fine thing to do when testing against a regular git build
(or in a git install, for that matter).

t2300 demonstrated this problem. The fix is to symlink these
shell libraries directly into the valgrind directory.

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

t/Makefile: pass test opts to valgrind target properlyJeff King Fri, 17 Jun 2011 08:29:57 +0000 (04:29 -0400)

t/Makefile: pass test opts to valgrind target properly

The valgrind target just reinvokes make with GIT_TEST_OPTS
set to "--valgrind". However, it does this using an
environment variable, which means GIT_TEST_OPTS in your
config.mak would override it, and "make valgrind" would
simply run the test suite without valgrind on.

Instead, we should pass GIT_TEST_OPTS on the command-line,
overriding what's in config.mak, and take care to append to
whatever the user has there already.

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

Merge branch 'ab/i18n-scripts-basic'Junio C Hamano Fri, 17 Jun 2011 18:40:32 +0000 (11:40 -0700)

Merge branch 'ab/i18n-scripts-basic'

* ab/i18n-scripts-basic:
sh-i18n--envsubst.c: do not #include getopt.h

sh-i18n--envsubst.c: do not #include getopt.hBrandon Casey Fri, 17 Jun 2011 18:19:26 +0000 (11:19 -0700)

sh-i18n--envsubst.c: do not #include getopt.h

The getopt.h header file is not used. It's inclusion is left over from the
original version of this source. Additionally, getopt.h does not exist on
all platforms (SunOS 5.7) and will cause a compilation failure. So, let's
remove it.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix typo: existant->existentDmitry Ivankov Thu, 16 Jun 2011 13:42:48 +0000 (19:42 +0600)

Fix typo: existant->existent

refs.c had a error message "Trying to write ref with nonexistant object".
And no tests relied on the wrong spelling.
Also typo was present in some test scripts internals, these tests still pass.

Signed-off-by: Dmitry Ivankov <divanorama@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.7.6-rc2 v1.7.6-rc2Junio C Hamano Thu, 16 Jun 2011 16:21:36 +0000 (09:21 -0700)

Git 1.7.6-rc2

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

gitweb: do not misparse nonnumeric content tag files... Jonathan Nieder Thu, 9 Jun 2011 07:08:57 +0000 (02:08 -0500)

gitweb: do not misparse nonnumeric content tag files that contain a digit

v1.7.6-rc0~27^2~4 (gitweb: Change the way "content tags" ('ctags') are
handled, 2011-04-29) tried to make gitweb's tag cloud feature more
intuitive for webmasters by checking whether the ctags/<label> under
a project's .git dir contains a number (representing the strength of
association to <label>) before treating it as one.

With that change, after putting '$feature{'ctags'}{'default'} = [1];'
in your $GITWEB_CONFIG, you could do

echo Linux >.git/ctags/linux

and gitweb would treat that as a request to tag the current repository
with the Linux tag, instead of the previous behavior of writing an
error page embedded in the projects list that triggers error messages
from Chromium and Firefox about malformed XML.

Unfortunately the pattern (\d+) used to match numbers is too loose,
and the "XML declaration allowed only at the start of the document"
error can still be experienced if you write "Linux-2.6" in place of
"Linux" in the example above. Fix it by tightening the pattern to
^\d+$.

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

Git 1.7.6-rc1 v1.7.6-rc1Junio C Hamano Thu, 9 Jun 2011 01:29:48 +0000 (18:29 -0700)

Git 1.7.6-rc1

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

Merge branch 'maint'Junio C Hamano Thu, 9 Jun 2011 01:13:39 +0000 (18:13 -0700)

Merge branch 'maint'

* maint:
fetch: do not leak a refspec

fetch: do not leak a refspecJim Meyering Wed, 8 Jun 2011 20:06:33 +0000 (22:06 +0200)

fetch: do not leak a refspec

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jc/magic-pathspec'Junio C Hamano Tue, 7 Jun 2011 15:32:42 +0000 (08:32 -0700)

Merge branch 'jc/magic-pathspec'

* jc/magic-pathspec:
t3703: skip more tests using colons in file names on Windows

t3703: skip more tests using colons in file names on... Alex Riesen Tue, 7 Jun 2011 09:49:44 +0000 (11:49 +0200)

t3703: skip more tests using colons in file names on Windows

Use the same test and prerequisite as introduced in similar
fix in 650af7ae8bdf92bd92df2.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jn/mime-type-with-params'Junio C Hamano Mon, 6 Jun 2011 18:40:22 +0000 (11:40 -0700)

Merge branch 'jn/mime-type-with-params'

* jn/mime-type-with-params:
gitweb: Fix usability of $prevent_xss

Merge branch 'jn/gitweb-docs'Junio C Hamano Mon, 6 Jun 2011 18:40:18 +0000 (11:40 -0700)

Merge branch 'jn/gitweb-docs'

* jn/gitweb-docs:
gitweb: Move "Requirements" up in gitweb/INSTALL
gitweb: Describe CSSMIN and JSMIN in gitweb/INSTALL
gitweb: Move information about installation from README to INSTALL

Merge branch 'jk/diff-not-so-quick'Junio C Hamano Mon, 6 Jun 2011 18:40:14 +0000 (11:40 -0700)

Merge branch 'jk/diff-not-so-quick'

* jk/diff-not-so-quick:
diff: futureproof "stop feeding the backend early" logic
diff_tree: disable QUICK optimization with diff filter

Conflicts:
diff.c

Merge branch 'bc/maint-status-z-to-use-porcelain'Junio C Hamano Mon, 6 Jun 2011 18:40:08 +0000 (11:40 -0700)

Merge branch 'bc/maint-status-z-to-use-porcelain'

* bc/maint-status-z-to-use-porcelain:
builtin/commit.c: set status_format _after_ option parsing
t7508: demonstrate status's failure to use --porcelain format with -z

Conflicts:
builtin/commit.c

gitweb: Fix usability of $prevent_xssJakub Narebski Sat, 4 Jun 2011 08:43:35 +0000 (10:43 +0200)

gitweb: Fix usability of $prevent_xss

With XSS prevention on (enabled using $prevent_xss), blobs
('blob_plain') of all types except a few known safe ones are served
with "Content-Disposition: attachment". However the check was too
strict; it didn't take into account optional parameter attributes,

media-type = type "/" subtype *( ";" parameter )

as described in RFC 2616

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7

This fixes that, and it for example treats following as safe MIME
media type:

text/plain; charset=utf-8

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb: Move "Requirements" up in gitweb/INSTALLJakub Narebski Fri, 3 Jun 2011 16:31:48 +0000 (18:31 +0200)

gitweb: Move "Requirements" up in gitweb/INSTALL

This way you can examine prerequisites at first glance, before
detailed instructions on installing gitweb. Straightforward
text movement.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb: Describe CSSMIN and JSMIN in gitweb/INSTALLJakub Narebski Thu, 2 Jun 2011 14:55:53 +0000 (16:55 +0200)

gitweb: Describe CSSMIN and JSMIN in gitweb/INSTALL

The build-time configuration variables JSMIN and CSSMIN were mentioned
only in Makefile; add their description to gitweb/INSTALL.

This required moving description of GITWEB_JS up, near GITWEB_CSS and
just introduced CSMIN and JSMIN.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb: Move information about installation from README... Jakub Narebski Thu, 2 Jun 2011 14:55:52 +0000 (16:55 +0200)

gitweb: Move information about installation from README to INSTALL

Almost straightformard moving of "How to configure gitweb for your
local system" section from gitweb/README to gitweb/INSTALL, as it is
about build time configuration. Updated references to it.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with 1.7.5.4 v1.7.6-rc0Junio C Hamano Wed, 1 Jun 2011 21:11:17 +0000 (14:11 -0700)

Sync with 1.7.5.4

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

Git 1.7.5.4 v1.7.5.4Junio C Hamano Wed, 1 Jun 2011 21:08:26 +0000 (14:08 -0700)

Git 1.7.5.4

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

Merge branch 'jk/maint-config-alias-fix' into maintJunio C Hamano Wed, 1 Jun 2011 21:05:22 +0000 (14:05 -0700)

Merge branch 'jk/maint-config-alias-fix' into maint

* jk/maint-config-alias-fix:
handle_options(): do not miscount how many arguments were used
config: always parse GIT_CONFIG_PARAMETERS during git_config
git_config: don't peek at global config_parameters
config: make environment parsing routines static

Merge branch 'jc/fmt-req-fix' into maintJunio C Hamano Wed, 1 Jun 2011 21:03:07 +0000 (14:03 -0700)

Merge branch 'jc/fmt-req-fix' into maint

* jc/fmt-req-fix:
userformat_find_requirements(): find requirement for the correct format

Merge branch 'jk/maint-docs' into maintJunio C Hamano Wed, 1 Jun 2011 21:02:52 +0000 (14:02 -0700)

Merge branch 'jk/maint-docs' into maint

* jk/maint-docs:
docs: fix some antique example output
docs: make sure literal "->" isn't converted to arrow
docs: update status --porcelain format
docs: minor grammar fixes to git-status

Merge branch 'jn/doc-remote-helpers' into maintJunio C Hamano Wed, 1 Jun 2011 21:02:45 +0000 (14:02 -0700)

Merge branch 'jn/doc-remote-helpers' into maint

* jn/doc-remote-helpers:
Documentation: do not misinterpret refspecs as bold text

Merge branch 'kk/maint-prefix-in-config-mak' into maintJunio C Hamano Wed, 1 Jun 2011 21:02:39 +0000 (14:02 -0700)

Merge branch 'kk/maint-prefix-in-config-mak' into maint

* kk/maint-prefix-in-config-mak:
config.mak.in: allow "configure --sysconfdir=/else/where"

diffcore-rename.c: avoid set-but-not-used warningJim Meyering Fri, 29 Apr 2011 09:42:41 +0000 (11:42 +0200)

diffcore-rename.c: avoid set-but-not-used warning

Since 9d8a5a5 (diffcore-rename: refactor "too many candidates" logic,
2011-01-06), diffcore_rename() initializes num_src but does not use it
anymore. "-Wunused-but-set-variable" in gcc-4.6 complains about this.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.7.6Junio C Hamano Tue, 31 May 2011 19:22:50 +0000 (12:22 -0700)

Update draft release notes to 1.7.6

I think we are almost there for the feature freeze.

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

Merge branch 'jk/format-patch-am'Junio C Hamano Tue, 31 May 2011 19:19:11 +0000 (12:19 -0700)

Merge branch 'jk/format-patch-am'

* jk/format-patch-am:
format-patch: preserve subject newlines with -k
clean up calling conventions for pretty.c functions
pretty: add pp_commit_easy function for simple callers
mailinfo: always clean up rfc822 header folding
t: test subject handling in format-patch / am pipeline

Conflicts:
builtin/branch.c
builtin/log.c
commit.h

Merge branch 'jn/doc-remote-helpers'Junio C Hamano Tue, 31 May 2011 19:09:35 +0000 (12:09 -0700)

Merge branch 'jn/doc-remote-helpers'

* jn/doc-remote-helpers:
Documentation: do not misinterpret refspecs as bold text

Merge branch 'jk/format-patch-empty-prefix'Junio C Hamano Tue, 31 May 2011 19:09:27 +0000 (12:09 -0700)

Merge branch 'jk/format-patch-empty-prefix'

* jk/format-patch-empty-prefix:
format-patch: make zero-length subject prefixes prettier

Merge branch 'ab/i18n-envsubst-doc-fix'Junio C Hamano Tue, 31 May 2011 19:09:21 +0000 (12:09 -0700)

Merge branch 'ab/i18n-envsubst-doc-fix'

* ab/i18n-envsubst-doc-fix:
git-sh-i18n--envsubst: add SYNOPSIS section to the documentation

Merge branch 'jc/log-quiet-fix'Junio C Hamano Tue, 31 May 2011 19:09:18 +0000 (12:09 -0700)

Merge branch 'jc/log-quiet-fix'

* jc/log-quiet-fix:
log: --quiet should serve as synonym to -s

Merge branch 'kk/maint-prefix-in-config-mak'Junio C Hamano Tue, 31 May 2011 19:09:12 +0000 (12:09 -0700)

Merge branch 'kk/maint-prefix-in-config-mak'

* kk/maint-prefix-in-config-mak:
config.mak.in: allow "configure --sysconfdir=/else/where"

Merge branch 'jk/rebase-head-reflog'Junio C Hamano Tue, 31 May 2011 19:09:08 +0000 (12:09 -0700)

Merge branch 'jk/rebase-head-reflog'

* jk/rebase-head-reflog:
rebase: write a reflog entry when finishing
rebase: create HEAD reflog entry when aborting

Merge branch 'jk/maint-docs'Junio C Hamano Tue, 31 May 2011 19:09:00 +0000 (12:09 -0700)

Merge branch 'jk/maint-docs'

* jk/maint-docs:
docs: fix some antique example output
docs: make sure literal "->" isn't converted to arrow
docs: update status --porcelain format
docs: minor grammar fixes to git-status

Merge branch 'jk/read-in-full-stops-on-error'Junio C Hamano Tue, 31 May 2011 19:08:55 +0000 (12:08 -0700)

Merge branch 'jk/read-in-full-stops-on-error'

* jk/read-in-full-stops-on-error:
read_in_full: always report errors

Merge branch 'jk/maint-remote-mirror-safer'Junio C Hamano Tue, 31 May 2011 19:08:52 +0000 (12:08 -0700)

Merge branch 'jk/maint-remote-mirror-safer'

* jk/maint-remote-mirror-safer:
remote: allow "-t" with fetch mirrors

Merge branch 'jl/read-tree-m-dry-run'Junio C Hamano Tue, 31 May 2011 19:08:48 +0000 (12:08 -0700)

Merge branch 'jl/read-tree-m-dry-run'

* jl/read-tree-m-dry-run:
Teach read-tree the -n|--dry-run option
unpack-trees: add the dry_run flag to unpack_trees_options

Sync with maintJunio C Hamano Tue, 31 May 2011 19:07:14 +0000 (12:07 -0700)

Sync with maint

Start 1.7.5.4 draft release notesJunio C Hamano Tue, 31 May 2011 19:06:40 +0000 (12:06 -0700)

Start 1.7.5.4 draft release notes

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

Merge branch 'tr/add-i-no-escape' into maintJunio C Hamano Tue, 31 May 2011 19:02:04 +0000 (12:02 -0700)

Merge branch 'tr/add-i-no-escape' into maint

* tr/add-i-no-escape:
add -i: ignore terminal escape sequences

Merge branch 'vh/config-interactive-singlekey-doc'... Junio C Hamano Tue, 31 May 2011 19:01:06 +0000 (12:01 -0700)

Merge branch 'vh/config-interactive-singlekey-doc' into maint

* vh/config-interactive-singlekey-doc:
git-reset.txt: better docs for '--patch'
git-checkout.txt: better docs for '--patch'
git-stash.txt: better docs for '--patch'
git-add.txt: document 'interactive.singlekey'
config.txt: 'interactive.singlekey; is used by...

Merge branch 'ml/test-readme' into maintJunio C Hamano Tue, 31 May 2011 19:00:43 +0000 (12:00 -0700)

Merge branch 'ml/test-readme' into maint

* ml/test-readme:
t/README: unify documentation of test function args

Merge branch 'ab/i18n-fixup' into maintJunio C Hamano Tue, 31 May 2011 19:00:27 +0000 (12:00 -0700)

Merge branch 'ab/i18n-fixup' into maint

* ab/i18n-fixup: (24 commits)
i18n: use test_i18n{cmp,grep} in t7600, t7607, t7611 and t7811
i18n: use test_i18n{grep,cmp} in t7508
i18n: use test_i18ngrep in t7506
i18n: use test_i18ngrep and test_i18ncmp in t7502
i18n: use test_i18ngrep in t7501
i18n: use test_i18ncmp in t7500
i18n: use test_i18ngrep in t7201
i18n: use test_i18ncmp and test_i18ngrep in t7102 and t7110
i18n: use test_i18ncmp and test_i18ngrep in t5541, t6040, t6120, t7004, t7012 and t7060
i18n: use test_i18ncmp and test_i18ngrep in t3700, t4001 and t4014
i18n: use test_i18ncmp and test_i18ngrep in t3203, t3501 and t3507
i18n: use test_i18ngrep in t2020, t2204, t3030, and t3200
i18n: use test_i18ngrep in lib-httpd and t2019
i18n: do not overuse C_LOCALE_OUTPUT (grep)
i18n: use test_i18ncmp in t1200 and t2200
i18n: .git file is not a human readable message (t5601)
i18n: do not overuse C_LOCALE_OUTPUT
i18n: mark init-db messages for translation
i18n: mark checkout plural warning for translation
i18n: mark checkout --detach messages for translation
...

Merge branch 'jc/rename-degrade-cc-to-c' into maintJunio C Hamano Tue, 31 May 2011 19:00:02 +0000 (12:00 -0700)

Merge branch 'jc/rename-degrade-cc-to-c' into maint

* jc/rename-degrade-cc-to-c:
diffcore-rename: fall back to -C when -C -C busts the rename limit
diffcore-rename: record filepair for rename src
diffcore-rename: refactor "too many candidates" logic
builtin/diff.c: remove duplicated call to diff_result_code()

Merge branch 'rr/doc-content-type' into maintJunio C Hamano Tue, 31 May 2011 18:59:39 +0000 (11:59 -0700)

Merge branch 'rr/doc-content-type' into maint

* rr/doc-content-type:
Documentation: Allow custom diff tools to be specified in 'diff.tool'
Documentation: Add diff.<driver>.* to config
Documentation: Move diff.<driver>.* from config.txt to diff-config.txt
Documentation: Add filter.<driver>.* to config

config.c: Remove unused git_config_global() functionRamsay Jones Tue, 31 May 2011 17:23:42 +0000 (18:23 +0100)

config.c: Remove unused git_config_global() function

Commit 8f323c00 (drop support for GIT_CONFIG_NOGLOBAL, 15-03-2011)
removed the git_config_global() function, among other things, since
it is no longer required. Unfortunately, this function has since
been unintentionally restored by a faulty conflict resolution.

Remove it.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff: futureproof "stop feeding the backend early"... Junio C Hamano Tue, 31 May 2011 16:14:17 +0000 (09:14 -0700)

diff: futureproof "stop feeding the backend early" logic

Refactor the "do not stop feeding the backend early" logic into a small
helper function and use it in both run_diff_files() and diff_tree() that
has the stop-early optimization. We may later add other types of diffcore
transformation that require to look at the whole result like diff-filter
does, and having the logic in a single place is essential for longer term
maintainability.

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

diff_tree: disable QUICK optimization with diff filterJeff King Tue, 31 May 2011 15:33:56 +0000 (11:33 -0400)

diff_tree: disable QUICK optimization with diff filter

We stop looking for changes early with QUICK, so our diff
queue contains only a subset of the changes. However, we
don't apply diff filters until later; it will appear at that
point as though there are no changes matching our filter,
when in reality we simply didn't keep looking for changes
long enough.

Commit 2cfe8a6 (diff --quiet: disable optimization when
--diff-filter=X is used, 2011-03-16) fixes this in some
cases by disabling the optimization when a filter is
present. However, it only tweaked run_diff_files, missing
the similar case in diff_tree. Thus the fix worked only for
diffing the working tree and index, but not between trees.

Noticed by Yasushi SHOJI.

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

Merge branch 'jc/fmt-req-fix'Junio C Hamano Tue, 31 May 2011 03:19:21 +0000 (20:19 -0700)

Merge branch 'jc/fmt-req-fix'

* jc/fmt-req-fix:
userformat_find_requirements(): find requirement for the correct format

Merge branch 'jk/maint-config-alias-fix'Junio C Hamano Tue, 31 May 2011 03:19:14 +0000 (20:19 -0700)

Merge branch 'jk/maint-config-alias-fix'

* jk/maint-config-alias-fix:
handle_options(): do not miscount how many arguments were used
config: always parse GIT_CONFIG_PARAMETERS during git_config
git_config: don't peek at global config_parameters
config: make environment parsing routines static

Conflicts:
config.c

Documentation: do not misinterpret refspecs as bold... Jonathan Nieder Mon, 30 May 2011 15:52:56 +0000 (10:52 -0500)

Documentation: do not misinterpret refspecs as bold text

In v1.7.3.3~2 (Documentation: do not misinterpret pull refspec as bold
text, 2010-12-03) many uses of asterisks in expressions like
"refs/heads/*:refs/svn/origin/branches/*" were escaped as {asterisk}
to avoid being treated as delimiters for bold text, but these two were
missed.

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

format-patch: make zero-length subject prefixes prettierJeff King Mon, 30 May 2011 14:19:05 +0000 (10:19 -0400)

format-patch: make zero-length subject prefixes prettier

If you give a zero-length subject prefix to format-patch
(e.g., "format-patch --subject-prefix="), we will print the
ugly:

Subject: [ 1/2] your subject here

because we always insert a space between the prefix and
numbering. Requiring the user to provide the space in their
prefix would be more flexible, but would break existing
usage. This patch provides a DWIM and suppresses the space
for zero-length prefixes, under the assumption that nobody
actually wants "[ 1/2]".

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

git-sh-i18n--envsubst: add SYNOPSIS section to the... Ævar Arnfjörð Bjarmason Sun, 29 May 2011 11:00:35 +0000 (11:00 +0000)

git-sh-i18n--envsubst: add SYNOPSIS section to the documentation

Change the documentation for the git-sh-i18n--envsubst program to
include a SYNOPSIS section. Include the invocation of the program from
git-sh-i18n.sh.

Not having a SYNOPSIS section caused the "doc" target to fail on
Centos 5.5 with asciidoc 8.2.5, while building with 8.6.4 on Debian
works just fine.

The relevant error was:

ERROR: git-sh-i18n--envsubst.txt: line 9: second section must be named SYNOPSIS

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Mon, 30 May 2011 07:09:55 +0000 (00:09 -0700)

Merge branch 'maint'

* maint:
git-submodule.sh: separate parens by a space to avoid confusing some shells
Documentation/technical/api-diff.txt: correct name of diff_unmerge()
read_gitfile_gently: use ssize_t to hold read result
remove tests of always-false condition
rerere.c: diagnose a corrupt MERGE_RR when hitting EOF between TAB and '\0'

Merge branch 'jm/maint-misc-fix' into maintJunio C Hamano Mon, 30 May 2011 07:09:41 +0000 (00:09 -0700)

Merge branch 'jm/maint-misc-fix' into maint

* jm/maint-misc-fix:
read_gitfile_gently: use ssize_t to hold read result
remove tests of always-false condition
rerere.c: diagnose a corrupt MERGE_RR when hitting EOF between TAB and '\0'

Merge branch 'bc/maint-submodule-fix-parked' into maintJunio C Hamano Mon, 30 May 2011 07:09:36 +0000 (00:09 -0700)

Merge branch 'bc/maint-submodule-fix-parked' into maint

* bc/maint-submodule-fix-parked:
git-submodule.sh: separate parens by a space to avoid confusing some shells

Merge branch 'bc/maint-api-doc-parked' into maintJunio C Hamano Mon, 30 May 2011 07:03:52 +0000 (00:03 -0700)

Merge branch 'bc/maint-api-doc-parked' into maint

* bc/maint-api-doc-parked:
Documentation/technical/api-diff.txt: correct name of diff_unmerge()

Merge branch 'mk/grep-pcre'Junio C Hamano Mon, 30 May 2011 07:00:07 +0000 (00:00 -0700)

Merge branch 'mk/grep-pcre'

* mk/grep-pcre:
git-grep: Fix problems with recently added tests
git-grep: Update tests (mainly for -P)
Makefile: Pass USE_LIBPCRE down in GIT-BUILD-OPTIONS
git-grep: update tests now regexp type is "last one wins"
git-grep: do not die upon -F/-P when grep.extendedRegexp is set.
git-grep: Bail out when -P is used with -F or -E
grep: Add basic tests
configure: Check for libpcre
git-grep: Learn PCRE
grep: Extract compile_regexp_failed() from compile_regexp()
grep: Fix a typo in a comment
grep: Put calls to fixmatch() and regmatch() into patmatch()
contrib/completion: --line-number to git grep
Documentation: Add --line-number to git-grep synopsis

git-grep: Fix problems with recently added testsMichał Kiedrowicz Thu, 26 May 2011 22:43:59 +0000 (00:43 +0200)

git-grep: Fix problems with recently added tests

Brian Gernhardt reported that test 'git grep -E -F -G a\\+b' fails on
OS X 10.6.7. This is because I assumed \+ is part of BRE, which isn't
true on all platforms.

The easiest way to make this test pass is to just update expected
output, but that would make the test pointless. Its real purpose is to
check whether 'git grep -E -F -G' is different from 'git grep -E -G -F'.
To check that, let's change pattern to "a+b*c". This should return
different match for -G, -F and -E.

I also made two small tweaks to the tests. First, I added path "ab" to
all calls to future-proof tests. Second, I updated last two tests to
better show that 'git grep -P -E' is different from 'git grep -E -P'.

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jc/notes-batch-removal'Junio C Hamano Mon, 30 May 2011 06:51:26 +0000 (23:51 -0700)

Merge branch 'jc/notes-batch-removal'

* jc/notes-batch-removal:
show: --ignore-missing
notes remove: --stdin reads from the standard input
notes remove: --ignore-missing
notes remove: allow removing more than one

Merge branch 'jk/haves-from-alternate-odb'Junio C Hamano Mon, 30 May 2011 06:51:22 +0000 (23:51 -0700)

Merge branch 'jk/haves-from-alternate-odb'

* jk/haves-from-alternate-odb:
receive-pack: eliminate duplicate .have refs
bisect: refactor sha1_array into a generic sha1 list
refactor refs_from_alternate_cb to allow passing extra data

Merge branch 'jn/run-command-error-failure' into maintJunio C Hamano Mon, 30 May 2011 02:08:51 +0000 (19:08 -0700)

Merge branch 'jn/run-command-error-failure' into maint

* jn/run-command-error-failure:
run-command: handle short writes and EINTR in die_child
tests: check error message from run_command

builtin/commit.c: set status_format _after_ option... Brandon Casey Thu, 26 May 2011 20:43:21 +0000 (13:43 -0700)

builtin/commit.c: set status_format _after_ option parsing

'git status' should use --porcelain output format when -z is given.
It was not doing so since the _effect_ of using -z, namely that
null_termination would be set, was being checked _before_ option parsing
was performed.

So, move the check so that it is performed after option parsing.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7508: demonstrate status's failure to use --porcelain... Brandon Casey Thu, 26 May 2011 20:43:20 +0000 (13:43 -0700)

t7508: demonstrate status's failure to use --porcelain format with -z

When 'git status' is supplied the -z switch, and no output format has been
selected, it is supposed to use the --porcelain format. This does not
happen. Instead, the standard long format is used. Add a test to
demonstrate this failure.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

log: --quiet should serve as synonym to -sJunio C Hamano Sat, 28 May 2011 19:25:24 +0000 (12:25 -0700)

log: --quiet should serve as synonym to -s

The previous commit simply hijacked --quiet and essentially made it into a
no-op. Instead, take it as a cue that the end user wants to omit the patch
output from commands that default to show patches, e.g. "show".

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

rebase: write a reflog entry when finishingJeff King Fri, 27 May 2011 20:16:14 +0000 (16:16 -0400)

rebase: write a reflog entry when finishing

When we finish a rebase, our detached HEAD is at the final
result. We update the original branch ref with this result,
and then point the HEAD symbolic ref at the updated branch.
We write a reflog for the branch update, but not for the
update of HEAD.

Because we're already at the final result on the detached
HEAD, moving to the branch actually doesn't change our
commit sha1 at all. So in that sense, a reflog entry would
be pointless.

However, humans do read reflogs, and an entry saying "rebase
finished: returning to refs/heads/master" can be helpful in
understanding what is going on.

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

rebase: create HEAD reflog entry when abortingCsaba Henk Fri, 27 May 2011 20:13:02 +0000 (16:13 -0400)

rebase: create HEAD reflog entry when aborting

When we abort a rebase, we return to the original value of
HEAD. Failing to write a reflog entry means we create a
gap in the reflog (which can cause "git show
HEAD@{5.minutes.ago}" to issue a warning). Plus having the
extra entry makes the reflog easier to follow for a human.

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

config.mak.in: allow "configure --sysconfdir=/else... Junio C Hamano Thu, 5 May 2011 01:50:45 +0000 (18:50 -0700)

config.mak.in: allow "configure --sysconfdir=/else/where"

We do allow vanilla Makefile users to say make sysconfdir=/else/where
and config.mak can also be tweaked manually for the same effect. Give
the same configurablity to ./configure users as well.

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

docs: fix some antique example outputJeff King Fri, 27 May 2011 02:33:15 +0000 (22:33 -0400)

docs: fix some antique example output

These diff-index and diff-tree sample outputs date back to
the first month of git's existence. The output format has
changed slightly since then, so let's have it match the
current output.

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

docs: make sure literal "->" isn't converted to arrowJeff King Fri, 27 May 2011 02:32:41 +0000 (22:32 -0400)

docs: make sure literal "->" isn't converted to arrow

Recent versions of asciidoc will treat "->" as a
single-glyph arrow symbol, unless it is inside a literal
code block. This is a problem if we are discussing literal
output and want to show the ASCII characters.

Our usage falls into three categories:

1. Inside a code block. These can be left as-is.

2. Discussing literal output or code, but inside a
paragraph. This patch escapes these as "\->".

3. Using the arrow as a symbolic element, such as "use the
Edit->Account Settings menu". In this case, the
arrow symbol is preferable, so we leave it as-is.

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

docs: update status --porcelain formatJeff King Fri, 27 May 2011 02:31:51 +0000 (22:31 -0400)

docs: update status --porcelain format

The --porcelain format was originally identical to the
--short format, but designed to be stable as the short
format changed. Since this was written, the short format
picked up a few incompatible niceties, but this description
was never changed.

Let's mention the differences. While we're at it, let's add
some sub-section headings to make the "output" section a
little easier to navigate.

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

docs: minor grammar fixes to git-statusJeff King Fri, 27 May 2011 02:31:11 +0000 (22:31 -0400)

docs: minor grammar fixes to git-status

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

format-patch: preserve subject newlines with -kJeff King Thu, 26 May 2011 22:28:17 +0000 (18:28 -0400)

format-patch: preserve subject newlines with -k

In older versions of git, we used rfc822 header folding to
indicate that the original subject line had multiple lines
in it. But since a1f6baa (format-patch: wrap long header
lines, 2011-02-23), we now use header folding whenever there
is a long line.

This means that "git am" cannot trust header folding as a
sign from format-patch that newlines should be preserved.
Instead, format-patch needs to signal more explicitly that
the newlines are significant. This patch does so by
rfc2047-encoding the newlines in the subject line. No
changes are needed on the "git am" end; it already decodes
the newlines properly.

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

clean up calling conventions for pretty.c functionsJeff King Thu, 26 May 2011 22:27:49 +0000 (18:27 -0400)

clean up calling conventions for pretty.c functions

We have a pretty_print_context representing the parameters
for a pretty-print session, but we did not use it uniformly.
As a result, functions kept growing more and more arguments.

Let's clean this up in a few ways:

1. All pretty-print pp_* functions now take a context.
This lets us reduce the number of arguments to these
functions, since we were just passing around the
context values separately.

2. The context argument now has a cmit_fmt field, which
was passed around separately. That's one less argument
per function.

3. The context argument always comes first, which makes
calling a little more uniform.

This drops lines from some callers, and adds lines in a few
places (because we need an extra line to set the context's
fmt field). Overall, we don't save many lines, but the lines
that are there are a lot simpler and more readable.

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

pretty: add pp_commit_easy function for simple callersJeff King Thu, 26 May 2011 22:27:24 +0000 (18:27 -0400)

pretty: add pp_commit_easy function for simple callers

Many callers don't actually care about the pretty print
context at all; let's just give them a simple way of
pretty-printing a commit without having to create a context
struct.

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

git-submodule.sh: separate parens by a space to avoid... Brandon Casey Thu, 26 May 2011 20:52:04 +0000 (13:52 -0700)

git-submodule.sh: separate parens by a space to avoid confusing some shells

Some shells interpret '(( ))' according to the rules for arithmetic
expansion. This may not follow POSIX, but is prevalent in commonly used
shells. Bash does not have a problem with this particular instance of
'((', likely because it is not followed by a '))', but the public domain
ksh does, and so does ksh on IRIX 6.5.

So, add a space between the parenthesis to avoid confusing these shells.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/technical/api-diff.txt: correct name... Brandon Casey Thu, 26 May 2011 20:46:56 +0000 (13:46 -0700)

Documentation/technical/api-diff.txt: correct name of diff_unmerge()

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mailinfo: always clean up rfc822 header foldingJeff King Thu, 26 May 2011 20:53:38 +0000 (16:53 -0400)

mailinfo: always clean up rfc822 header folding

Without the "-k" option, mailinfo will convert a folded
subject header like:

Subject: this is a
subject that doesn't
fit on one line

into a single line. With "-k", however, we assumed that
these newlines were significant and represented something
that the sending side would want us to preserve.

For messages created by format-patch, this assumption was
broken by a1f6baa (format-patch: wrap long header lines,
2011-02-23). For messages sent by arbitrary MUAs, this was
probably never a good assumption to make, as they may have
been folding subjects in accordance with rfc822's line
length recommendations all along.

This patch now joins folded lines with a single whitespace
character. This treats header folding purely as a syntactic
feature of the transport mechanism, not as something that
format-patch is trying to tell us about the original
subject.

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

t: test subject handling in format-patch / am pipelineJeff King Thu, 26 May 2011 20:41:18 +0000 (16:41 -0400)

t: test subject handling in format-patch / am pipeline

Commit a1f6baa (format-patch: wrap long header lines,
2011-02-23) changed format-patch's behavior with respect to
long header lines, but made no accompanying changes to the
receiving side. It was thought that "git am" would handle
these folded subjects fine, but there is a regression when
using "am -k".

Let's add a test documenting this. While we're at it, let's
give more complete test coverage to document what should be
happening in each case. We test three types of subjects:
a short one, one long enough to require wrapping, and a
multiline subject. For each, we test these three
combinations:

format-patch | am
format-patch -k | am
format-patch -k | am -k

We don't bother testing "format-patch | am -k", which is
nonsense (you will be adding in [PATCH] cruft to each
subject).

This reveals the regression above (long subjects have
linebreaks introduced via "format-patch -k | am -k"),
as well as an existing non-optimal behavior (multiline
subjects are not preserved using "-k").

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

read_in_full: always report errorsJeff King Thu, 26 May 2011 16:30:27 +0000 (12:30 -0400)

read_in_full: always report errors

The read_in_full function repeatedly calls read() to fill a
buffer. If the first read() returns an error, we notify the
caller by returning the error. However, if we read some data
and then get an error on a subsequent read, we simply return
the amount of data that we did read, and the caller is
unaware of the error.

This makes the tradeoff that seeing the partial data is more
important than the fact that an error occurred. In practice,
this is generally not the case; we care more if an error
occurred, and should throw away any partial data.

I audited the current callers. In most cases, this will make
no difference at all, as they do:

if (read_in_full(fd, buf, size) != size)
error("short read");

However, it will help in a few cases:

1. In sha1_file.c:index_stream, we would fail to notice
errors in the incoming stream.

2. When reading symbolic refs in resolve_ref, we would
fail to notice errors and potentially use a truncated
ref name.

3. In various places, we will get much better error
messages. For example, callers of safe_read would
erroneously print "the remote end hung up unexpectedly"
instead of showing the read error.

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

remote: allow "-t" with fetch mirrorsJeff King Thu, 26 May 2011 15:11:00 +0000 (11:11 -0400)

remote: allow "-t" with fetch mirrors

Commit 13fc2c1 (remote: disallow some nonsensical option
combinations, 2011-03-30) made it impossible to use "remote
add -t foo --mirror". The argument was that specifying
specific branches is useless because:

1. Push mirrors do not want a refspec at all.

2. The point of fetch mirroring is to use a broad refspec
like "refs/*", but using "-t" overrides that.

Point (1) is valid; "-t" with push mirrors is useless. But
point (2) ignored another side effect of using --mirror: it
fetches the refs directly into the refs/ namespace as they
are found upstream, instead of placing them in a
separate-remote layout.

So 13fc2c1 was overly constrictive, and disallowed
reasonable specific-branch mirroring, like:

git remote add -t heads/foo -t heads/bar --mirror=fetch

which makes the local "foo" and "bar" branches direct
mirrors of the remote, but does not fetch anything else.

This patch restores the original behavior, but only for
fetch mirrors.

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

read_gitfile_gently: use ssize_t to hold read resultJeff King Thu, 26 May 2011 16:28:44 +0000 (12:28 -0400)

read_gitfile_gently: use ssize_t to hold read result

Otherwise, a negative error return becomes a very large read
value. We catch this in practice because we compare the
expected and actual numbers of bytes (and you are not likely
to be reading (size_t)-1 bytes), but this makes the
correctness a little more obvious.

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

remove tests of always-false conditionJim Meyering Thu, 26 May 2011 13:58:16 +0000 (15:58 +0200)

remove tests of always-false condition

* fsck.c (fsck_error_function): Don't test obj->sha1 == 0.
It can never be true, since that sha1 member is an array.
* transport.c (set_upstreams): Likewise for ref->new_sha1.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

plug a DIR buffer leak in rerere.cJim Meyering Thu, 26 May 2011 13:55:50 +0000 (15:55 +0200)

plug a DIR buffer leak in rerere.c

Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rerere.c: diagnose a corrupt MERGE_RR when hitting... Jim Meyering Thu, 26 May 2011 13:54:18 +0000 (15:54 +0200)

rerere.c: diagnose a corrupt MERGE_RR when hitting EOF between TAB and '\0'

If we reach EOF after the SHA1-then-TAB, yet before the NUL that
terminates each file name, we would fill the file name buffer with \255
bytes resulting from the repeatedly-failing fgetc (returns EOF/-1) and
ultimately complain about "filename too long", because no NUL was
encountered.

Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update 1.7.6 draft release notesJunio C Hamano Thu, 26 May 2011 17:41:33 +0000 (10:41 -0700)

Update 1.7.6 draft release notes

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