Junio C Hamano [Mon, 5 Mar 2012 19:32:08 +0000 (11:32 -0800)]
fsck doc: a minor typofix
Reword the misspelled "squelch" noticed by Hermann Gaustere to say
"omit", which would sit better anyway.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thomas Rast [Mon, 5 Mar 2012 13:48:49 +0000 (14:48 +0100)]
fast-import: zero all of 'struct tag' to silence valgrind
When running t9300, valgrind (correctly) complains about an
uninitialized value in write_crash_report:
==2971== Use of uninitialised value of size 8
==2971== at 0x4164F4: sha1_to_hex (hex.c:70)
==2971== by 0x4073E4: die_nicely (fast-import.c:468)
==2971== by 0x43284C: die (usage.c:86)
==2971== by 0x40420D: main (fast-import.c:2731)
==2971== Uninitialised value was created by a heap allocation
==2971== at 0x4C29B3D: malloc (vg_replace_malloc.c:263)
==2971== by 0x433645: xmalloc (wrapper.c:35)
==2971== by 0x405DF5: pool_alloc (fast-import.c:619)
==2971== by 0x407755: pool_calloc.constprop.14 (fast-import.c:634)
==2971== by 0x403F33: main (fast-import.c:3324)
Fix this by zeroing all of the 'struct tag'. We would only need to
zero out the 'sha1' field, but this way seems more future-proof.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tim Henigan [Mon, 5 Mar 2012 14:28:07 +0000 (09:28 -0500)]
mergetools: add a plug-in to support DeltaWalker
DeltaWalker is a non-free tool popular among some users. Add a
plug-in to support it from difftool and mergetool.
Note that the $(pwd)/ in front of $MERGED should not be necessary.
However without it, DeltaWalker crashes with a JRE exception.
Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Helped-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 5 Mar 2012 07:38:02 +0000 (23:38 -0800)]
Update draft release notes to 1.7.10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 5 Mar 2012 07:35:23 +0000 (23:35 -0800)]
Merge branch 'jk/symbolic-ref-short'
* jk/symbolic-ref-short:
symbolic-ref --short: abbreviate the output unambiguously
Junio C Hamano [Mon, 5 Mar 2012 07:35:18 +0000 (23:35 -0800)]
Merge branch 'jn/gitweb-hilite-regions'
* jn/gitweb-hilite-regions:
gitweb: Highlight matched part of shortened project description
gitweb: Highlight matched part of project description when searching projects
gitweb: Highlight matched part of project name when searching projects
gitweb: Introduce esc_html_match_hl and esc_html_hl_regions
Junio C Hamano [Mon, 5 Mar 2012 07:35:12 +0000 (23:35 -0800)]
Merge branch 'jc/am-3-nonstandard-popt'
* jc/am-3-nonstandard-popt:
test: "am -3" can accept non-standard -p<num>
am -3: allow nonstandard -p<num> option
Carlos Martín Nieto [Sun, 4 Mar 2012 04:41:26 +0000 (05:41 +0100)]
Make git-{pull,rebase} message without tracking information friendlier
The current message is too long and at too low a level for anybody
to understand it if they don't know about the configuration format
already.
The text about setting up a remote is superfluous and doesn't help
understand or recover from the error that has happened. Show the
usage more prominently and explain how to set up the tracking
information. If there is only one remote, that name is used instead
of the generic <remote>.
Also simplify the message we print on detached HEAD to remove
unnecessary information which is better left for the documentation.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 5 Mar 2012 06:21:52 +0000 (22:21 -0800)]
Merge branch 'maint'
* maint:
Update draft release notes to 1.7.9.3 for the last time
http.proxy: also mention https_proxy and all_proxy
t0300: work around bug in dash 0.5.6
t5512 (ls-remote): modernize style
tests: fix spurious error when run directly with Solaris /usr/xpg4/bin/sh
Junio C Hamano [Mon, 5 Mar 2012 06:21:30 +0000 (22:21 -0800)]
Update draft release notes to 1.7.9.3 for the last time
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 5 Mar 2012 06:17:52 +0000 (22:17 -0800)]
Merge branch 'cn/maint-branch-with-bad' into maint
* cn/maint-branch-with-bad:
branch: don't assume the merge filter ref exists
Conflicts:
t/t3200-branch.sh
Junio C Hamano [Mon, 5 Mar 2012 06:17:47 +0000 (22:17 -0800)]
Merge branch 'jn/maint-gitweb-invalid-regexp' into maint
* jn/maint-gitweb-invalid-regexp:
gitweb: Handle invalid regexp in regexp search
Junio C Hamano [Mon, 5 Mar 2012 06:17:41 +0000 (22:17 -0800)]
Merge branch 'nd/maint-verify-objects' into maint
* nd/maint-verify-objects:
rev-list: fix --verify-objects --quiet becoming --objects
rev-list: remove BISECT_SHOW_TRIED flag
Junio C Hamano [Mon, 5 Mar 2012 06:16:40 +0000 (22:16 -0800)]
Merge branch 'jk/maint-avoid-streaming-filtered-contents' into maint
* jk/maint-avoid-streaming-filtered-contents:
do not stream large files to pack when filters are in use
teach dry-run convert_to_git not to require a src buffer
teach convert_to_git a "dry run" mode
Junio C Hamano [Mon, 5 Mar 2012 06:16:35 +0000 (22:16 -0800)]
Merge branch 'jb/filter-ignore-sigpipe' into maint
* jb/filter-ignore-sigpipe:
Ignore SIGPIPE when running a filter driver
Junio C Hamano [Mon, 5 Mar 2012 06:16:33 +0000 (22:16 -0800)]
Merge branch 'sp/smart-http-failure-to-push' into maint
* sp/smart-http-failure-to-push:
: Mask SIGPIPE on the command channel going to a transport helper
disconnect from remote helpers more gently
Conflicts:
transport-helper.c
Junio C Hamano [Mon, 5 Mar 2012 06:16:30 +0000 (22:16 -0800)]
Merge branch 'tr/maint-bundle-long-subject' into maint
* tr/maint-bundle-long-subject:
t5704: match tests to modern style
strbuf: improve strbuf_get*line documentation
bundle: use a strbuf to scan the log for boundary commits
bundle: put strbuf_readline_fd in strbuf.c with adjustments
Jiang Xin [Mon, 5 Mar 2012 05:16:27 +0000 (13:16 +0800)]
l10n: Update zh_CN translation for 1.7.9.2
In order to show detailed dirty status of submodules in long format,
git stripped the last ", " from the concatenate sting by a two-byte
backstep. So for keeping the two-byte backstep valid, won't touch the
end ", " for translation.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Johannes Sixt [Sun, 4 Mar 2012 21:16:19 +0000 (22:16 +0100)]
submodules: fix ambiguous absolute paths under Windows
Under Windows the "git rev-parse --git-dir" and "pwd" commands may return
either drive-letter-colon or POSIX style paths. This makes module_clone()
behave badly because it expects absolute paths to always start with a '/'.
Fix that by always converting the "c:/" notation into "/c/" when computing
the relative paths from gitdir to the submodule work tree and back.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jens Lehmann [Sun, 4 Mar 2012 21:15:36 +0000 (22:15 +0100)]
submodules: refactor computation of relative gitdir path
In module_clone() the rel_gitdir variable was computed differently when
"git rev-parse --git-dir" returned a relative path than when it returned
an absolute path. This is not optimal, as different code paths are used
depending on the return value of that command.
Fix that by reusing the differing path components computed for setting the
core.worktree config setting, which leaves a single code path for setting
both instead of having three and makes the code much shorter.
This also fixes the bug that in the computation of how many directories
have to be traversed up to hit the root directory of the submodule the
name of the submodule was used where the path should have been used. This
lead to problems after renaming submodules into another directory level.
Even though the "(cd $somewhere && pwd)" approach breaks the flexibility
of symlinks, that is no issue here as we have to have one relative path
pointing from the work tree to the gitdir and another pointing back, which
will never work anyway when a symlink along one of those paths is changed
because the directory it points to was moved.
Also add a test moving a submodule into a deeper directory to catch any
future breakage here and to document what has to be done when a submodule
needs to be moved until git mv learns to do that. Simply moving it to the
new location doesn't work, as the core.worktree and possibly the gitfile
setting too will be wrong. So it has to be removed from filesystem and
index, then the new location has to be added into the index and the
.gitmodules file has to be updated. After that a git submodule update will
check out the submodule at the new location.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jens Lehmann [Sun, 4 Mar 2012 21:15:08 +0000 (22:15 +0100)]
submodules: always use a relative path from gitdir to work tree
Since recently a submodule with name <name> has its git directory in the
.git/modules/<name> directory of the superproject while the work tree
contains a gitfile pointing there. To make that work the git directory has
the core.worktree configuration set in its config file to point back to
the work tree.
That core.worktree is an absolute path set by the initial clone of the
submodule. A relative path is preferable here because it allows the
superproject to be moved around without invalidating that setting, so
compute and set that relative path after cloning or reactivating the
submodule.
This also fixes a bug when moving a submodule around inside the
superproject, as the current code forgot to update the setting to the new
submodule work tree location.
Enhance t7400 to ensure that future versions won't re-add absolute paths
by accident and that moving a superproject won't break submodules.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jens Lehmann [Sun, 4 Mar 2012 21:14:30 +0000 (22:14 +0100)]
submodules: always use a relative path to gitdir
Since recently a submodule with name <name> has its git directory in the
.git/modules/<name> directory of the superproject while the work tree
contains a gitfile pointing there. When the submodule git directory needs
to be cloned because it is not found in .git/modules/<name> the clone
command will write an absolute path into the gitfile. When no clone is
necessary the git directory will be reactivated by the git-submodule.sh
script by writing a relative path into the gitfile.
This is inconsistent, as the behavior depends on the submodule having been
cloned before into the .git/modules of the superproject. A relative path
is preferable here because it allows the superproject to be moved around
without invalidating the gitfile. We do that by always writing the
relative path into the gitfile, which overwrites the absolute path the
clone command may have written there.
This is only the first step to make superprojects movable again like they
were before the separate-git-dir approach was introduced. The second step
is to use a relative path in core.worktree too.
Enhance t7400 to ensure that future versions won't re-add absolute paths
by accident.
While at it also replace an if/else construct evaluating the presence
of the 'reference' option with a single line of bash code.
Reported-by: Antony Male <antony.male@gmail.com>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ramsay Jones [Sun, 4 Mar 2012 19:10:57 +0000 (19:10 +0000)]
ctype.c: Fix a sparse warning
In particular, sparse complains as follows:
SP ctype.c
ctype.c:30:12: warning: symbol 'tolower_trans_tbl' was not declared.\
Should it be static?
An appropriate extern declaration for the 'tolower_trans_tbl' symbol
is included in the "cache.h" header file. In order to suppress the
warning, therefore, we could replace the "git-compat-util.h" header
inclusion with "cache.h", since "cache.h" includes "git-compat-util.h"
in turn. Here, however, we choose to move the extern declaration for
'tolower_trans_tbl' into "git-compat-util.h", alongside the other
extern declaration from ctype.c for 'sane_ctype'.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Clemens Buchacher [Sun, 4 Mar 2012 16:50:43 +0000 (17:50 +0100)]
http.proxy: also mention https_proxy and all_proxy
The current wording of the http.proxy documentation suggests that
http_proxy is somehow equivalent to http.proxy. However, while
http.proxy (by the means of curl's CURLOPT_PROXY option) overrides the
proxy for both HTTP and HTTPS protocols, the http_proxy environment
variable is used only for HTTP. But since the docs mention only
http_proxy, a user might expect it to apply to all HTTP-like protocols.
Avoid any such misunderstanding by explicitly mentioning https_proxy and
all_proxy as well.
Also replace linkgit:curl[1] with a literal 'curl(1)', because the
former gets translated to a dead link in the HTML pages.
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Sat, 3 Mar 2012 11:00:29 +0000 (12:00 +0100)]
parse-options: typo check for unknown switches
The user specifies a long option but forgets to type the second
leading dash, we currently detect and report that fact if its first
letter is a valid short option. This is done for safety, to avoid
ambiguity between short options (and their arguments) and a long
option with a missing dash.
This diagnostic message is also helpful for long options whose first
letter is not a valid short option, however. Print it in that case,
too, as a courtesy.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jared Hance [Sat, 3 Mar 2012 02:31:15 +0000 (21:31 -0500)]
Add threaded versions of functions in symlinks.c.
check_leading_path() and has_dirs_only_path() both always use the default
cache, which could be a caveat for adding parallelism (which is a concern
and even a GSoC proposal).
Reimplement these two in terms of new threaded_check_leading_path() and
threaded_has_dirs_only_path() that take their own copy of the cache.
Signed-off-by: Jared Hance <jaredhance@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael J Gruber [Sat, 3 Mar 2012 00:37:35 +0000 (19:37 -0500)]
t0300: work around bug in dash 0.5.6
The construct 'while IFS== read' makes dash 0.5.6 execute
read without changing IFS, which results in test breakages
all over the place in t0300. Neither dash 0.5.5.1 and older
nor dash 0.5.7 and newer are affected: The problem was
introduded resp. fixed by the commits
55c46b7 ([BUILTIN] Honor tab as IFS whitespace when
splitting fields in readcmd, 2009-08-11)
1d806ac ([VAR] Do not poplocalvars prematurely on regular
utilities, 2010-05-27)
in http://git.kernel.org/?p=utils/dash/dash.git
Putting 'IFS==' before that line makes all versions of dash
work.
This looks like a dash bug, not a misinterpretation of the
standard. However, it's worth working around for two
reasons. One, this version of dash was released in Fedora
14-16, so the bug is found in the wild. And two, at least
one other shell, Solaris /bin/sh, choked on this by
persisting IFS after the read invocation. That is not a
shell we usually care about, and I think this use of IFS is
acceptable by POSIX (which allows other behavior near
"special builtins", but "read" is not one of those). But it
seems that this may be a subtle, not-well-tested case for
some shells. Given that the workaround is so simple, it's
worth just being defensive.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tom Grennan [Sat, 3 Mar 2012 02:15:34 +0000 (18:15 -0800)]
t5512 (ls-remote): modernize style
Prepare expected output inside test_expect_success that uses it.
Also remove excess blank lines.
Signed-off-by: Tom Grennan <tmgrennan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jakub Narebski [Fri, 2 Mar 2012 22:50:01 +0000 (23:50 +0100)]
gitweb: Fix passing parameters to git_project_search_form
The git_project_search_form() subroutine, introduced in
a1e1b2d
(gitweb: improve usability of projects search form, 2012-01-31) didn't
get its arguments from caller correctly. Gitweb worked correctly
thanks to sticky-ness of form fields in CGI.pm... but it make UTF-8
fix for project search not working.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefano Lattarini [Fri, 2 Mar 2012 09:08:28 +0000 (10:08 +0100)]
t0000: modernise style
Match the style to more modern test scripts, namely:
- Prefer tabs for indentation.
- The first line of each test has prereq, title and opening sq for the
script body.
- Move cleanup or initialization of data used by a test inside the test
itself.
- Put a newline before the closing sq for each test.
- Don't conclude the test descriptions with a full stop.
- Prefer 'test_line_count = COUNT FILE' over 'test $(wc -l <FILE) = COUNT'
- Prefer 'test_line_count = 0 FILE' over 'cmp -s /dev/null FILE'
- Use '<<-EOF' style for here documents, so that they can be indented
as well. Bot don't do that in case the resulting lines would be too
long. Also when there is no $variable_substitution in the body of a
here document, quote \EOF.
- Don't redirect the output of commands to /dev/null unconditionally,
the git testing framework should already take care of handling test
verbosity transparently and uniformly.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefano Lattarini [Fri, 2 Mar 2012 18:48:36 +0000 (19:48 +0100)]
tests: fix spurious error when run directly with Solaris /usr/xpg4/bin/sh
If any test script is run directly with Solaris 10 /usr/xpg4/bin/sh or
/bin/ksh, it fails spuriously with a message like:
t0000-basic.sh[31]: unset: bad argument count
This happens because those shells bail out when encountering a call to
"unset" with no arguments, and such unset call could take place in
'test-lib.sh'. Fix that issue, and add a proper comment to ensure we
don't regress in this respect.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nelson Benitez Leon [Fri, 2 Mar 2012 13:55:57 +0000 (14:55 +0100)]
http: support proxies that require authentication
When the proxy server specified by the http.proxy configuration or the
http_proxy environment variable requires authentication, git failed to
connect to the proxy, because we did not configure the cURL handle with
CURLOPT_PROXYAUTH.
When a proxy is in use, and you tell git that the proxy requires
authentication by having username in the http.proxy configuration, an
extra request needs to be made to the proxy to find out what
authentication method it supports, as this patch uses CURLAUTH_ANY to let
the library pick the most secure method supported by the proxy server.
The extra round-trip adds extra latency, but relieves the user from the
burden to configure a specific authentication method. If it becomes
problem, a later patch could add a configuration option to specify what
method to use, but let's start simple for the time being.
Signed-off-by: Nelson Benitez Leon <nbenitezl@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 2 Mar 2012 05:08:07 +0000 (21:08 -0800)]
Update draft release notes to 1.7.10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 2 Mar 2012 19:49:06 +0000 (11:49 -0800)]
Merge branch 'maint'
* maint:
Documentation: do not assume that n > 1 in <rev>~$n
Junio C Hamano [Wed, 29 Feb 2012 19:13:22 +0000 (11:13 -0800)]
Documentation: do not assume that n > 1 in <rev>~$n
We explained <rev>~<n> as <n>th generation grand-parent, but a reader got
confused by the "grand-" part when <n> is 1.
Reword it with "ancestor"; with the "generation" and "following only the
first parents" around there, what we try to describe should be clear
enough now.
Noticed-by: Luke Diamand <luke@diamand.org>
Helped-by: Thomas Rast <trast@inf.ethz.ch>
Helped-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thynson [Tue, 28 Feb 2012 18:18:52 +0000 (02:18 +0800)]
l10n: Improve commit msg for zh_CN translation
Signed-off-by: Thynson <lanxingcan@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Thynson [Tue, 28 Feb 2012 18:08:22 +0000 (02:08 +0800)]
l10n: Improve zh_CN translation for msg that make empty commit when amend.
Signed-off-by: Thynson <lanxingcan@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Thynson [Tue, 28 Feb 2012 18:03:39 +0000 (02:03 +0800)]
l10n: Improve zh_CN translation for empty cherry-pick msg.
Signed-off-by: Thynson <lanxingcan@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Thynson [Tue, 28 Feb 2012 17:58:30 +0000 (01:58 +0800)]
l10n: Improve zh_CN translation for msg about branch deletion deny
Signed-off-by: Thynson <lanxingcan@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Thynson [Tue, 28 Feb 2012 17:57:24 +0000 (01:57 +0800)]
l10n: Improve zh_CN translation for lines insertion and deletion.
Signed-off-by: Thynson <lanxingcan@gmail.com>
Junio C Hamano [Fri, 2 Mar 2012 04:59:41 +0000 (20:59 -0800)]
Merge branch 'cb/fsck-squelch-dangling'
* cb/fsck-squelch-dangling:
fsck: --no-dangling omits "dangling object" information
Junio C Hamano [Fri, 2 Mar 2012 04:59:31 +0000 (20:59 -0800)]
Merge branch 'rs/no-no-no-parseopt'
* rs/no-no-no-parseopt:
parse-options: remove PARSE_OPT_NEGHELP
parse-options: allow positivation of options starting, with no-
test-parse-options: convert to OPT_BOOL()
Conflicts:
builtin/grep.c
Junio C Hamano [Fri, 2 Mar 2012 04:59:25 +0000 (20:59 -0800)]
Merge branch 'th/git-diffall'
* th/git-diffall:
contrib: add git-diffall script
Junio C Hamano [Fri, 2 Mar 2012 04:52:03 +0000 (20:52 -0800)]
Merge the initial l10n effort in
* l10n:
Update l10n guide: change the repository URL, etc
l10n: leave leading space unchanged for zh_CN.po
Update l10n guide
l10n: update Chinese translation to the new git.po
l10n: Update git.pot (12 new messages)
l10n: fast-forward here is ff-only merge, not push
l10n: update zh_CN translation for "Fetching %s"
l10n: po for zh_CN
l10n: initial git.pot for 1.7.10 upcoming release
Junio C Hamano [Fri, 2 Mar 2012 04:51:37 +0000 (20:51 -0800)]
Merge branch 'master' of https://github.com/git-l10n/git-po into l10n
* 'master' of https://github.com/git-l10n/git-po:
l10n: leave leading space unchanged for zh_CN.po
Jiang Xin [Fri, 2 Mar 2012 02:29:53 +0000 (10:29 +0800)]
Update l10n guide: change the repository URL, etc
Host the l10n coordinator repository in a dedicated github organization
account "git-l10n", so that the team may have a more permanent home.
Also add a hint about reference of TEAMS file for l10n contributors.
Update TEAMS file with new zh_CN l10n team members and a repository URL.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 1 Mar 2012 22:45:14 +0000 (14:45 -0800)]
Merge branch 'maint'
* maint:
Documentation fixes in git-config
Junio C Hamano [Thu, 1 Mar 2012 22:44:42 +0000 (14:44 -0800)]
Merge branch 'nd/maint-verify-objects'
* nd/maint-verify-objects:
rev-list: fix --verify-objects --quiet becoming --objects
rev-list: remove BISECT_SHOW_TRIED flag
Junio C Hamano [Thu, 1 Mar 2012 22:44:38 +0000 (14:44 -0800)]
Merge branch 'jn/maint-gitweb-invalid-regexp'
* jn/maint-gitweb-invalid-regexp:
gitweb: Handle invalid regexp in regexp search
Junio C Hamano [Thu, 1 Mar 2012 22:44:28 +0000 (14:44 -0800)]
Merge branch 'cn/maint-rev-list-doc'
* cn/maint-rev-list-doc:
Documentation: use {asterisk} in rev-list-options.txt when needed
Junio C Hamano [Thu, 1 Mar 2012 22:44:17 +0000 (14:44 -0800)]
Merge branch 'cn/maint-branch-with-bad'
* cn/maint-branch-with-bad:
branch: don't assume the merge filter ref exists
Conflicts:
t/t3200-branch.sh
Thomas Rast [Thu, 1 Mar 2012 21:40:51 +0000 (22:40 +0100)]
bundle: keep around names passed to add_pending_object()
The 'name' field passed to add_pending_object() is used to later
deduplicate in object_array_remove_duplicates().
git-bundle had a bug in this area since
18449ab (git-bundle: avoid
packing objects which are in the prerequisites, 2007-03-08): it passed
the name of each boundary object in a static buffer. In other words,
all that object_array_remove_duplicates() saw was the name of the
*last* added boundary object.
The recent switch to a strbuf in
bc2fed4 (bundle: use a strbuf to scan
the log for boundary commits, 2012-02-22) made this slightly worse: we
now free the buffer at the end, so it is not even guaranteed that it
still points into addressable memory by the time object_array_remove_
duplicates looks at it. On the plus side however, it was now
detectable by valgrind.
The fix is easy: pass a copy of the string to add_pending_object.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thomas Rast [Thu, 1 Mar 2012 21:40:49 +0000 (22:40 +0100)]
t5510: ensure we stay in the toplevel test dir
The last test descended into a subdir without ever re-emerging, which
is not so nice to the next test writer.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thomas Rast [Thu, 1 Mar 2012 21:40:48 +0000 (22:40 +0100)]
t5510: refactor bundle->pack conversion
It's not so much a conversion as a "strip everything up to and
including the first blank line", but it will come in handy again.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 1 Mar 2012 02:14:16 +0000 (18:14 -0800)]
diff -p: squelch "diff --git" header for stat-dirty paths
The plumbing "diff" commands look at the working tree files without
refreshing the index themselves for performance reasons (the calling
script is expected to do that upfront just once, before calling one or
more of them). In the early days of git, they showed the "diff --git"
header before they actually ask the xdiff machinery to produce patches,
and ended up showing only these headers if the real contents are the same
and the difference they noticed was only because the stat info cached in
the index did not match that of the working tree. It was too late for the
implementation to take the header that it already emitted back.
But
3e97c7c (No diff -b/-w output for all-whitespace changes, 2009-11-19)
introduced necessary logic to keep the meta-information headers in a
strbuf and delay their output until the xdiff machinery noticed actual
changes. This was primarily in order to generate patches that ignore
whitespaces. When operating under "-w" mode, we wouldn't know if the
header is needed until we actually look at the resulting patch, so it was
a sensible thing to do, but we did not realize that the same reasoning
applies to stat-dirty paths.
Later,
296c6bb (diff: fix "git show -C -C" output when renaming a binary
file, 2010-05-26) generalized this machinery and added must_show_header
toggle. This is turned on when the header must be shown even when there
is no patch to be produced, e.g. only the mode was changed, or the path
was renamed, without changing the contents. However, when it did so, it
still kept the special case for the "-w" mode, which meant that the
plumbing would keep showing these phantom changes.
This corrects this historical inconsistency by allowing the plumbing to
omit paths that are only stat-dirty from its output in the same way as it
handles whitespace only changes under "-w" option.
The change in the behaviour can be seen in the updated test.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 1 Mar 2012 02:14:15 +0000 (18:14 -0800)]
t4011: illustrate "diff-index -p" on stat-dirty paths
The plumbing that looks at the working tree, i.e. "diff-index" and
"diff-files", always emit the "diff --git a/path b/path" header lines
without anything else for paths that are only stat-dirty (i.e. different
only because the cached stat information in the index no longer matches
that of the working tree, but the real contents are the same), when
these commands are run with "-p" option to produce patches.
Illustrate this current behaviour. Also demonstrate that with the "-w"
option, we (correctly) hold off showing a "diff --git" header until actual
differences have been found. This also suppresses the header for merely
stat-dirty files, which is inconsistent.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 1 Mar 2012 02:14:14 +0000 (18:14 -0800)]
t4011: modernise style
Match the style to more modern test scripts, namely:
- The first line of each test has prereq, title and opening sq for the
script body. This makes the test shorter while reducing the need for
backslashes.
- Be prepared for the case in which the previous test may have failed.
If a test wants to start from not having "frotz" that the previous test
may have created, write "rm -f frotz", not "rm frotz".
- Prepare the expected output inside your own test.
- The order of comparison to check the result is "diff expected actual",
so that the output will show how the output from the git you just broke
is different from what is expected.
- Write no SP between redirection '>' (or '<' for that matter) and the
filename.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Zbigniew Jędrzejewski-Szmek [Thu, 1 Mar 2012 12:26:46 +0000 (13:26 +0100)]
diff --stat: add config option to limit graph width
Config option diff.statGraphWidth=<width> is equivalent to
--stat-graph-width=<width>, except that the config option is ignored
by format-patch.
For the graph-width limiting to be usable, it should happen
'automatically' once configured, hence the config option.
Nevertheless, graph width limiting only makes sense when used on a
wide terminal, so it should not influence the output of format-patch,
which adheres to the 80-column standard.
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Zbigniew Jędrzejewski-Szmek [Thu, 1 Mar 2012 12:26:45 +0000 (13:26 +0100)]
diff --stat: enable limiting of the graph part
A new option --stat-graph-width=<width> can be used to limit the width
of the graph part even is more space is available. Up to <width>
columns will be used for the graph.
If commits changing a lot of lines are displayed in a wide terminal
window (200 or more columns), and the +- graph uses the full width,
the output can be hard to comfortably scan with a horizontal movement
of human eyes. Messages wrapped to about 80 columns would be
interspersed with very long +- lines. It makes sense to limit the
width of the graph part to a fixed value (e.g. 70 columns), even if
more columns are available.
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Zbigniew Jędrzejewski-Szmek [Thu, 1 Mar 2012 12:26:44 +0000 (13:26 +0100)]
diff --stat: add a test for output with COLUMNS=40
In preparation for the introduction on the limit of the width of the
graph part, a new test with COLUMNS=40 is added to check that the
environment variable influences diff, show, log, but not format-patch.
A new test is added because limiting the graph part makes COLUMNS=200
stop influencing diff --stat behaviour, which isn't wide enough now.
The old test with COLUMNS=200 is retained to check for regressions.
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Zbigniew Jędrzejewski-Szmek [Thu, 1 Mar 2012 12:26:43 +0000 (13:26 +0100)]
diff --stat: use a maximum of 5/8 for the filename part
The way that available columns are divided between the filename part
and the graph part is modified to use as many columns as necessary for
the filenames and the rest for the graph.
If there isn't enough columns to print both the filename and the
graph, at least 5/8 of available space is devoted to filenames. On a
standard 80 column terminal, or if not connected to a terminal and
using the default of 80 columns, this gives the same partition as
before.
The effect of this change is visible in the patch to the test vector
in t4052; with a small change with long filename, it stops truncating
the name part too short, and also allocates a bit more columns to the
graph for larger changes.
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Zbigniew Jędrzejewski-Szmek [Thu, 1 Mar 2012 12:26:42 +0000 (13:26 +0100)]
merge --stat: use the full terminal width
Make merge --stat behave like diff --stat and use the full terminal
width.
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Zbigniew Jędrzejewski-Szmek [Thu, 1 Mar 2012 12:26:41 +0000 (13:26 +0100)]
log --stat: use the full terminal width
Make log --stat behave like diff --stat and use the full terminal
width.
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Zbigniew Jędrzejewski-Szmek [Thu, 1 Mar 2012 12:26:40 +0000 (13:26 +0100)]
show --stat: use the full terminal width
Make show --stat behave like diff --stat and use the full terminal
width.
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Zbigniew Jędrzejewski-Szmek [Thu, 1 Mar 2012 12:26:39 +0000 (13:26 +0100)]
diff --stat: use the full terminal width
Default to the real terminal width for diff --stat output, instead
of the hard-coded 80 columns.
Some projects (especially in Java), have long filename paths, with
nested directories or long individual filenames. When files are
renamed, the filename part in stat output can be almost useless. If
the middle part between { and } is long (because the file was moved to
a completely different directory), then most of the path would be
truncated.
It makes sense to detect and use the full terminal width and display
full filenames if possible.
The are commands like diff, show, and log, which can adapt the output
to the terminal width. There are also commands like format-patch,
whose output should be independent of the terminal width. Since it is
safer to use the 80-column default, the real terminal width is only
used if requested by the calling code by setting diffopts.stat_width=-1.
Normally this value is 0, and can be set by the user only to a
non-negative value, so -1 is safe to use internally.
This patch only changes the diff builtin to use the full terminal width.
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 1 Mar 2012 12:26:38 +0000 (13:26 +0100)]
diff --stat: tests for long filenames and big change counts
In preparation for updates to the "diff --stat" that updates the logic
to split the allotted columns into the name part and the graph part to
make the output more readable, add a handful of tests to document the
corner case behaviour in which long filenames and big changes are shown.
When a pathname is so long that it cannot fit on the column, the current
code truncates it to make sure that the graph part has enough room to show
a meaningful graph. If the actual change is small (e.g. only one line
changed), this results in the final output that is shorter than the width
we aim for.
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Libor Pechacek [Thu, 1 Mar 2012 10:59:45 +0000 (11:59 +0100)]
Documentation fixes in git-config
Variable names must start with an alphabetic character, regexp config key
matching has its limits, sentence grammar.
Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ws3389 [Wed, 29 Feb 2012 12:53:26 +0000 (20:53 +0800)]
l10n: leave leading space unchanged for zh_CN.po
Signed-off-by: ws3389 <willsmith3389@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Junio C Hamano [Wed, 29 Feb 2012 08:10:30 +0000 (00:10 -0800)]
Update l10n guide
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 21 Feb 2012 09:02:46 +0000 (01:02 -0800)]
pickaxe: allow -i to search in patch case-insensitively
"git log -S<string>" is a useful way to find the last commit in the
codebase that touched the <string>. As it was designed to be used by a
porcelain script to dig the history starting from a block of text that
appear in the starting commit, it never had to look for anything but an
exact match.
When used by an end user who wants to look for the last commit that
removed a string (e.g. name of a variable) that he vaguely remembers,
however, it is useful to support case insensitive match.
When given the "--regexp-ignore-case" (or "-i") option, which originally
was designed to affect case sensitivity of the search done in the commit
log part, e.g. "log --grep", the matches made with -S/-G pickaxe search is
done case insensitively now.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 28 Feb 2012 22:55:39 +0000 (14:55 -0800)]
fsck: --no-dangling omits "dangling object" information
The default output from "fsck" is often overwhelmed by informational
message on dangling objects, especially if you do not repack often, and a
real error can easily be buried.
Add "--no-dangling" option to omit them, and update the user manual to
demonstrate its use.
Based on a patch by Clemens Buchacher, but reverted the part to change
the default to --no-dangling, which is unsuitable for the first patch.
The usual three-step procedure to break the backward compatibility over
time needs to happen on top of this, if we were to go in that direction.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 28 Feb 2012 22:20:53 +0000 (14:20 -0800)]
grep: use static trans-case table
In order to prepare the kwset machinery for a case-insensitive search, we
used to use a static table of 256 elements and filled it every time before
calling kwsalloc(). Because the kwset machinery will never modify this
table, just allocate a single instance globally and fill it at the compile
time.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 28 Feb 2012 21:31:05 +0000 (13:31 -0800)]
Update draft release notes to 1.7.10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 28 Feb 2012 21:26:04 +0000 (13:26 -0800)]
Merge branch 'pj/completion-remote-set-url-branches'
* pj/completion-remote-set-url-branches:
completion: normalize increment/decrement style
completion: remote set-* <name> and <branch>
Junio C Hamano [Tue, 28 Feb 2012 21:26:01 +0000 (13:26 -0800)]
Merge branch 'ph/cherry-pick-advice-refinement'
* ph/cherry-pick-advice-refinement:
cherry-pick: No advice to commit if --no-commit
Junio C Hamano [Tue, 28 Feb 2012 21:25:57 +0000 (13:25 -0800)]
Merge branch 'jb/required-filter'
* jb/required-filter:
Add a setting to require a filter to be successful
Conflicts:
convert.c
Carlos Martín Nieto [Tue, 28 Feb 2012 15:35:48 +0000 (16:35 +0100)]
Documentation: use {asterisk} in rev-list-options.txt when needed
Text between two '*' is emphasized in AsciiDoc and makes explanations in
rev-list-options.txt on glob-related options very confusing, as the
rendered text would be missing two asterisks and the text between them
would be emphasized instead.
Use '{asterisk}' where needed to make them show up as asterisks in the
rendered text.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Tue, 28 Feb 2012 19:06:09 +0000 (20:06 +0100)]
parse-options: remove PARSE_OPT_NEGHELP
PARSE_OPT_NEGHELP is confusing because short options defined with that
flag do the opposite of what the helptext says. It is also not needed
anymore now that options starting with no- can be negated by removing
that prefix. Convert its only two users to OPT_NEGBIT() and OPT_BOOL()
and then remove support for PARSE_OPT_NEGHELP.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jakub Narebski [Tue, 28 Feb 2012 18:41:47 +0000 (19:41 +0100)]
gitweb: Handle invalid regexp in regexp search
When using regexp search ('sr' parameter / $search_use_regexp variable
is true), check first that regexp is valid.
Without this patch we would get an error from Perl during search (if
searching is performed by gitweb), or highlighting matches substring
(if applicable), if user provided invalid regexp... which means broken
HTML, with error page (including HTTP headers) generated after gitweb
already produced some output.
Add test that illustrates such error: for example for regexp "*\.git"
we would get the following error:
Quantifier follows nothing in regex; marked by <-- HERE in m/* <-- HERE \.git/
at /var/www/cgi-bin/gitweb.cgi line 3084.
Reported-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy [Tue, 28 Feb 2012 14:00:00 +0000 (21:00 +0700)]
rev-list: fix --verify-objects --quiet becoming --objects
When --quiet is specified, finish_object() is called instead of
show_object(). The latter is in charge of --verify-objects and
will be skipped if --quiet is specified.
Move the code up to finish_object(). Also pass the quiet flag along
and make it always call show_* functions to avoid similar problems in
future.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy [Tue, 28 Feb 2012 13:59:59 +0000 (20:59 +0700)]
rev-list: remove BISECT_SHOW_TRIED flag
Since
c99f069 (bisect--helper: remove "--next-vars" option as it is
now useless - 2009-04-21), this flag has always been off. Remove the
flag and all related code.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jiang Xin [Tue, 28 Feb 2012 16:40:07 +0000 (00:40 +0800)]
Merge pull request from jiangxin/master
l10n: translation for Simplified Chinese.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Jiang Xin [Tue, 28 Feb 2012 04:24:54 +0000 (12:24 +0800)]
l10n: update Chinese translation to the new git.po
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Jiang Xin [Tue, 28 Feb 2012 04:24:20 +0000 (12:24 +0800)]
l10n: Update git.pot (12 new messages)
Update file 'po/git.pot' to v1.7.9.2-315-g25a78 (Merge branch 'maint'),
with 12 new string additions.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Jiang Xin [Tue, 28 Feb 2012 04:23:26 +0000 (12:23 +0800)]
Merge branch 'master' into git-po
Jan Krüger [Mon, 27 Feb 2012 22:10:38 +0000 (23:10 +0100)]
symbolic-ref --short: abbreviate the output unambiguously
It can be helpful to resolve a symbolic ref and output the result in a
shortened form, such as for use in shell prompts. Add a "--short" option
to do so.
Signed-off-by: Jan Krüger <jk@jk.gs>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 27 Feb 2012 23:37:02 +0000 (15:37 -0800)]
Merge branch 'maint'
* maint:
Update draft release notes to 1.7.9.3
CodingGuidelines: do not use 'which' in shell scripts
CodingGuidelines: Add a note about spaces after redirection
post-receive-email: match up $LOGBEGIN..$LOGEND pairs correctly
post-receive-email: remove unused variable
Junio C Hamano [Mon, 27 Feb 2012 23:36:08 +0000 (15:36 -0800)]
Update draft release notes to 1.7.9.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 27 Feb 2012 23:33:33 +0000 (15:33 -0800)]
Merge branch 'pj/remote-set-branches-usage-fix' into maint
* pj/remote-set-branches-usage-fix:
remote: fix set-branches usage and documentation
Conflicts:
builtin/remote.c
Junio C Hamano [Mon, 27 Feb 2012 23:33:26 +0000 (15:33 -0800)]
Merge branch 'jn/gitweb-unborn-head' into maint
* jn/gitweb-unborn-head:
gitweb: Fix "heads" view when there is no current branch
Junio C Hamano [Mon, 27 Feb 2012 23:33:07 +0000 (15:33 -0800)]
Merge branch 'jn/ancient-meld-support' into maint
* jn/ancient-meld-support:
mergetools/meld: Use --help output to detect --output support
Junio C Hamano [Mon, 27 Feb 2012 23:31:50 +0000 (15:31 -0800)]
Merge branch 'tr/merge-edit-guidance' into maint
* tr/merge-edit-guidance:
merge: add instructions to the commit message when editing
Tim Henigan [Fri, 24 Feb 2012 23:12:58 +0000 (18:12 -0500)]
CodingGuidelines: do not use 'which' in shell scripts
During the code review of a recent patch, it was noted that shell scripts
must not use 'which $cmd' to check the availability of the command $cmd.
The output of the command is not machine parseable and its exit code is
not reliable across platforms.
It is better to use 'type' to accomplish this task.
Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tim Henigan [Fri, 24 Feb 2012 23:12:57 +0000 (18:12 -0500)]
CodingGuidelines: Add a note about spaces after redirection
During code review of some patches, it was noted that redirection operators
should have space before, but no space after them.
Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tim Henigan [Fri, 24 Feb 2012 19:48:57 +0000 (14:48 -0500)]
contrib: add git-diffall script
The 'git difftool' allows the user to view diffs using an external tool.
It runs a separate instance of the tool for each file in the diff. This
makes it tedious to review changes spanning multiple files.
The 'git-diffall' script instead prepares temporary directories with the
files to be compared and launches a single instance of the external diff
tool to view them (i.e. a directory diff).
The 'diff.tool' or 'merge.tool' configuration variable is used to specify
which external tool is used.
Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Zbigniew Jędrzejewski-Szmek [Mon, 27 Feb 2012 17:40:14 +0000 (18:40 +0100)]
git-p4: missing she-bang line in t9804 confuses prove
Without the magic line, prove shows lots and lots of errors:
% prove ./t9804-git-p4-label.sh
./t9804-git-p4-label.sh .. syntax error at ./t9804-git-p4-label.sh line 3, near ". ."
...
When #!/bin/sh is added, tests are skipped (I have no p4d).
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michał Kiedrowicz [Mon, 27 Feb 2012 16:45:49 +0000 (17:45 +0100)]
grep -P: add tests for matching ^ and $
Earlier, fba4f1 (grep -P: Fix matching ^ and $) fixed an ancient bug. Add
some tests to protect the change from future breakages; a slightly broken
version of this was a part of the originally submitted patch.
Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Carlos Martín Nieto [Mon, 27 Feb 2012 15:11:53 +0000 (16:11 +0100)]
branch: don't assume the merge filter ref exists
print_ref_list looks up the merge_filter_ref and assumes that a valid
pointer is returned. When the object doesn't exist, it tries to
dereference a NULL pointer. This can be the case when git branch
--merged is given an argument that isn't a valid commit name.
Check whether the lookup returns a NULL pointer and die with an error
if it does. Add a test, while we're at it.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Haggerty [Mon, 27 Feb 2012 18:34:10 +0000 (19:34 +0100)]
post-receive-email: match up $LOGBEGIN..$LOGEND pairs correctly
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Haggerty [Mon, 27 Feb 2012 18:34:09 +0000 (19:34 +0100)]
post-receive-email: remove unused variable
prep_for_email neither is passed a fourth argument nor uses it.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>