Commit graph

35884 commits

Author SHA1 Message Date
Junio C Hamano efe5f1d25d Merge branch 'ow/manpages-typofix'
Various typofixes, all looked correct.

* ow/manpages-typofix:
  Documentation: fix typos in man pages
2014-02-07 11:55:12 -08:00
Junio C Hamano c256661bbe Merge branch 'aj/ada-diff-word-pattern'
* aj/ada-diff-word-pattern:
  userdiff: update Ada patterns
2014-02-07 11:55:10 -08:00
Junio C Hamano 53c2a5980e Merge branch 'nd/tag-doc'
* nd/tag-doc:
  git-tag.txt: <commit> for --contains is optional
2014-02-07 11:55:07 -08:00
Junio C Hamano cdbf623254 check-attr: move to the top of working tree when in non-bare repository
Lasse Makholm noticed that running "git check-attr" from a place
totally unrelated to $GIT_DIR and $GIT_WORK_TREE does not give
expected results.  I think it is because the command does not say it
wants to call setup_work_tree().

We still need to support use cases where only a bare repository is
involved, so unconditionally requiring a working tree would not work
well.  Instead, make a call only in a non-bare repository.

We may want to see if we want to do a similar fix in the opposite
direction to check-ignore.  The command unconditionally requires a
working tree, but it should be usable in a bare repository just like
check-attr attempts to be.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-06 10:19:33 -08:00
Junio C Hamano c4a7bce1b5 t0003: do not chdir the whole test process
Moving to some other directory and letting the remainder of the test
pieces to expect that they start there is a bad practice.  The test
that contains chdir itself may fail (or by mistake skipped via the
GIT_SKIP_TESTS mechanism) in which case the remainder may operate on
files in unexpected places.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-06 10:16:27 -08:00
Jiang Xin 98b2761d5e l10n: zh_CN.po: Disambiguation for rebase
Disambiguate the Chinese translation for "rebase", and update other
related entries.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2014-02-06 23:15:33 +08:00
Øystein Walle 5fe8f49b6d Documentation: fix typos in man pages
Signed-off-by: Øystein Walle <oystwa@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-05 14:35:45 -08:00
Junio C Hamano 89ba81dc76 Sync with 1.8.5.4 2014-02-05 14:14:40 -08:00
Junio C Hamano c7b8cf4985 howto/maintain-git.txt: new version numbering scheme
We wanted to call the upcoming release "Git 1.9", with its
maintenance track being "Git 1.9.1", "Git 1.9.2", etc., but various
third-party tools are reported to assume that there are at least
three dewey-decimal components in our version number.

Adjust the plan so that vX.Y.0 are feature releases while vX.Y.Z
(Z > 0) are maintenance releases.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-05 14:14:00 -08:00
Junio C Hamano 3330a2c4f6 Git 1.8.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-05 14:13:23 -08:00
Junio C Hamano 01a5774571 Merge branch 'jc/maint-pull-docfix' into maint
The documentation to "git pull" hinted there is an "-m" option
because it incorrectly shared the documentation with "git merge".

* jc/maint-pull-docfix:
  Documentation: "git pull" does not have the "-m" option
  Documentation: exclude irrelevant options from "git pull"
2014-02-05 14:03:47 -08:00
Junio C Hamano a74a682b55 Merge branch 'ow/stash-with-ifs' into maint
The implementation of 'git stash $cmd "stash@{...}"' did not quote
the stash argument properly and left it split at IFS whitespace.

* ow/stash-with-ifs:
  stash: handle specifying stashes with $IFS
2014-02-05 14:03:20 -08:00
Junio C Hamano 3c864743a6 Merge branch 'js/lift-parent-count-limit' into maint
There is no reason to have a hardcoded upper limit of the number of
parents for an octopus merge, created via the graft mechanism, but
there was.

* js/lift-parent-count-limit:
  Remove the line length limit for graft files
2014-02-05 14:03:01 -08:00
Junio C Hamano ee5788e306 Merge branch 'nd/add-empty-fix' into maint
"git add -A" (no other arguments) in a totally empty working tree
used to emit an error.

* nd/add-empty-fix:
  add: don't complain when adding empty project root
2014-02-05 14:02:44 -08:00
Junio C Hamano d11ade701a Merge branch 'bc/log-decoration' into maint
"git log --decorate" did not handle a tag pointed by another tag
nicely.

* bc/log-decoration:
  log: properly handle decorations with chained tags
2014-02-05 14:02:05 -08:00
Junio C Hamano 28856247e2 Merge branch 'jh/rlimit-nofile-fallback' into maint
When we figure out how many file descriptors to allocate for
keeping packfiles open, a system with non-working getrlimit() could
cause us to die(), but because we make this call only to get a
rough estimate of how many is available and we do not even attempt
to use up all file descriptors available ourselves, it is nicer to
fall back to a reasonable low value rather than dying.

* jh/rlimit-nofile-fallback:
  get_max_fd_limit(): fall back to OPEN_MAX upon getrlimit/sysconf failure
2014-02-05 14:01:23 -08:00
Junio C Hamano a118beeddf Merge branch 'jl/commit-v-strip-marker' into maint
"git commit -v" appends the patch to the log message before
editing, and then removes the patch when the editor returned
control. However, the patch was not stripped correctly when the
first modified path was a submodule.

* jl/commit-v-strip-marker:
  commit -v: strip diffs and submodule shortlogs from the commit message
2014-02-05 14:01:09 -08:00
Junio C Hamano ac0835f94b Merge branch 'tr/send-email-ssl' into maint
SSL-related options were not passed correctly to underlying socket
layer in "git send-email".

* tr/send-email-ssl:
  send-email: set SSL options through IO::Socket::SSL::set_client_defaults
  send-email: --smtp-ssl-cert-path takes an argument
  send-email: pass Debug to Net::SMTP::SSL::new
2014-02-05 14:00:18 -08:00
Junio C Hamano 1a111957b3 Merge branch 'tb/clone-ssh-with-colon-for-port' into maint
Remote repository URL expressed in scp-style host:path notation are
parsed more carefully (e.g. "foo/bar:baz" is local, "[::1]:/~user" asks
to connect to user's home directory on host at address ::1.

* tb/clone-ssh-with-colon-for-port:
  git_connect(): use common return point
  connect.c: refactor url parsing
  git_connect(): refactor the port handling for ssh
  git fetch: support host:/~repo
  t5500: add test cases for diag-url
  git fetch-pack: add --diag-url
  git_connect: factor out discovery of the protocol and its parts
  git_connect: remove artificial limit of a remote command
  t5601: add tests for ssh
  t5601: remove clear_ssh, refactor setup_ssh_wrapper
2014-02-05 13:59:16 -08:00
Junio C Hamano bf03d6e92d Merge branch 'nd/transport-positive-depth-only' into maint
"git fetch --depth=0" was a no-op, and was silently ignored.
Diagnose it as an error.

* nd/transport-positive-depth-only:
  clone,fetch: catch non positive --depth option value
2014-02-05 13:58:52 -08:00
Junio C Hamano 2171c0c36f Merge branch 'tb/repack-fix-renames' (early part)
Finishing touches to the "rewrite repack in C" series.

* 'tb/repack-fix-renames' (early part):
  repack.c: rename and unlink pack file if it exists
2014-02-05 12:02:29 -08:00
Torsten Bögershausen 9d7fbfd204 repack.c: rename and unlink pack file if it exists
When a repo was fully repacked, and is repacked again, we may run
into the situation that "new" packfiles have the same name as
already existing ones (traditionally packfiles have been named after
the list of names of objects in them, so repacking all the objects
in a single pack would have produced a packfile with the same name).

The logic is to rename the existing ones into filename like
"old-XXX", create the new ones and then remove the "old-" ones.
When something went wrong in the middle, this sequence is rolled
back by renaming the "old-" files back.

The renaming into "old-" did not work as intended, because
file_exists() was done on "XXX", not "pack-XXX".  Also when rolling
back the change, the code tried to rename "old-pack-XXX" but the
saved ones are named "old-XXX", so this couldn't have worked.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-05 11:58:49 -08:00
Adrian Johnson 39a87a29ce userdiff: update Ada patterns
- Allow extra space in "is new" and "is separate"
- Fix bug in word regex for numbers

Signed-off-by: Adrian Johnson <ajohnson@redneon.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-05 10:45:51 -08:00
Martin Erik Werner 655ee9ea3e setup: don't dereference in-tree symlinks for absolute paths
The prefix_path_gently() function currently applies real_path to
everything if given an absolute path, dereferencing symlinks both
outside and inside the work tree.

This causes most high-level functions to misbehave when acting on
symlinks given via absolute paths. For example

	$ git add /dir/repo/symlink

attempts to add the target of the symlink rather than the symlink
itself, which is usually not what the user intends to do.

In order to manipulate symlinks in the work tree using absolute paths,
symlinks should only be dereferenced outside the work tree.

Modify the prefix_path_gently() to first normalize the path in order to
make sure path levels are separated by '/', then pass the result to
'abspath_part_inside_repo' to find the part inside the work tree
(without dereferencing any symlinks inside the work tree).

For absolute paths, prefix_path_gently() did not, nor does now do, any
actual prefixing, hence the result from abspath_part_in_repo() is
returned as-is.

Fixes t0060-82 and t3004-5.

Signed-off-by: Martin Erik Werner <martinerikwerner@gmail.com>
Reviewed-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-04 12:08:49 -08:00
Martin Erik Werner ddc2a62815 setup: add abspath_part_inside_repo() function
In order to extract the part of an absolute path which lies inside the
repo, it is not possible to directly use real_path, since that would
dereference symlinks both outside and inside the work tree.

Add an abspath_part_inside_repo() function which first checks if the
work tree is already the prefix, then incrementally checks each path
level by temporarily NUL-terminating at each '/' and comparing against
the work tree path. If a match is found, it overwrites the input path
with the remainder past the work tree (which will be the part inside the
work tree).

This function is currently only intended for use in
'prefix_path_gently'.

Signed-off-by: Martin Erik Werner <martinerikwerner@gmail.com>
Reviewed-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-04 12:08:49 -08:00
Martin Erik Werner e131daa4c6 t0060: add tests for prefix_path when path begins with work tree
One edge-case that isn't currently checked in the tests is the beginning
of the path matching the work tree, despite the target not actually
being the work tree, for example:

  path = /dir/repoa
  work_tree = /dir/repo

should fail since the path is outside the repo. However, if /dir/repoa
is in fact a symlink that points to /dir/repo, it should instead
succeed.

Add two tests covering these cases, since they might be potential
regression points.

Signed-off-by: Martin Erik Werner <martinerikwerner@gmail.com>
Reviewed-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-04 12:08:47 -08:00
Martin Erik Werner e5aa1fc472 t0060: add test for prefix_path when path == work tree
The current behaviour of prefix_path is to return an empty string if
prefixing and absolute path that only contains exactly the work tree.
This behaviour is a potential regression point.

Signed-off-by: Martin Erik Werner <martinerikwerner@gmail.com>
Reviewed-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-04 11:25:33 -08:00
Martin Erik Werner 74af95d6aa t0060: add test for prefix_path on symlinks via absolute paths
When symlinks in the working tree are manipulated using the absolute
path, git dereferences them, and tries to manipulate the link target
instead.

This applies to most high-level commands but prefix_path is the common
denominator for all of them.

Add a known-breakage tests using the prefix_path function, which
currently uses real_path, causing the dereference.

Signed-off-by: Martin Erik Werner <martinerikwerner@gmail.com>
Reviewed-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-04 11:25:15 -08:00
Junio C Hamano f02033f1d0 t3004: add test for ls-files on symlinks via absolute paths
When symlinks in the working tree are manipulated using the absolute
path, git dereferences them, and tries to manipulate the link target
instead.

This causes most high-level functions to misbehave when acting on
symlinks given via absolute paths. For example

  $ git add /dir/repo/symlink

attempts to add the target of the symlink rather than the symlink
itself, which is usually not what the user intends to do.

This is a regression introduced by 18e051a:
  setup: translate symlinks in filename when using absolute paths
(which did not take symlinks inside the work tree into consideration).

Add a known-breakage test using the ls-files function, checking both if
the symlink leads to a target in the same directory, and a target in the
above directory.

Signed-off-by: Martin Erik Werner <martinerikwerner@gmail.com>
Tested-by: Martin Erik Werner <martinerikwerner@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-04 11:24:53 -08:00
Nguyễn Thái Ngọc Duy 81966ab2ec git-tag.txt: <commit> for --contains is optional
This goes far back to e84fb2f (branch --contains: default to HEAD -
2008-07-08) where the same parsing code is shared with
builtin/tag.c. git-branch.txt correctly states that <commit> for
--contains is optional while git-tag.txt does not. Correct it.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-02-04 10:35:58 -08:00
Jiang Xin 8376b58d1c l10n: zh_CN.po: translate 1 new message (2211t0f0u)
Update translation for git v1.9-rc2.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2014-02-03 10:53:18 +08:00
Jiang Xin afa41284a2 Merge branch 'master' of git://github.com/nafmo/git-l10n-sv
* 'master' of git://github.com/nafmo/git-l10n-sv:
  l10n: Update Swedish translation (2211t0f0u)
2014-02-03 09:47:27 +08:00
Jiang Xin e8f4a7cb6e Merge branch 'master' of git://github.com/vnwildman/git
* 'master' of git://github.com/vnwildman/git:
  l10n: vi.po (2211t): Updated one new string
2014-02-03 09:45:14 +08:00
Tran Ngoc Quan 8620ed578b l10n: vi.po (2211t): Updated one new string
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2014-02-03 07:49:47 +07:00
Peter Krefting b6c0df8948 l10n: Update Swedish translation (2211t0f0u)
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2014-02-02 17:22:21 +01:00
Jean-Noel Avila 893fcc3e4d l10n: fr: 1.9rc2 2211t
Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
2014-02-02 14:38:05 +01:00
Jiang Xin d57b24b60b l10n: git.pot: v1.9 round 2 (1 new)
Generate po/git.pot from v1.9-rc2 for git v1.9 l10n round 2.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2014-02-01 08:07:02 +08:00
Junio C Hamano be961c292f Git 1.9-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-31 14:16:06 -08:00
Junio C Hamano e94ea162db Merge git://github.com/git-l10n/git-po
* 'master' of git://github.com/git-l10n/git-po:
  l10n: Bulgarian translation of git (222t21f1967u)
  po/TEAMS: Added Bulgarian team
  l10n: remove 2 blank translations on Danish, Dutch
  l10n: zh_CN.po: translate 27 messages (2210t0f0u)
  l10n: Update Swedish translation (2210t0f0u)
  [fr] update french translation 2210/2210
  l10n: vi.po (2210t): Updated git-core translation
  l10n: git.pot: v1.9 round 1 (27 new, 11 removed)
2014-01-31 10:52:29 -08:00
Junio C Hamano 3de92cd16d Merge branch 'jn/pager-lv-default-env'
A finishing touch to its test.

* jn/pager-lv-default-env:
  pager test: make fake pager consume all its input
2014-01-31 10:51:57 -08:00
Jonathan Nieder 52c02f658e pager test: make fake pager consume all its input
Otherwise there is a race: if 'git log' finishes writing before the
pager terminates and closes the pipe, all is well, and if the pager
finishes quickly enough then 'git log' terminates with SIGPIPE.

 died of signal 13 at /build/buildd/git-1.9~rc1/t/test-terminal.perl line 33.
 not ok 6 - LESS and LV envvars are set for pagination

Noticed on Ubuntu PPA builders, where the race was lost about half the
time.  Compare v1.7.0.2~6^2 (tests: Fix race condition in t7006-pager,
2010-02-22).

Reported-by: Anders Kaseorg <andersk@MIT.EDU>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-31 09:07:17 -08:00
Alexander Shopov 25e2fbb4e2 l10n: Bulgarian translation of git (222t21f1967u)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2014-01-29 14:29:15 +02:00
David Sharp a43219f2aa rev-parse: check i before using argv[i] against argc
The --prefix, --default, and --resolve-git-dir options to
git-rev-parse require an argument, but when given no argument,
the code uses the NULL read from argv[argc] without checking,
leading to a segfault.

Instead, check first and die() with an error message.

Signed-off-by: David Sharp <dhsharp@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-28 14:10:06 -08:00
Jeff King 67beb60056 handle_path_include: don't look at NULL value
When we see config like:

  [include]
  path

the expand_user_path helper notices that the config value is
empty, but we then dereference NULL while printing the error
message (glibc will helpfully print "(null)" for us here,
but we cannot rely on that).

  $ git -c include.path rev-parse
  error: Could not expand include path '(null)'
  fatal: unable to parse command-line config

Instead of tweaking our message, let's actually use
config_error_nonbool to match other config variables that
expect a value:

  $ git -c include.path rev-parse
  error: Missing value for 'include.path'
  fatal: unable to parse command-line config

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-28 11:59:49 -08:00
Jeff King 53ec551c87 expand_user_path: do not look at NULL path
We explicitly check for and handle the case that the
incoming "path" variable is NULL, but before doing so we
call strchrnul on it, leading to a potential segfault.

We can fix this simply by moving the strchrnul call down; as
a bonus, we can tighten the scope on the associated
variable.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-28 11:59:47 -08:00
Alexander Shopov 5123e7d54f po/TEAMS: Added Bulgarian team
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2014-01-28 19:16:53 +02:00
Junio C Hamano bd3e186d81 Git 1.9-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-01-27 11:01:35 -08:00
Junio C Hamano 8bba7206b5 Merge branch 'as/tree-walk-fix-aggressive-short-cut'
* as/tree-walk-fix-aggressive-short-cut:
  tree_entry_interesting: match against all pathspecs
2014-01-27 10:48:32 -08:00
Junio C Hamano 1ad5417a26 Merge branch 'ta/doc-http-protocol-in-html'
* ta/doc-http-protocol-in-html:
  http-protocol.txt: don't use uppercase for variable names in "The Negotiation Algorithm"
  Documentation: make it easier to maintain enumerated documents
  create HTML for http-protocol.txt
2014-01-27 10:45:59 -08:00
Junio C Hamano 78dc48e4b0 Merge branch 'mh/doc-wo-names'
* mh/doc-wo-names:
  doc: remote author/documentation sections from more pages
2014-01-27 10:45:56 -08:00