gitweb.git
docs/merge-strategies: remove hyphen from mis-mergesAlbert L. Lash, IV Sat, 8 Feb 2014 20:41:34 +0000 (15:41 -0500)

docs/merge-strategies: remove hyphen from mis-merges

The term mismerges without hyphen is used a few other
places in the documentation. Let's update this to
be consistent.

Signed-off-by: Albert L. Lash, IV <alash3@bloomberg.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge git://github.com/git-l10n/git-poJunio C Hamano Tue, 11 Feb 2014 19:02:05 +0000 (11:02 -0800)

Merge git://github.com/git-l10n/git-po

* 'master' of git://github.com/git-l10n/git-po:
l10n: zh_CN.po: Disambiguation for rebase
l10n: zh_CN.po: translate 1 new message (2211t0f0u)
l10n: vi.po (2211t): Updated one new string
l10n: Update Swedish translation (2211t0f0u)
l10n: fr: 1.9rc2 2211t
l10n: git.pot: v1.9 round 2 (1 new)

dir: ignore trailing spaces in exclude patternsNguyễn Thái Ngọc Duy Sun, 9 Feb 2014 00:26:38 +0000 (07:26 +0700)

dir: ignore trailing spaces in exclude patterns

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

dir: warn about trailing spaces in exclude patternsNguyễn Thái Ngọc Duy Sun, 9 Feb 2014 00:26:37 +0000 (07:26 +0700)

dir: warn about trailing spaces in exclude patterns

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tests: auto-set git-daemon portJeff King Mon, 10 Feb 2014 19:16:38 +0000 (14:16 -0500)

tests: auto-set git-daemon port

A recent commit taught lib-httpd to always start apache on
the same port as the numbered tests. Let's do the same for
the git-daemon tests.

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

gc: config option for running --auto in backgroundNguyễn Thái Ngọc Duy Sat, 8 Feb 2014 07:08:52 +0000 (14:08 +0700)

gc: config option for running --auto in background

`gc --auto` takes time and can block the user temporarily (but not any
less annoyingly). Make it run in background on systems that support
it. The only thing lost with running in background is printouts. But
gc output is not really interesting. You can keep it in foreground by
changing gc.autodetach.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

daemon: move daemonize() to libgit.aNguyễn Thái Ngọc Duy Sat, 8 Feb 2014 07:08:51 +0000 (14:08 +0700)

daemon: move daemonize() to libgit.a

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fetch-pack: fix deepen shallow over smart http with... Nguyễn Thái Ngọc Duy Thu, 6 Feb 2014 15:10:39 +0000 (22:10 +0700)

fetch-pack: fix deepen shallow over smart http with no-done cap

In smart http, upload-pack adds new shallow lines at the beginning of
each rpc response. Only shallow lines from the first rpc call are
useful. After that they are thrown away. It's designed this way
because upload-pack is stateless and has no idea when its shallow
lines are helpful or not.

So after refs are negotiated with multi_ack_detailed and the server
thinks it learned enough, it sends "ACK obj-id ready", terminates the
rpc call and waits for the final rpc round. The client sends "done".
The server sends another response, which also has shallow lines at
the beginning, and the last "ACK obj-id" line.

When no-done is active, the last round is cut out, the server sends
"ACK obj-id ready" and "ACK obj-id" in the same rpc
response. fetch-pack is updated to recognize this and not send
"done". However it still tries to consume shallow lines, which are
never sent.

Update the code, make sure to skip consuming shallow lines when
no-done is enabled.

Reported-by: Jeff King <peff@peff.net>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

protocol-capabilities.txt: document no-doneNguyễn Thái Ngọc Duy Thu, 6 Feb 2014 15:10:38 +0000 (22:10 +0700)

protocol-capabilities.txt: document no-done

See 3e63b21 (upload-pack: Implement no-done capability - 2011-03-14)
and 761ecf0 (fetch-pack: Implement no-done capability - 2011-03-14)
for more information.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

protocol-capabilities.txt: refer multi_ack_detailed... Nguyễn Thái Ngọc Duy Thu, 6 Feb 2014 15:10:37 +0000 (22:10 +0700)

protocol-capabilities.txt: refer multi_ack_detailed back to pack-protocol.txt

pack-protocol.txt explains in detail how multi_ack_detailed works and
what's the difference between no multi_ack, multi_ack and
multi_ack_detailed. No need to repeat here.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack-protocol.txt: clarify 'obj-id' in the last ACK... Nguyễn Thái Ngọc Duy Thu, 6 Feb 2014 15:10:36 +0000 (22:10 +0700)

pack-protocol.txt: clarify 'obj-id' in the last ACK after 'done'

It's introduced in 1bd8c8f (git-upload-pack: Support the multi_ack
protocol - 2005-10-28) but probably better documented in the commit
message of 78affc4 (Add multi_ack_detailed capability to
fetch-pack/upload-pack - 2009-10-30).

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test: rename http fetch and push test filesNguyễn Thái Ngọc Duy Thu, 6 Feb 2014 15:10:34 +0000 (22:10 +0700)

test: rename http fetch and push test files

Make clear which one is for dumb protocol, which one is for smart from
their file name.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tests: auto-set LIB_HTTPD_PORT from test nameJeff King Mon, 10 Feb 2014 14:39:48 +0000 (09:39 -0500)

tests: auto-set LIB_HTTPD_PORT from test name

We set the default apache port for each of the httpd tests
to the 4-digit test number of the test script. We want these
to remain unique so that the tests do not conflict with each
other when run in parallel.

Instead of doing it manually in each test script, let's just
set it from the test name at run time. This is simpler, and
is one less thing to be updated when test scripts are
renamed (e.g., when being re-rolled or when conflicting
after being merged with another topic).

Incidentally, this fixes a case where t5537 and t5538 used
the same port number (5537), and could conflict with each
other when run in parallel.

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

Git 1.9.0-rc3 v1.9.0-rc3Junio C Hamano Fri, 7 Feb 2014 19:56:07 +0000 (11:56 -0800)

Git 1.9.0-rc3

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

Merge branch 'ow/manpages-typofix'Junio C Hamano Fri, 7 Feb 2014 19:55:11 +0000 (11:55 -0800)

Merge branch 'ow/manpages-typofix'

Various typofixes, all looked correct.

* ow/manpages-typofix:
Documentation: fix typos in man pages

Merge branch 'aj/ada-diff-word-pattern'Junio C Hamano Fri, 7 Feb 2014 19:55:10 +0000 (11:55 -0800)

Merge branch 'aj/ada-diff-word-pattern'

* aj/ada-diff-word-pattern:
userdiff: update Ada patterns

Merge branch 'nd/tag-doc'Junio C Hamano Fri, 7 Feb 2014 19:55:06 +0000 (11:55 -0800)

Merge branch 'nd/tag-doc'

* nd/tag-doc:
git-tag.txt: <commit> for --contains is optional

check-attr: move to the top of working tree when in... Junio C Hamano Thu, 6 Feb 2014 18:19:33 +0000 (10:19 -0800)

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>

t0003: do not chdir the whole test processJunio C Hamano Thu, 6 Feb 2014 18:16:27 +0000 (10:16 -0800)

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>

l10n: zh_CN.po: Disambiguation for rebaseJiang Xin Sun, 2 Feb 2014 12:46:58 +0000 (20:46 +0800)

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>

reset: support "--mixed --intent-to-add" modeNguyễn Thái Ngọc Duy Tue, 4 Feb 2014 02:20:09 +0000 (09:20 +0700)

reset: support "--mixed --intent-to-add" mode

When --mixed is used, entries could be removed from index if the
target ref does not have them. When "reset" is used in preparation for
commit spliting (in a dirty worktree), it could be hard to track what
files to be added back. The new option --intent-to-add simplifies it
by marking all removed files intent-to-add.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>

Documentation: fix typos in man pagesØystein Walle Wed, 5 Feb 2014 22:19:43 +0000 (23:19 +0100)

Documentation: fix typos in man pages

Signed-off-by: Øystein Walle <oystwa@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with 1.8.5.4Junio C Hamano Wed, 5 Feb 2014 22:14:40 +0000 (14:14 -0800)

Sync with 1.8.5.4

howto/maintain-git.txt: new version numbering schemeJunio C Hamano Fri, 31 Jan 2014 23:14:05 +0000 (15:14 -0800)

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>

Git 1.8.5.4 v1.8.5.4Junio C Hamano Wed, 5 Feb 2014 22:05:31 +0000 (14:05 -0800)

Git 1.8.5.4

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

Merge branch 'jc/maint-pull-docfix' into maintJunio C Hamano Wed, 5 Feb 2014 22:03:47 +0000 (14:03 -0800)

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"

Merge branch 'ow/stash-with-ifs' into maintJunio C Hamano Wed, 5 Feb 2014 22:03:20 +0000 (14:03 -0800)

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

Merge branch 'js/lift-parent-count-limit' into maintJunio C Hamano Wed, 5 Feb 2014 22:03:01 +0000 (14:03 -0800)

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

Merge branch 'nd/add-empty-fix' into maintJunio C Hamano Wed, 5 Feb 2014 22:02:44 +0000 (14:02 -0800)

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

Merge branch 'bc/log-decoration' into maintJunio C Hamano Wed, 5 Feb 2014 22:02:05 +0000 (14:02 -0800)

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

Merge branch 'jh/rlimit-nofile-fallback' into maintJunio C Hamano Wed, 5 Feb 2014 22:01:23 +0000 (14:01 -0800)

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

Merge branch 'jl/commit-v-strip-marker' into maintJunio C Hamano Wed, 5 Feb 2014 22:01:09 +0000 (14:01 -0800)

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

Merge branch 'tr/send-email-ssl' into maintJunio C Hamano Wed, 5 Feb 2014 22:00:18 +0000 (14:00 -0800)

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

Merge branch 'tb/clone-ssh-with-colon-for-port' into... Junio C Hamano Wed, 5 Feb 2014 21:59:16 +0000 (13:59 -0800)

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

Merge branch 'nd/transport-positive-depth-only' into... Junio C Hamano Wed, 5 Feb 2014 21:58:51 +0000 (13:58 -0800)

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

Merge branch 'tb/repack-fix-renames' (early part)Junio C Hamano Wed, 5 Feb 2014 20:02:29 +0000 (12:02 -0800)

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

repack.c: rename and unlink pack file if it existsTorsten Bögershausen Sun, 2 Feb 2014 15:09:56 +0000 (16:09 +0100)

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>

revision: convert to using diff_tree_sha1()Kirill Smelkov Wed, 5 Feb 2014 16:57:12 +0000 (20:57 +0400)

revision: convert to using diff_tree_sha1()

Since diff_tree_sha1() can now accept empty trees via NULL sha1, we
could just call it without manually reading trees into tree_desc and
duplicating code.

Besides, that

if (!tree)
return 0;

looked suspect - we were saying an invalid tree != empty tree, but maybe it is
better to just say the tree is invalid here, which is what diff_tree_sha1()
does for such case.

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

line-log: convert to using diff_tree_sha1()Kirill Smelkov Wed, 5 Feb 2014 16:57:11 +0000 (20:57 +0400)

line-log: convert to using diff_tree_sha1()

Since diff_tree_sha1() can now accept empty trees via NULL sha1, we
could just call it without manually reading trees into tree_desc and
duplicating code.

Cc: Thomas Rast <tr@thomasrast.ch>
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tree-diff: convert diff_root_tree_sha1() to just call... Kirill Smelkov Wed, 5 Feb 2014 16:57:10 +0000 (20:57 +0400)

tree-diff: convert diff_root_tree_sha1() to just call diff_tree_sha1 with old=NULL

Now since diff_tree_sha1 understands NULL for both old and new, we could
indicate an empty tree for root commit by providing just NULL for old
sha1.

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tree-diff: allow diff_tree_sha1 to accept NULL sha1Kirill Smelkov Wed, 5 Feb 2014 16:57:09 +0000 (20:57 +0400)

tree-diff: allow diff_tree_sha1 to accept NULL sha1

which would mean that corresponding tree - old or new - is empty.

As followup patches will show, that functionality was already needed in
several places of Git codebase, but there, we were preparing empty
tree_desc objects by hand, with some code duplication.

For handling sha1 = NULL case, let's reuse fill_tree_descriptor() which
returns just empty tree_desc in that case.

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

userdiff: update Ada patternsAdrian Johnson Mon, 3 Feb 2014 11:33:16 +0000 (22:03 +1030)

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>

setup: don't dereference in-tree symlinks for absolute... Martin Erik Werner Tue, 4 Feb 2014 14:25:20 +0000 (15:25 +0100)

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>

setup: add abspath_part_inside_repo() functionMartin Erik Werner Tue, 4 Feb 2014 14:25:19 +0000 (15:25 +0100)

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>

t0060: add tests for prefix_path when path begins with... Martin Erik Werner Tue, 4 Feb 2014 14:25:18 +0000 (15:25 +0100)

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>

t0060: add test for prefix_path when path == work treeMartin Erik Werner Tue, 4 Feb 2014 14:25:17 +0000 (15:25 +0100)

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>

t0060: add test for prefix_path on symlinks via absolut... Martin Erik Werner Tue, 4 Feb 2014 14:25:16 +0000 (15:25 +0100)

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>

t3004: add test for ls-files on symlinks via absolute... Junio C Hamano Tue, 4 Feb 2014 14:25:15 +0000 (15:25 +0100)

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>

t7101, t7014: rename test files to indicate what that... Nguyễn Thái Ngọc Duy Tue, 4 Feb 2014 02:20:08 +0000 (09:20 +0700)

t7101, t7014: rename test files to indicate what that file is for

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-tag.txt: <commit> for --contains is optionalNguyễn Thái Ngọc Duy Tue, 4 Feb 2014 02:56:26 +0000 (09:56 +0700)

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>

rebase: don't try to match -M optionNicolas Vigier Sat, 1 Feb 2014 02:18:03 +0000 (02:18 +0000)

rebase: don't try to match -M option

The -M option does not exist in OPTIONS_SPEC, so there is no use to try
to find it.

Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: remove useless arguments checkNicolas Vigier Sat, 1 Feb 2014 02:18:02 +0000 (02:18 +0000)

rebase: remove useless arguments check

Remove a check on the number of arguments for --onto and -x options.
It is not possible for $# to be <= 2 at this point :

- if --onto or -x has an argument, git rev-parse --parseopt will
provide something like this :
set -- --onto 'x' --
when parsing the "--onto" option, $# will be 3 or more if there are
other options.

- if --onto or -x doesn't have an argument, git rev-parse --parseopt
will exit with an error and display usage information.

Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

am: add the --gpg-sign optionNicolas Vigier Sat, 1 Feb 2014 02:18:01 +0000 (02:18 +0000)

am: add the --gpg-sign option

Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

am: parse options in stuck-long modeNicolas Vigier Sat, 1 Feb 2014 02:18:00 +0000 (02:18 +0000)

am: parse options in stuck-long mode

There is no functional change. The reason for this change is to be able
to add a new option taking an optional argument.

Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-sh-setup.sh: add variable to use the stuck-long... Nicolas Vigier Sat, 1 Feb 2014 02:17:59 +0000 (02:17 +0000)

git-sh-setup.sh: add variable to use the stuck-long mode

If the variable $OPTIONS_STUCKLONG is not empty, then rev-parse
option parsing is done in --stuck-long mode.

Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: zh_CN.po: translate 1 new message (2211t0f0u)Jiang Xin Sun, 2 Feb 2014 12:46:58 +0000 (20:46 +0800)

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>

Merge branch 'master' of git://github.com/nafmo/git... Jiang Xin Mon, 3 Feb 2014 01:47:27 +0000 (09:47 +0800)

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)

Merge branch 'master' of git://github.com/vnwildman/gitJiang Xin Mon, 3 Feb 2014 01:45:14 +0000 (09:45 +0800)

Merge branch 'master' of git://github.com/vnwildman/git

* 'master' of git://github.com/vnwildman/git:
l10n: vi.po (2211t): Updated one new string

l10n: vi.po (2211t): Updated one new stringTran Ngoc Quan Mon, 3 Feb 2014 00:49:47 +0000 (07:49 +0700)

l10n: vi.po (2211t): Updated one new string

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>

l10n: Update Swedish translation (2211t0f0u)Peter Krefting Sun, 2 Feb 2014 16:22:21 +0000 (17:22 +0100)

l10n: Update Swedish translation (2211t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>

l10n: fr: 1.9rc2 2211tJean-Noel Avila Sun, 2 Feb 2014 13:36:32 +0000 (14:36 +0100)

l10n: fr: 1.9rc2 2211t

Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>

l10n: git.pot: v1.9 round 2 (1 new)Jiang Xin Sat, 1 Feb 2014 00:07:02 +0000 (08:07 +0800)

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>

Git 1.9-rc2 v1.9-rc2Junio C Hamano Fri, 31 Jan 2014 22:16:06 +0000 (14:16 -0800)

Git 1.9-rc2

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

Merge git://github.com/git-l10n/git-poJunio C Hamano Fri, 31 Jan 2014 18:52:29 +0000 (10:52 -0800)

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)

Merge branch 'jn/pager-lv-default-env'Junio C Hamano Fri, 31 Jan 2014 18:51:57 +0000 (10:51 -0800)

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

builtin/gc.c: reduce scope of variablesElia Pinto Wed, 29 Jan 2014 16:59:37 +0000 (08:59 -0800)

builtin/gc.c: reduce scope of variables

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin/fetch.c: reduce scope of variableElia Pinto Wed, 29 Jan 2014 16:54:16 +0000 (08:54 -0800)

builtin/fetch.c: reduce scope of variable

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin/commit.c: reduce scope of variablesElia Pinto Thu, 30 Jan 2014 15:15:56 +0000 (07:15 -0800)

builtin/commit.c: reduce scope of variables

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin/clean.c: reduce scope of variableElia Pinto Wed, 29 Jan 2014 13:36:15 +0000 (05:36 -0800)

builtin/clean.c: reduce scope of variable

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin/blame.c: reduce scope of variablesElia Pinto Wed, 29 Jan 2014 13:33:15 +0000 (05:33 -0800)

builtin/blame.c: reduce scope of variables

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin/apply.c: reduce scope of variablesElia Pinto Wed, 29 Jan 2014 13:30:27 +0000 (05:30 -0800)

builtin/apply.c: reduce scope of variables

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bisect.c: reduce scope of variableElia Pinto Wed, 29 Jan 2014 13:25:00 +0000 (05:25 -0800)

bisect.c: reduce scope of variable

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-compat-util.h: #undef (v)snprintf before #define... Benoit Sigoure Fri, 31 Jan 2014 06:25:12 +0000 (22:25 -0800)

git-compat-util.h: #undef (v)snprintf before #define them

When we detect that vsnprintf / snprintf are broken, we #define them
to an alternative implementation. On OS X, stdio.h already
re-define them in `git-compat-util.h'.

Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pager test: make fake pager consume all its inputJonathan Nieder Thu, 30 Jan 2014 16:42:32 +0000 (08:42 -0800)

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>

l10n: Bulgarian translation of git (222t21f1967u)Alexander Shopov Mon, 20 Jan 2014 19:39:30 +0000 (21:39 +0200)

l10n: Bulgarian translation of git (222t21f1967u)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>

rev-parse: check i before using argv[i] against argcDavid Sharp Tue, 28 Jan 2014 21:21:00 +0000 (13:21 -0800)

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>

handle_path_include: don't look at NULL valueJeff King Tue, 28 Jan 2014 01:37:30 +0000 (20:37 -0500)

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>

expand_user_path: do not look at NULL pathJeff King Tue, 28 Jan 2014 01:36:12 +0000 (20:36 -0500)

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>

po/TEAMS: Added Bulgarian teamAlexander Shopov Tue, 28 Jan 2014 17:14:08 +0000 (19:14 +0200)

po/TEAMS: Added Bulgarian team

Signed-off-by: Alexander Shopov <ash@kambanaria.org>

cherry-pick, revert: add the --gpg-sign optionNicolas Vigier Fri, 24 Jan 2014 00:50:58 +0000 (00:50 +0000)

cherry-pick, revert: add the --gpg-sign option

Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.9-rc1 v1.9-rc1Junio C Hamano Mon, 27 Jan 2014 19:01:35 +0000 (11:01 -0800)

Git 1.9-rc1

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

Merge branch 'as/tree-walk-fix-aggressive-short-cut'Junio C Hamano Mon, 27 Jan 2014 18:48:32 +0000 (10:48 -0800)

Merge branch 'as/tree-walk-fix-aggressive-short-cut'

* as/tree-walk-fix-aggressive-short-cut:
tree_entry_interesting: match against all pathspecs

Merge branch 'ta/doc-http-protocol-in-html'Junio C Hamano Mon, 27 Jan 2014 18:45:59 +0000 (10:45 -0800)

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

Merge branch 'mh/doc-wo-names'Junio C Hamano Mon, 27 Jan 2014 18:45:56 +0000 (10:45 -0800)

Merge branch 'mh/doc-wo-names'

* mh/doc-wo-names:
doc: remote author/documentation sections from more pages

Merge branch 'jk/revision-o-is-in-libgit-a'Junio C Hamano Mon, 27 Jan 2014 18:45:52 +0000 (10:45 -0800)

Merge branch 'jk/revision-o-is-in-libgit-a'

* jk/revision-o-is-in-libgit-a:
Makefile: remove redundant object in git-http{fetch,push}

Merge branch 'sb/repack-in-c'Junio C Hamano Mon, 27 Jan 2014 18:45:49 +0000 (10:45 -0800)

Merge branch 'sb/repack-in-c'

"git repack --max-pack-size=8g" stopped being parsed correctly when
the command was reimplemented in C.

* sb/repack-in-c:
repack: propagate pack-objects options as strings
repack: make parsed string options const-correct
repack: fix typo in max-pack-size option

Merge branch 'jk/test-fixes'Junio C Hamano Mon, 27 Jan 2014 18:45:46 +0000 (10:45 -0800)

Merge branch 'jk/test-fixes'

* jk/test-fixes:
t7700: do not use "touch" unnecessarily
t7501: fix "empty commit" test with NO_PERL

Merge branch 'nd/negative-pathspec'Junio C Hamano Mon, 27 Jan 2014 18:45:43 +0000 (10:45 -0800)

Merge branch 'nd/negative-pathspec'

* nd/negative-pathspec:
tree-walk.c: ignore trailing slash on submodule in tree_entry_interesting()

Merge branch 'pw/git-p4'Junio C Hamano Mon, 27 Jan 2014 18:45:41 +0000 (10:45 -0800)

Merge branch 'pw/git-p4'

Various "git p4" updates.

* pw/git-p4:
git p4 doc: use two-line style for options with multiple spellings
git p4 test: examine behavior with locked (+l) files
git p4: fix an error message when "p4 where" fails
git p4: handle files with wildcards when doing RCS scrubbing
git p4 test: do not pollute /tmp
git p4 test: run as user "author"
git p4 test: is_cli_file_writeable succeeds
git p4 test: explicitly check p4 wildcard delete
git p4: work around p4 bug that causes empty symlinks
git p4 test: ensure p4 symlink parsing works
git p4 test: wildcards are supported

Merge branch 'ss/safe-create-leading-dir-with-slash'Junio C Hamano Mon, 27 Jan 2014 18:45:37 +0000 (10:45 -0800)

Merge branch 'ss/safe-create-leading-dir-with-slash'

"git clone $origin foo\bar\baz" on Windows failed to create the
leading directories (i.e. a moral-equivalent of "mkdir -p").

* ss/safe-create-leading-dir-with-slash:
safe_create_leading_directories(): on Windows, \ can separate path components

Merge branch 'mh/safe-create-leading-directories'Junio C Hamano Mon, 27 Jan 2014 18:45:33 +0000 (10:45 -0800)

Merge branch 'mh/safe-create-leading-directories'

Code clean-up and protection against concurrent write access to the
ref namespace.

* mh/safe-create-leading-directories:
rename_tmp_log(): on SCLD_VANISHED, retry
rename_tmp_log(): limit the number of remote_empty_directories() attempts
rename_tmp_log(): handle a possible mkdir/rmdir race
rename_ref(): extract function rename_tmp_log()
remove_dir_recurse(): handle disappearing files and directories
remove_dir_recurse(): tighten condition for removing unreadable dir
lock_ref_sha1_basic(): if locking fails with ENOENT, retry
lock_ref_sha1_basic(): on SCLD_VANISHED, retry
safe_create_leading_directories(): add new error value SCLD_VANISHED
cmd_init_db(): when creating directories, handle errors conservatively
safe_create_leading_directories(): introduce enum for return values
safe_create_leading_directories(): always restore slash at end of loop
safe_create_leading_directories(): split on first of multiple slashes
safe_create_leading_directories(): rename local variable
safe_create_leading_directories(): add explicit "slash" pointer
safe_create_leading_directories(): reduce scope of local variable
safe_create_leading_directories(): fix format of "if" chaining

Merge branch 'tr/nth-previous-is-a-commit'Junio C Hamano Mon, 27 Jan 2014 18:45:30 +0000 (10:45 -0800)

Merge branch 'tr/nth-previous-is-a-commit'

* tr/nth-previous-is-a-commit:
Documentation: @{-N} can refer to a commit

Merge branch 'tr/gitk-doc-range-trace'Junio C Hamano Mon, 27 Jan 2014 18:45:23 +0000 (10:45 -0800)

Merge branch 'tr/gitk-doc-range-trace'

* tr/gitk-doc-range-trace:
Documentation/gitk: document -L option

Merge branch 'jk/mark-edges-uninteresting'Junio C Hamano Mon, 27 Jan 2014 18:45:08 +0000 (10:45 -0800)

Merge branch 'jk/mark-edges-uninteresting'

Fix performance regression in v1.8.4.x and later.

* jk/mark-edges-uninteresting:
list-objects: only look at cmdline trees with edge_hint
t/perf: time rev-list with UNINTERESTING commits

Merge branch 'jk/diff-filespec-cleanup'Junio C Hamano Mon, 27 Jan 2014 18:45:02 +0000 (10:45 -0800)

Merge branch 'jk/diff-filespec-cleanup'

* jk/diff-filespec-cleanup:
diff_filespec: use only 2 bits for is_binary flag
diff_filespec: reorder is_binary field
diff_filespec: drop xfrm_flags field
diff_filespec: drop funcname_pattern_ident field
diff_filespec: reorder dirty_submodule macro definitions

Merge branch 'ef/mingw-write'Junio C Hamano Mon, 27 Jan 2014 18:44:59 +0000 (10:44 -0800)

Merge branch 'ef/mingw-write'

* ef/mingw-write:
mingw: remove mingw_write
prefer xwrite instead of write

Merge branch 'rk/send-email-ssl-cert'Junio C Hamano Mon, 27 Jan 2014 18:44:34 +0000 (10:44 -0800)

Merge branch 'rk/send-email-ssl-cert'

The "if /etc/ssl/certs/ directory exists, explicitly telling the
library to use it as SSL_ca_path" blind-defaulting in "git
send-email" broke platforms where /etc/ssl/certs/ directory exists,
but it cannot used as SSL_ca_path (e.g. Fedora rawhide). Fix it by
not specifying any SSL_ca_path/SSL_ca_file but still asking for peer
verification in such a case.

* rk/send-email-ssl-cert:
send-email: /etc/ssl/certs/ directory may not be usable as ca_path

Merge branch 'jn/ignore-doc'Junio C Hamano Mon, 27 Jan 2014 18:44:26 +0000 (10:44 -0800)

Merge branch 'jn/ignore-doc'

Explicitly list $HOME/.config/git/ignore as one of the places you
can use to keep ignore patterns that depend on your personal choice
of tools, e.g. *~ for Emacs users.

* jn/ignore-doc:
gitignore doc: add global gitignore to synopsis

Merge branch 'jk/interpret-branch-name-fix'Junio C Hamano Mon, 27 Jan 2014 18:44:20 +0000 (10:44 -0800)

Merge branch 'jk/interpret-branch-name-fix'

Fix a handful of bugs around interpreting $branch@{upstream}
notation and its lookalike, when $branch part has interesting
characters, e.g. "@", and ":".

* jk/interpret-branch-name-fix:
interpret_branch_name: find all possible @-marks
interpret_branch_name: avoid @{upstream} past colon
interpret_branch_name: always respect "namelen" parameter
interpret_branch_name: rename "cp" variable to "at"
interpret_branch_name: factor out upstream handling

Merge branch 'jk/allow-fetch-onelevel-refname'Junio C Hamano Mon, 27 Jan 2014 18:44:13 +0000 (10:44 -0800)

Merge branch 'jk/allow-fetch-onelevel-refname'

"git clone" would fail to clone from a repository that has a ref
directly under "refs/", e.g. "refs/stash", because different
validation paths do different things on such a refname. Loosen the
client side's validation to allow such a ref.

* jk/allow-fetch-onelevel-refname:
fetch-pack: do not filter out one-level refs