Junio C Hamano [Wed, 25 Jun 2014 18:48:23 +0000 (11:48 -0700)]
Merge branch 'rs/mailinfo-header-cmp' into maint
"git mailinfo" used to read beyond the end of header string while
parsing an incoming e-mail message to extract the patch.
* rs/mailinfo-header-cmp:
mailinfo: use strcmp() for string comparison
Junio C Hamano [Wed, 25 Jun 2014 18:48:13 +0000 (11:48 -0700)]
Merge branch 'jk/index-pack-report-missing' into maint
The error reporting from "git index-pack" has been improved to
distinguish missing objects from type errors.
* jk/index-pack-report-missing:
index-pack: distinguish missing objects from type errors
Junio C Hamano [Wed, 25 Jun 2014 18:47:58 +0000 (11:47 -0700)]
Merge branch 'nd/index-pack-one-fd-per-thread' into maint
We used to disable threaded "git index-pack" on platforms without
thread-safe pread(); use a different workaround for such
platforms to allow threaded "git index-pack".
* nd/index-pack-one-fd-per-thread:
index-pack: work around thread-unsafe pread()
Junio C Hamano [Wed, 25 Jun 2014 18:47:49 +0000 (11:47 -0700)]
Merge branch 'sk/spawn-less-case-insensitively-from-grep-O-i' into maint
"git grep -O" to show the lines that hit in the pager did not work
well with case insensitive search. We now spawn "less" with its
"-I" option when it is used as the pager (which is the default).
* sk/spawn-less-case-insensitively-from-grep-O-i:
git grep -O -i: if the pager is 'less', pass the '-I' option
Junio C Hamano [Wed, 25 Jun 2014 18:47:36 +0000 (11:47 -0700)]
Merge branch 'nd/daemonize-gc' into maint
"git gc --auto" was recently changed to run in the background to
give control back early to the end-user sitting in front of the
terminal, but it forgot that housekeeping involving reflogs should
be done without other processes competing for accesses to the refs.
* nd/daemonize-gc:
gc --auto: do not lock refs in the background
Junio C Hamano [Wed, 25 Jun 2014 18:47:23 +0000 (11:47 -0700)]
Merge branch 'jk/diff-follow-must-take-one-pathspec' into maint
"git format-patch" did not enforce the rule that the "--follow"
option from the log/diff family of commands must be used with
exactly one pathspec.
* jk/diff-follow-must-take-one-pathspec:
move "--follow needs one pathspec" rule to diff_setup_done
Junio C Hamano [Wed, 25 Jun 2014 18:47:09 +0000 (11:47 -0700)]
Merge branch 'jk/diff-files-assume-unchanged' into maint
"git diff --find-copies-harder" sometimes pretended as if the mode
bits have changed for paths that are marked with assume-unchanged
bit.
* jk/diff-files-assume-unchanged:
run_diff_files: do not look at uninitialized stat data
Junio C Hamano [Wed, 25 Jun 2014 18:46:54 +0000 (11:46 -0700)]
Merge branch 'jk/commit-C-pick-empty' into maint
"git commit --allow-empty-message -C $commit" did not work when the
commit did not have any log message.
* jk/commit-C-pick-empty:
commit: do not complain of empty messages from -C
Junio C Hamano [Wed, 25 Jun 2014 18:46:44 +0000 (11:46 -0700)]
Merge branch 'bc/blame-crlf-test' into maint
"git blame" assigned the blame to the copy in the working-tree if
the repository is set to core.autocrlf=input and the file used CRLF
line endings.
* bc/blame-crlf-test:
blame: correctly handle files regardless of autocrlf
Junio C Hamano [Wed, 25 Jun 2014 18:46:34 +0000 (11:46 -0700)]
Merge branch 'jx/blame-align-relative-time' into maint
"git blame" miscounted number of columns needed to show localized
timestamps, resulting in jaggy left-side-edge of the source code
lines in its output.
* jx/blame-align-relative-time:
blame: dynamic blame_date_width for different locales
blame: fix broken time_buf paddings in relative timestamp
Junio C Hamano [Wed, 25 Jun 2014 18:46:23 +0000 (11:46 -0700)]
Merge branch 'jc/apply-ignore-whitespace' into maint
"--ignore-space-change" option of "git apply" ignored the spaces
at the beginning of line too aggressively, which is inconsistent
with the option of the same name "diff" and "git diff" have.
* jc/apply-ignore-whitespace:
apply --ignore-space-change: lines with and without leading whitespaces do not match
Junio C Hamano [Wed, 25 Jun 2014 18:46:12 +0000 (11:46 -0700)]
Merge branch 'jk/complete-merge-pull' into maint
The completion scripts (in contrib/) did not know about quite a few
options that are common between "git merge" and "git pull", and a
couple of options unique to "git merge".
* jk/complete-merge-pull:
completion: add missing options for git-merge
completion: add a note that merge options are shared
Junio C Hamano [Wed, 25 Jun 2014 18:45:55 +0000 (11:45 -0700)]
Merge branch 'ow/config-mailmap-pathname' into maint
The "mailmap.file" configuration option did not support the tilde
expansion (i.e. ~user/path and ~/path).
* ow/config-mailmap-pathname:
config: respect '~' and '~user' in mailmap.file
Junio C Hamano [Wed, 25 Jun 2014 18:45:31 +0000 (11:45 -0700)]
Merge branch 'as/pretty-truncate' into maint
The "%<(10,trunc)%s" pretty format specifier in the log family of
commands is used to truncate the string to a given length (e.g. 10
in the example) with padding to column-align the output, but did
not take into account that number of bytes and number of display
columns are different.
* as/pretty-truncate:
pretty.c: format string with truncate respects logOutputEncoding
t4205, t6006: add tests that fail with i18n.logOutputEncoding set
t4205 (log-pretty-format): use `tformat` rather than `format`
t4041, t4205, t6006, t7102: don't hardcode tested encoding value
t4205 (log-pretty-formats): don't hardcode SHA-1 in expected outputs
Junio C Hamano [Wed, 25 Jun 2014 18:44:53 +0000 (11:44 -0700)]
Merge branch 'jc/revision-dash-count-parsing' into maint
"git log -2master" is a common typo that shows two commits starting
from whichever random branch that is not 'master' that happens to
be checked out currently.
* jc/revision-dash-count-parsing:
revision: parse "git log -<count>" more carefully
Junio C Hamano [Wed, 25 Jun 2014 18:43:57 +0000 (11:43 -0700)]
Merge branch 'jk/report-fail-to-read-objects-better' into maint
Reworded the error message given upon a failure to open an existing
loose object file due to e.g. permission issues; it was reported as
the object being corrupt, but that is not quite true.
* jk/report-fail-to-read-objects-better:
open_sha1_file: report "most interesting" errno
Junio C Hamano [Wed, 25 Jun 2014 18:43:43 +0000 (11:43 -0700)]
Merge branch 'mn/sideband-no-ansi' into maint
Tools that read diagnostic output in our standard error stream do
not want to see terminal control sequence (e.g. erase-to-eol).
Detect them by checking if the standard error stream is connected
to a tty.
* mn/sideband-no-ansi:
sideband.c: do not use ANSI control sequence on non-terminal
Junio C Hamano [Wed, 25 Jun 2014 18:43:07 +0000 (11:43 -0700)]
Merge branch 'je/pager-do-not-recurse' into maint
We used to unconditionally disable the pager in the pager process
we spawn to feed out output, but that prevented people who want to
run "less" within "less" from doing so.
* je/pager-do-not-recurse:
pager: do allow spawning pager recursively
Junio C Hamano [Thu, 12 Jun 2014 19:17:57 +0000 (12:17 -0700)]
Merge branch 'jc/rev-parse-argh-dashed-multi-words' into maint
* jc/rev-parse-argh-dashed-multi-words:
update-index: fix segfault with missing --cacheinfo argument
Jacek Konieczny [Wed, 11 Jun 2014 08:47:45 +0000 (10:47 +0200)]
pull: do not abuse 'break' inside a shell 'case'
It is not C. The code would break under mksh when 'pull.ff' is set:
$ git pull
/usr/lib/git-core/git-pull[67]: break: can't break
Already up-to-date.
Signed-off-by: Jacek Konieczny <jajcus@jajcus.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 6 Jun 2014 22:33:25 +0000 (15:33 -0700)]
revision: parse "git log -<count>" more carefully
This mistyped command line simply ignores "master" and ends up
showing two commits from the current HEAD:
$ git log -2master
because we feed "2master" to atoi() without making sure that the
whole string is parsed as an integer.
Use the strtol_i() helper function instead.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Wed, 4 Jun 2014 07:11:11 +0000 (03:11 -0400)]
update-index: fix segfault with missing --cacheinfo argument
Running "git update-index --cacheinfo" without any further
arguments results in a segfault rather than an error
message. Commit
ec160ae (update-index: teach --cacheinfo a
new syntax "mode,sha1,path", 2014-03-23) added code to
examine the format of the argument, but forgot to handle the
NULL case.
Returning an error from the parser is enough, since we then
treat it as an old-style "--cacheinfo <mode> <sha1> <path>",
and complain that we have less than 3 arguments to read.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Sun, 1 Jun 2014 09:00:40 +0000 (11:00 +0200)]
mailinfo: use strcmp() for string comparison
The array header is defined as:
static const char *header[MAX_HDR_PARSED] = {
"From","Subject","Date",
};
When looking for the index of a specfic string in that array, simply
use strcmp() instead of memcmp(). This avoids running over the end of
the string (e.g. with memcmp("Subject", "From", 7)) and gets rid of
magic string length constants.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Naumov [Wed, 28 May 2014 03:12:15 +0000 (03:12 +0000)]
sideband.c: do not use ANSI control sequence on non-terminal
Diagnostic messages received on the sideband #2 from the server side
are sent to the standard error with ANSI terminal control sequence
"\033[K" that erases to the end of line appended at the end of each
line.
However, some programs (e.g. GitExtensions for Windows) read and
interpret and/or show the message without understanding the terminal
control sequences, resulting them to be shown to their end users.
To help these programs, squelch the control sequence when the
standard error stream is not being sent to a tty.
NOTE: I considered to cover the case that a pager has already been
started. But decided that is probably not worth worrying about here,
though, as we shouldn't be using a pager for commands that do network
communications (and if we do, omitting the magic line-clearing signal
is probably a sane thing to do).
Thanks-to: Erik Faye-Lund <kusmabite@gmail.com>
Thanks-to: Jeff King <peff@peff.net>
Signed-off-by: Michael Naumov <mnaoumov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 30 May 2014 17:57:52 +0000 (10:57 -0700)]
Sync with 1.9.4
Junio C Hamano [Wed, 28 May 2014 22:50:22 +0000 (15:50 -0700)]
Git 1.9.4
This is expected to be the final maintenance release for 1.9 series,
merging the remaining fixes that are relevant and are already in 2.0.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Fri, 30 May 2014 01:34:19 +0000 (21:34 -0400)]
t5537: re-drop http tests
These were originally removed by
0232852 (t5537: move
http tests out to t5539, 2014-02-13). However, they were
accidentally re-added in
1ddb4d7 (Merge branch
'nd/upload-pack-shallow', 2014-03-21).
This looks like an error in manual conflict resolution.
Here's what happened:
1. v1.9.0 shipped with the http tests in t5537.
2. We realized that this caused problems, and built
0232852 on top to move the tests to their own file.
This fix made it into v1.9.1.
3. We later had another fix in nd/upload-pack-shallow that
also touched t5537. It was built directly on v1.9.0.
When we merged nd/upload-pack-shallow to master, we got a
conflict; it was built on a version with the http tests, but
we had since removed them. The correct resolution was to
drop the http tests and keep the new ones, but instead we
kept everything.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 28 May 2014 22:46:36 +0000 (15:46 -0700)]
Merge branch 'rh/prompt-pcmode-avoid-eval-on-refname' into maint
* rh/prompt-pcmode-avoid-eval-on-refname:
git-prompt.sh: don't assume the shell expands the value of PS1
Junio C Hamano [Wed, 28 May 2014 22:45:57 +0000 (15:45 -0700)]
Merge branch 'mw/symlinks' into maint
* mw/symlinks:
setup: fix windows path buffer over-stepping
setup: don't dereference in-tree symlinks for absolute paths
setup: add abspath_part_inside_repo() function
t0060: add tests for prefix_path when path begins with work tree
t0060: add test for prefix_path when path == work tree
t0060: add test for prefix_path on symlinks via absolute paths
t3004: add test for ls-files on symlinks via absolute paths
Junio C Hamano [Wed, 28 May 2014 18:04:19 +0000 (11:04 -0700)]
Git 2.0
Øystein Walle [Tue, 27 May 2014 08:45:58 +0000 (10:45 +0200)]
config: respect '~' and '~user' in mailmap.file
git_config_string() does not handle '~' and '~user' as part of the
value. Using git_config_pathname() fixes this.
Signed-off-by: Øystein Walle <oystwa@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy [Sun, 25 May 2014 00:38:29 +0000 (07:38 +0700)]
gc --auto: do not lock refs in the background
9f673f9 (gc: config option for running --auto in background -
2014-02-08) puts "gc --auto" in background to reduce user's wait
time. Part of the garbage collecting is pack-refs and pruning
reflogs. These require locking some refs and may abort other processes
trying to lock the same ref. If gc --auto is fired in the middle of a
script, gc's holding locks in the background could fail the script,
which could never happen before
9f673f9.
Keep running pack-refs and "reflog --prune" in foreground to stop
parallel ref updates. The remaining background operations (repack,
prune and rerere) should not impact running git processes.
Reported-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
John Keeping [Thu, 22 May 2014 13:58:38 +0000 (14:58 +0100)]
completion: add missing options for git-merge
The options added to __git_merge_options are those that git-pull passes
to git-merge, since that variable is used by both commands.
Those added directly in _git_merge() are specific to git-merge and
are not passed thru from git-pull.
Reported-by: Haralan Dobrev <hkdobrev@gmail.com>
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
John Keeping [Thu, 22 May 2014 13:58:37 +0000 (14:58 +0100)]
completion: add a note that merge options are shared
This should avoid future confusion after a subsequent patch has added
some options to __git_merge_options and some directly in _git_merge().
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 21 May 2014 18:50:35 +0000 (11:50 -0700)]
Update draft release notes to 2.0
Hopefully for the last time ;-)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alexey Shumkin [Wed, 21 May 2014 13:20:07 +0000 (17:20 +0400)]
pretty.c: format string with truncate respects logOutputEncoding
Pretty format string %<(N,[ml]trunc)>%s truncates subject to a given
length with an appropriate padding. This works for non-ASCII texts when
i18n.logOutputEncoding is UTF-8 only (independently of a printed commit
message encoding) but does not work when i18n.logOutputEncoding is NOT
UTF-8.
In
7e77df3 (pretty: two phase conversion for non utf-8 commits, 2013-04-19)
'format_commit_item' function assumes commit message to be in UTF-8.
And that was so until
ecaee80 (pretty: --format output should honor
logOutputEncoding, 2013-06-26) where conversion to logOutputEncoding was
added before calling 'format_commit_message'.
Correct this by converting a commit message to UTF-8 first (as it
assumed in
7e77df3 (pretty: two phase conversion for non utf-8 commits,
2013-04-19)). Only after that convert a commit message to an actual
logOutputEncoding.
Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>
Reviewed-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alexey Shumkin [Wed, 21 May 2014 13:20:06 +0000 (17:20 +0400)]
t4205, t6006: add tests that fail with i18n.logOutputEncoding set
Pretty format string %<(N,[ml]trunc)>%s truncates subject to a given
length with an appropriate padding. This works for non-ASCII texts when
i18n.logOutputEncoding is UTF-8 only (independently of a printed commit
message encoding) but does not work when i18n.logOutputEncoding is NOT
UTF-8.
There were no breakages as far as were no tests for the case
when both a commit message and logOutputEncoding are not UTF-8.
Add failing tests for that which will be fixed in the next patch.
Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>
Helped-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Helped-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alexey Shumkin [Wed, 21 May 2014 13:20:05 +0000 (17:20 +0400)]
t4205 (log-pretty-format): use `tformat` rather than `format`
Use `tformat` to avoid using of `echo` to complete end of line.
Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alexey Shumkin [Wed, 21 May 2014 13:20:04 +0000 (17:20 +0400)]
t4041, t4205, t6006, t7102: don't hardcode tested encoding value
The tested encoding is always available in a variable. Use it instead of
hardcoding. Also, to be in line with other tests use ISO8859-1
(uppercase) rather then iso8859-1.
Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 20 May 2014 19:07:35 +0000 (12:07 -0700)]
Git 2.0-rc4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jason St. John [Sat, 17 May 2014 03:30:34 +0000 (23:30 -0400)]
RelNotes/2.0.0.txt: Fix several grammar issues, notably a lack of hyphens, double quotes, or articles
Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 20 May 2014 21:18:11 +0000 (14:18 -0700)]
Revert "Merge branch 'jc/graduate-remote-hg-bzr' (early part)"
Instead of showing a warning and working as before, fail and show
the message and force immediate upgrade from their upstream
repositories when these tools are run, per request from their
primary author.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Tue, 20 May 2014 06:49:20 +0000 (02:49 -0400)]
move "--follow needs one pathspec" rule to diff_setup_done
Because of the way "--follow" is implemented, we must have
exactly one pathspec. "git log" enforces this restriction,
but other users of the revision traversal code do not. For
example, "git format-patch --follow" will segfault during
try_to_follow_renames, as we have no pathspecs at all.
We can push this check down into diff_setup_done, which is
probably a better place anyway. It is the diff code that
introduces this restriction, so other parts of the code
should not need to care themselves.
Reported-by: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 20 May 2014 00:12:36 +0000 (17:12 -0700)]
Merge branch 'jc/graduate-remote-hg-bzr' (early part)
* 'jc/graduate-remote-hg-bzr' (early part):
remote-helpers: point at their upstream repositories
contrib: remote-helpers: add move warnings (v2.0)
Revert "Merge branch 'fc/transport-helper-sync-error-fix'"
Junio C Hamano [Thu, 15 May 2014 21:58:16 +0000 (14:58 -0700)]
remote-helpers: point at their upstream repositories
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras [Tue, 13 May 2014 21:29:56 +0000 (16:29 -0500)]
contrib: remote-helpers: add move warnings (v2.0)
The tools are now maintained out-of-tree, and they have a regression
in v2.0. It's better to start warning the users as soon as possible.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 14 May 2014 19:06:35 +0000 (12:06 -0700)]
Revert "Merge branch 'fc/transport-helper-sync-error-fix'"
This reverts commit
d508e4a8e2391ae2596403b6478d01cf3d5f928f,
reversing changes made to
e42552135a2a396f37053a89f44952ea907870b2.
The author of the original topic says he broke the upcoming 2.0
release with something that relates to "synchronization crash
regression" while refusing to give further specifics, so this would
unfortunately be the safest option for the upcoming release.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 19 May 2014 23:10:10 +0000 (16:10 -0700)]
Merge branch 'rh/prompt-pcmode-avoid-eval-on-refname'
* rh/prompt-pcmode-avoid-eval-on-refname:
git-prompt.sh: don't assume the shell expands the value of PS1
Richard Hansen [Mon, 19 May 2014 22:55:37 +0000 (18:55 -0400)]
git-prompt.sh: don't assume the shell expands the value of PS1
Not all shells subject the prompt string to parameter expansion. Test
whether the shell will expand the value of PS1, and use the result to
control whether raw ref names are included directly in PS1.
This fixes a regression introduced in commit
8976500 ("git-prompt.sh:
don't put unsanitized branch names in $PS1"): zsh does not expand PS1
by default, but that commit assumed it did. The bug resulted in
prompts containing the literal string '${__git_ps1_branch_name}'
instead of the actual branch name.
Reported-by: Caleb Thompson <caleb@calebthompson.io>
Signed-off-by: Richard Hansen <rhansen@bbn.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alexey Shumkin [Mon, 19 May 2014 15:28:16 +0000 (19:28 +0400)]
t4205 (log-pretty-formats): don't hardcode SHA-1 in expected outputs
The expected SHA-1 digests are always available in variables. Use
them instead of hardcoding.
That was introduced in
a742f2a (t4205 (log-pretty-formats): don't
hardcode SHA-1 in expected outputs, 2013-06-26) but unfortunately was
not followed in
5e1361c (log: properly handle decorations with chained
tags, 2013-12-17)
Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 19 May 2014 17:35:36 +0000 (10:35 -0700)]
Merge branch 'lt/request-pull'
* lt/request-pull:
request-pull: resurrect for-linus -> tags/for-linus DWIM
Junio C Hamano [Mon, 19 May 2014 17:35:24 +0000 (10:35 -0700)]
Merge branch 'jl/use-vsatisfy-correctly-for-2.0'
* jl/use-vsatisfy-correctly-for-2.0:
git-gui: tolerate major version changes when comparing the git version
Junio C Hamano [Mon, 19 May 2014 17:32:56 +0000 (10:32 -0700)]
Merge git://github.com/git-l10n/git-po
* git://github.com/git-l10n/git-po:
fr: a lot of good fixups
Junio C Hamano [Mon, 19 May 2014 17:32:25 +0000 (10:32 -0700)]
Merge branch 'kb/fast-hashmap'
* kb/fast-hashmap:
Documentation/technical/api-hashmap: remove source highlighting
Anders Kaseorg [Sat, 17 May 2014 11:08:55 +0000 (07:08 -0400)]
Documentation/technical/api-hashmap: remove source highlighting
The highlighting was pretty, but unfortunately, the failure mode
when source-highlight is not installed was that the entire code
block disappears.
See https://bugs.debian.org/745591,
https://bugs.launchpad.net/bugs/
1316810.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jens Lehmann [Sat, 17 May 2014 19:49:05 +0000 (21:49 +0200)]
git-gui: tolerate major version changes when comparing the git version
Since git 2.0.0 starting git gui in a submodule using a gitfile fails with
the following error:
No working directory ../../../<path>
couldn't change working directory
to "../../../<path>": no such file or
directory
This is because "git rev-parse --show-toplevel" is only run when git gui
sees a git version of at least 1.7.0 (which is the version in which the
--show-toplevel option was introduced). But "package vsatisfies" returns
false when the major version changes, which is not what we want here.
Fix that for both places where the git version is checked using vsatisfies
by appending a '-' to the version number. This tells vsatisfies that a
change of the major version is not considered to be a problem, as long as
the new major version is larger. This is done for both the place that
caused the reported bug and another spot where the git version is tested
for another feature.
Reported-by: Chris Packham <judge.packham@gmail.com>
Reported-by: Yann Dirson <ydirson@free.fr>
Helped-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Tested-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Grégoire Paris [Tue, 6 May 2014 21:29:57 +0000 (23:29 +0200)]
fr: a lot of good fixups
Signed-off-by: Grégoire Paris <postmaster@greg0ire.fr>
Acked-by: Jean-Noel Avila <jn.avila@free.fr>
Junio C Hamano [Fri, 16 May 2014 17:18:25 +0000 (10:18 -0700)]
request-pull: resurrect for-linus -> tags/for-linus DWIM
Older versions of Git before v1.7.10 did not DWIM
$ git pull $URL for-linus
to the tag "tags/for-linus" and the users were required to say
$ git pull $URL tags/for-linus
instead. Because newer versions of Git works either way,
request-pull used to show tags/for-linus when asked
$ git request-pull origin/master $URL for-linus
The recent updates broke this and in the output we see "for-linus"
without the "tags/" prefix.
As v1.7.10 is more than 2 years old, this should matter very little
in practice, but resurrecting it is very simple.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin [Tue, 8 Feb 2011 06:17:24 +0000 (00:17 -0600)]
git grep -O -i: if the pager is 'less', pass the '-I' option
When <command> happens to be the magic string "less", today
git grep -O<command> -e<pattern>
helpfully passes +/<pattern> to less so you can navigate through
the results within a file using the n and shift+n keystrokes.
Alas, that doesn't do the right thing for a case-insensitive match,
i.e.
git grep -i -O<command> -e<pattern>
For that case we should pass --IGNORE-CASE to "less" so that n and
shift+n can move between results ignoring case in the pattern.
The original patch came from msysgit and used "-i", but that was not
due to lack of support for "-I" but it merely overlooked that it
ought to work even when the pattern contains capital letters.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Stepan Kasal <kasal@ucw.cz>
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Thu, 15 May 2014 08:54:06 +0000 (04:54 -0400)]
open_sha1_file: report "most interesting" errno
When we try to open a loose object file, we first attempt to
open in the local object database, and then try any
alternates. This means that the errno value when we return
will be from the last place we looked (and due to the way
the code is structured, simply ENOENT if we do not have have
any alternates).
This can cause confusing error messages, as read_sha1_file
checks for ENOENT when reporting a missing object. If errno
is something else, we report that. If it is ENOENT, but
has_loose_object reports that we have it, then we claim the
object is corrupted. For example:
$ chmod 0 .git/objects/??/*
$ git rev-list --all
fatal: loose object
b2d6fab18b92d49eac46dc3c5a0bcafabda20131 (stored in .git/objects/b2/
d6fab18b92d49eac46dc3c5a0bcafabda20131) is corrupt
This patch instead keeps track of the "most interesting"
errno we receive during our search. We consider ENOENT to be
the least interesting of all, and otherwise report the first
error found (so problems in the object database take
precedence over ones in alternates). Here it is with this
patch:
$ git rev-list --all
fatal: failed to read object
b2d6fab18b92d49eac46dc3c5a0bcafabda20131: Permission denied
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Wed, 14 May 2014 22:13:06 +0000 (18:13 -0400)]
run_diff_files: do not look at uninitialized stat data
If we try to diff an index entry marked CE_VALID (because it
was marked with --assume-unchanged), we do not bother even
running stat() on the file to see if it was removed. This
started long ago with
540e694 (Prevent diff machinery from
examining assume-unchanged entries on worktree, 2009-08-11).
However, the subsequent code may look at our "struct stat"
and expect to find actual data; currently it will find
whatever cruft was left on the stack. This can cause
problems in two situations:
1. We call match_stat_with_submodule with the stat data,
so a submodule may be erroneously marked as changed.
2. If --find-copies-harder is in effect, we pass all
entries, even unchanged ones, to diff_change, so it can
list them as rename/copy sources. Since we found no
change, we assume that function will realize it and not
actually display any diff output. However, we end up
feeding it a bogus mode, leading it to sometimes claim
there was a mode change.
We can fix both by splitting the CE_VALID and regular code
paths, and making sure only to look at the stat information
in the latter. Furthermore, we push the declaration of our
"struct stat" down into the code paths that actually set it,
so we cannot accidentally access it uninitialized in future
code.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 13 May 2014 18:53:14 +0000 (11:53 -0700)]
Merge branch 'fc/prompt-zsh-read-from-file'
* fc/prompt-zsh-read-from-file:
contrib: completion: fix 'eread()' namespace
Felipe Contreras [Tue, 13 May 2014 13:21:19 +0000 (08:21 -0500)]
contrib: completion: fix 'eread()' namespace
Otherwise it might collide with a function of the same name in the
user's environment.
Suggested-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Mon, 12 May 2014 04:38:39 +0000 (00:38 -0400)]
index-pack: distinguish missing objects from type errors
When we fetch a pack that does not contain an object we
expected to receive, we get an error like:
$ git init --bare tmp.git && cd tmp.git
$ git fetch ../parent.git
[...]
error: Could not read
964953ec7bcc0245cb1d0db4095455edd21a2f2e
fatal: Failed to traverse parents of commit
b8247b40caf6704fe52736cdece6d6aae87471aa
error: ../parent.git did not send all necessary objects
This comes from the check_everything_connected rev-list. If
we try cloning the same repo (rather than a fetch), we end
up using index-pack's --check-self-contained-and-connected
option instead, which produces output like:
$ git clone --no-local --bare parent.git tmp.git
[...]
fatal: object of unexpected type
fatal: index-pack failed
Not only is the sha1 missing, but it's a misleading message.
There's no type problem, but rather a missing object
problem; we don't notice the difference because we simply
compare OBJ_BAD != OBJ_BLOB. Let's provide a different
message for this case:
$ git clone --no-local --bare parent.git tmp.git
fatal: did not receive expected object
6b00a8c61ed379d5f925a72c1987c9c52129d364
fatal: index-pack failed
While we're at it, let's also improve a true type mismatch
error to look like
fatal: object
6b00a8c61ed379d5f925a72c1987c9c52129d364: expected type blob, got tree
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 12 May 2014 17:12:05 +0000 (10:12 -0700)]
Merge git://github.com/git-l10n/git-po
* git://github.com/git-l10n/git-po:
l10n: Updated Bulgarian translation of git (1307t0f921u)
Alexander Shopov [Wed, 29 Jan 2014 13:08:40 +0000 (15:08 +0200)]
l10n: Updated Bulgarian translation of git (1307t0f921u)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Junio C Hamano [Fri, 9 May 2014 18:23:25 +0000 (11:23 -0700)]
Git 2.0-rc3
Junio C Hamano [Fri, 9 May 2014 18:00:48 +0000 (11:00 -0700)]
Sync with 1.9.3
Junio C Hamano [Fri, 9 May 2014 17:59:07 +0000 (10:59 -0700)]
Git 1.9.3
The third maintenance release for Git 1.9; contains all the fixes
that are scheduled to appear in Git 2.0 since 1.9.2.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
brian m. carlson [Sat, 26 Apr 2014 23:10:40 +0000 (23:10 +0000)]
blame: correctly handle files regardless of autocrlf
If a file contained CRLF line endings in a repository with
core.autocrlf=input, then blame always marked lines as "Not
Committed Yet", even if they were unmodified. Don't attempt to
convert the line endings when creating the fake commit so that blame
works correctly regardless of the autocrlf setting.
Reported-by: Ephrim Khong <dr.khong@gmail.com>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 8 May 2014 18:59:51 +0000 (11:59 -0700)]
Sync with maint
* maint:
shell doc: remove stray "+" in example
Start preparing for 1.9.3
Jonathan Nieder [Wed, 7 May 2014 23:44:01 +0000 (16:44 -0700)]
shell doc: remove stray "+" in example
The git-shell(1) manpage says
EXAMPLE
To disable interactive logins, displaying a greeting
instead:
+
$ chsh -s /usr/bin/git-shell
$ mkdir $HOME/git-shell-commands
[...]
The stray "+" has been there ever since the example was added in
v1.8.3-rc0~210^2 (shell: new no-interactive-login command to print a
custom message, 2013-03-09). The "+" sign between paragraphs is
needed in asciidoc to attach extra paragraphs to a list item but here
it is not needed and ends up rendered as a literal "+". Remove it.
A quick search with "grep -e '<p>+' /usr/share/doc/git/html/*.html"
doesn't find any other instances of this problem.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 8 May 2014 17:25:37 +0000 (10:25 -0700)]
Merge git://github.com/git-l10n/git-po
* 'master' of git://github.com/git-l10n/git-po:
l10n: Fix a couple of typos in the Swedish translation
Junio C Hamano [Thu, 8 May 2014 17:05:22 +0000 (10:05 -0700)]
Start preparing for 1.9.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 8 May 2014 17:01:32 +0000 (10:01 -0700)]
Merge branch 'cl/p4-use-diff-tree' into maint
"git p4" dealing with changes in binary files were broken by a
change in 1.9 release.
* cl/p4-use-diff-tree:
git-p4: format-patch to diff-tree change breaks binary patches
Junio C Hamano [Thu, 8 May 2014 17:01:18 +0000 (10:01 -0700)]
Merge branch 'rh/prompt-pcmode-avoid-eval-on-refname' into maint
The shell prompt script (in contrib/), when using the PROMPT_COMMAND
interface, used an unsafe construct when showing the branch name in
$PS1.
* rh/prompt-pcmode-avoid-eval-on-refname:
git-prompt.sh: don't put unsanitized branch names in $PS1
Junio C Hamano [Thu, 8 May 2014 17:01:06 +0000 (10:01 -0700)]
Merge branch 'km/avoid-non-function-return-in-rebase' into maint
"git rebase" used a POSIX shell construct FreeBSD /bin/sh does not
work well with.
* km/avoid-non-function-return-in-rebase:
Revert "rebase: fix run_specific_rebase's use of "return" on FreeBSD"
rebase: avoid non-function use of "return" on FreeBSD
Junio C Hamano [Thu, 8 May 2014 17:00:45 +0000 (10:00 -0700)]
Merge branch 'tb/unicode-6.3-zero-width' into maint
Some more Unicode codepoints defined in Unicode 6.3 as having zero
width have been taught to our display column counting logic.
* tb/unicode-6.3-zero-width:
utf8.c: partially update to version 6.3
Junio C Hamano [Thu, 8 May 2014 17:00:36 +0000 (10:00 -0700)]
Merge branch 'km/avoid-bs-in-shell-glob' into maint
Some tests used shell constructs that did not work well on FreeBSD
* km/avoid-bs-in-shell-glob:
test: fix t5560 on FreeBSD
Junio C Hamano [Thu, 8 May 2014 16:59:41 +0000 (09:59 -0700)]
Merge branch 'km/avoid-cp-a' into maint
Some tests used shell constructs that did not work well on FreeBSD
* km/avoid-cp-a:
test: fix t7001 cp to use POSIX options
Junio C Hamano [Wed, 7 May 2014 22:50:15 +0000 (15:50 -0700)]
Update draft release notes for 2.0
Describe one last minute one-liner fix for regression introduced in
1.9, and fix a grave mischaracterization on a recent remote-hg/bzr
change, pointed out by Felipe.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 7 May 2014 21:39:29 +0000 (14:39 -0700)]
Merge branch 'cl/p4-use-diff-tree'
Fixes a regression in 1.9.0 with an obviously correct single-liner.
* cl/p4-use-diff-tree:
git-p4: format-patch to diff-tree change breaks binary patches
Tolga Ceylan [Wed, 7 May 2014 05:48:54 +0000 (22:48 -0700)]
git-p4: format-patch to diff-tree change breaks binary patches
When applying binary patches a full index is required. format-patch
already handles this, but diff-tree needs '--full-index' argument
to always output full index. When git-p4 runs git-apply to test
the patch, git-apply rejects the patch due to abbreviated blob
object names. This is the error message git-apply emits in this
case:
error: cannot apply binary patch to '<filename>' without full index line
error: <filename>: patch does not apply
Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Peter Krefting [Wed, 7 May 2014 06:06:37 +0000 (07:06 +0100)]
l10n: Fix a couple of typos in the Swedish translation
Thanks-to: Anders Jonsson <anders.jonsson@norsjovallen.se>
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Øyvind A. Holm [Sat, 3 May 2014 19:08:50 +0000 (21:08 +0200)]
RelNotes/2.0.0: Grammar and typo fixes
Signed-off-by: Øyvind A. Holm <sunny@sunbase.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 2 May 2014 20:15:52 +0000 (13:15 -0700)]
Git 2.0-rc2
Junio C Hamano [Fri, 2 May 2014 20:11:02 +0000 (13:11 -0700)]
Merge branch 'mw/symlinks'
A finishing touch fix to a new change already in 'master'.
* mw/symlinks:
setup: fix windows path buffer over-stepping
Junio C Hamano [Fri, 2 May 2014 20:10:58 +0000 (13:10 -0700)]
Merge branch 'km/git-svn-workaround-older-getopt-long'
* km/git-svn-workaround-older-getopt-long:
t9117: use --prefix "" instead of --prefix=""
Junio C Hamano [Fri, 2 May 2014 20:10:53 +0000 (13:10 -0700)]
Merge branch 'rh/prompt-pcmode-avoid-eval-on-refname'
* rh/prompt-pcmode-avoid-eval-on-refname:
git-prompt.sh: don't put unsanitized branch names in $PS1
Junio C Hamano [Fri, 2 May 2014 20:10:47 +0000 (13:10 -0700)]
Merge branch 'mk/doc-git-gui-display-untracked'
* mk/doc-git-gui-display-untracked:
Documentation: git-gui: describe gui.displayuntracked
Junio C Hamano [Wed, 30 Apr 2014 18:01:42 +0000 (11:01 -0700)]
Merge git://github.com/git-l10n/git-po
* git://github.com/git-l10n/git-po:
l10n: de.po: improve hint for autocorrected command execution
l10n: de.po: translate 45 new messages
l10n: de.po: correct translation of "completed" after resolving deltas
l10n: zh_CN.po: translate 46 new messages (2229t0f0u)
l10n: fr translation for v2.0.0rc0 (2228t)
l10n: Update Swedish translation (2228t0f0u)
l10n: vi.po (2228t): Update and minor fix
l10n: git.pot: v2.0.0 round 1 (45 new, 28 removed)
Junio C Hamano [Wed, 30 Apr 2014 17:58:10 +0000 (10:58 -0700)]
Revert the whole "ask curl-config" topic for now
Postpone this a bit during the feature freeze and retry the effort
in the next cycle.
Ralf Thielow [Fri, 25 Apr 2014 20:16:43 +0000 (22:16 +0200)]
l10n: de.po: improve hint for autocorrected command execution
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Ralf Thielow [Tue, 1 Apr 2014 18:25:20 +0000 (20:25 +0200)]
l10n: de.po: translate 45 new messages
Translate 45 new messages came from git.pot update in
5e078fc
(l10n: git.pot: v2.0.0 round 1 (45 new, 28 removed)).
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Thomas Rast <tr@thomasrast.ch>
Ralf Thielow [Sat, 12 Apr 2014 19:39:10 +0000 (21:39 +0200)]
l10n: de.po: correct translation of "completed" after resolving deltas
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Jörn Engel [Mon, 21 Apr 2014 20:46:22 +0000 (16:46 -0400)]
pager: do allow spawning pager recursively
This reverts commit
88e8f908f2b0c56f9ccf8134d8ff9f689af9cc84, which
tried to allow
GIT_PAGER="git -p column --mode='dense color'" git -p branch
and still wanted to avoid "git -p column" to invoke itself. However,
this falls into "don't do that -p then" category.
In particular, inside "git log", with results going through less, a
potentially interesting commit may be found and from there inside
"less", the user may want to execute "git show <commit>". Before
the commit being reverted, this used to show the patch in less but
it no longer does.
Signed-off-by: Jörn Engel <joern@logfs.org>
Reviewed-by: Jeff King <peff@peff.net>
Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Acked-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 28 Apr 2014 22:48:12 +0000 (15:48 -0700)]
Merge branch 'db/make-with-curl'
It turns out that some platforms do ship without curl-config even
though they build with the hardcoded default -lcurl and rely on it
to work.
* db/make-with-curl:
Makefile: default to -lcurl when no CURL_CONFIG or CURLDIR
Junio C Hamano [Mon, 28 Apr 2014 22:47:35 +0000 (15:47 -0700)]
Merge branch 'jk/external-diff-use-argv-array' (early part)
Crash fix for codepath that miscounted the necessary size for an
array when spawning an external diff program.
* 'jk/external-diff-use-argv-array' (early part):
run_external_diff: use an argv_array for the command line
Dave Borowitz [Mon, 28 Apr 2014 21:01:23 +0000 (14:01 -0700)]
Makefile: default to -lcurl when no CURL_CONFIG or CURLDIR
The original implementation of CURL_CONFIG support did not match the
original behavior of using -lcurl when CURLDIR was not set. This broke
implementations that were lacking curl-config but did have libcurl
installed along system libraries, such as MSysGit. In other words, the
assumption that curl-config is always installed was incorrect.
Instead, if CURL_CONFIG is empty or returns an empty result (e.g. due
to curl-config being missing), use the old behavior of falling back to
-lcurl.
Signed-off-by: Dave Borowitz <dborowitz@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Fri, 25 Apr 2014 23:11:15 +0000 (19:11 -0400)]
commit: do not complain of empty messages from -C
When we pick another commit's message, we die() immediately
if we find that it's empty and we are not going to run an
editor (i.e., when running "-C" instead of "-c"). However,
this check is redundant and harmful.
It's redundant because we will already notice the empty
message later, after we would have run the editor, and die
there (just as we would for a regular, not "-C" case, where
the user provided an empty message in the editor).
It's harmful for a few reasons:
1. It does not respect --allow-empty-message. As a result,
a "git rebase -i" cannot "pick" such a commit. So you
cannot even go back in time to fix it with a "reword"
or "edit" instruction.
2. It does not take into account other ways besides the
editor to modify the message. For example, "git commit
-C empty-commit -m foo" could take the author
information from empty-commit, but add a message to it.
There's more to do to make that work correctly (and
right now we explicitly forbid "-C with -m"), but this
removes one roadblock.
3. The existing check is not enough to prevent segfaults.
We try to find the "\n\n" header/body boundary in the
commit. If it is at the end of the string (i.e., no
body), _or_ if we cannot find it at all (i.e., a
truncated commit object), we consider the message
empty. With "-C", that's OK; we die in either case. But
with "-c", we continue on, and in the case of a
truncated commit may end up dereferencing NULL+2.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>