Junio C Hamano [Sat, 2 Apr 2011 00:57:16 +0000 (17:57 -0700)]
Merge branch 'jc/merge-sans-branch'
* jc/merge-sans-branch:
merge: merge with the default upstream branch without argument
merge: match the help text with the documentation
Conflicts:
builtin/merge.c
Junio C Hamano [Sat, 2 Apr 2011 00:56:27 +0000 (17:56 -0700)]
Merge branch 'jr/grep-en-config'
* jr/grep-en-config:
grep: allow -E and -n to be turned on by default via configuration
Junio C Hamano [Sat, 2 Apr 2011 00:55:55 +0000 (17:55 -0700)]
Merge branch 'ab/i18n-st'
* ab/i18n-st: (69 commits)
i18n: git-shortlog basic messages
i18n: git-revert split up "could not revert/apply" message
i18n: git-revert literal "me" messages
i18n: git-revert "Your local changes" message
i18n: git-revert basic messages
i18n: git-notes GIT_NOTES_REWRITE_MODE error message
i18n: git-notes basic commands
i18n: git-gc "Auto packing the repository" message
i18n: git-gc basic messages
i18n: git-describe basic messages
i18n: git-clean clean.requireForce messages
i18n: git-clean basic messages
i18n: git-bundle basic messages
i18n: git-archive basic messages
i18n: git-status "renamed: " message
i18n: git-status "Initial commit" message
i18n: git-status "Changes to be committed" message
i18n: git-status shortstatus messages
i18n: git-status "nothing to commit" messages
i18n: git-status basic messages
...
Conflicts:
builtin/branch.c
builtin/checkout.c
builtin/clone.c
builtin/commit.c
builtin/grep.c
builtin/merge.c
builtin/push.c
builtin/revert.c
t/t3507-cherry-pick-conflict.sh
t/t7607-merge-overwrite.sh
Junio C Hamano [Sat, 2 Apr 2011 00:50:54 +0000 (17:50 -0700)]
Merge branch 'jk/pull-into-empty'
* jk/pull-into-empty:
pull: do not clobber untracked files on initial pull
merge: merge unborn index before setting ref
Junio C Hamano [Sat, 2 Apr 2011 00:50:20 +0000 (17:50 -0700)]
Merge branch 'sb/sparse-more'
* sb/sparse-more:
Makefile: Cover more files with make check
Junio C Hamano [Sat, 2 Apr 2011 00:45:59 +0000 (17:45 -0700)]
Merge branch 'maint'
* maint:
docs: fix filter-branch subdir example for exotic repo names
Junio C Hamano [Fri, 1 Apr 2011 23:23:55 +0000 (16:23 -0700)]
Merge branch 'nd/index-doc' into maint
* nd/index-doc:
doc: technical details about the index file format
doc: technical details about the index file format
Junio C Hamano [Fri, 1 Apr 2011 23:23:43 +0000 (16:23 -0700)]
Merge branch 'pk/stash-apply-status-relative' into maint
* pk/stash-apply-status-relative:
Add test: git stash shows status relative to current dir
git stash: show status relative to current directory
Junio C Hamano [Fri, 1 Apr 2011 23:23:34 +0000 (16:23 -0700)]
Merge branch 'jc/maint-diff-q-filter' into maint
* jc/maint-diff-q-filter:
diff --quiet: disable optimization when --diff-filter=X is used
Junio C Hamano [Fri, 1 Apr 2011 23:23:21 +0000 (16:23 -0700)]
Merge branch 'js/maint-stash-index-copy' into maint
* js/maint-stash-index-copy:
stash: copy the index using --index-output instead of cp -p
stash: fix incorrect quoting in cleanup of temporary files
Junio C Hamano [Fri, 1 Apr 2011 23:23:15 +0000 (16:23 -0700)]
Merge branch 'mg/doc-bisect-tweak-worktree' into maint
* mg/doc-bisect-tweak-worktree:
git-bisect.txt: example for bisecting with hot-fix
git-bisect.txt: streamline run presentation
Junio C Hamano [Fri, 1 Apr 2011 23:20:45 +0000 (16:20 -0700)]
Merge branch 'jh/maint-do-not-track-non-branches' into maint
* jh/maint-do-not-track-non-branches:
branch/checkout --track: Ensure that upstream branch is indeed a branch
Junio C Hamano [Fri, 1 Apr 2011 23:20:24 +0000 (16:20 -0700)]
Merge branch 'fk/maint-cvsimport-early-failure' into maint
* fk/maint-cvsimport-early-failure:
git-cvsimport.perl: Bail out right away when reading from the server fails
Junio C Hamano [Fri, 1 Apr 2011 23:20:19 +0000 (16:20 -0700)]
Merge branch 'jc/maint-apply-report-offset' into maint
* jc/maint-apply-report-offset:
apply -v: show offset count when patch did not apply exactly
Junio C Hamano [Fri, 1 Apr 2011 23:20:11 +0000 (16:20 -0700)]
Merge branch 'jc/maint-apply-no-double-patch' into maint
* jc/maint-apply-no-double-patch:
apply: do not patch lines that were already patched
Junio C Hamano [Fri, 1 Apr 2011 23:19:03 +0000 (16:19 -0700)]
Merge branch 'js/checkout-untracked-symlink' into maint
* js/checkout-untracked-symlink:
do not overwrite untracked symlinks
Demonstrate breakage: checkout overwrites untracked symlink with directory
Junio C Hamano [Fri, 1 Apr 2011 23:16:23 +0000 (16:16 -0700)]
Merge "checkout ambiguous ref bugfix" into maint
* commit '
0cb6ad3':
checkout: fix bug with ambiguous refs
Jeff King [Fri, 1 Apr 2011 14:46:27 +0000 (10:46 -0400)]
docs: fix filter-branch subdir example for exotic repo names
The GIT_INDEX_FILE variable we get from git has the full
path to the repo, which may contain spaces. When we use it
in our shell snippet, it needs to be quoted.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 31 Mar 2011 20:58:16 +0000 (13:58 -0700)]
Git 1.7.5-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 31 Mar 2011 02:33:53 +0000 (19:33 -0700)]
Merge branch 'maint'
* maint:
parse-remote: typofix
Junio C Hamano [Thu, 31 Mar 2011 02:33:33 +0000 (19:33 -0700)]
parse-remote: typofix
An earlier patch had a trivial typo that two people did not notice.
Pointed out by Michael Schubert.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 30 Mar 2011 21:10:41 +0000 (14:10 -0700)]
Merge branch 'maint'
* maint:
contrib/thunderbird-patch-inline: do not require bash to run the script
t8001: check the exit status of the command being tested
strbuf.h: remove a tad stale docs-in-comment and reference api-doc instead
Typos: t/README
Documentation/config.txt: make truth value of numbers more explicit
git-pack-objects.txt: fix grammatical errors
parse-remote: replace unnecessary sed invocation
Joe Ratterman [Wed, 30 Mar 2011 19:31:05 +0000 (14:31 -0500)]
grep: allow -E and -n to be turned on by default via configuration
Add two configration variables grep.extendedRegexp and grep.lineNumbers to
allow the user to skip typing -E and -n on the command line, respectively.
Scripts that are meant to be used by random users and/or in random
repositories now have use -G and/or --no-line-number options as
appropriately to override the settings in the repository or user's
~/.gitconfig settings. Just because the script didn't say "git grep -n" no
longer guarantees that the output from the command will not have line
numbers.
Signed-off-by: Joe Ratterman <jratt0@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Maxin john [Wed, 30 Mar 2011 08:52:23 +0000 (09:52 +0100)]
contrib/thunderbird-patch-inline: do not require bash to run the script
The script does not have to be run under bash, but any POSIX compliant
shell would do, as it does not use any bash-isms.
It may be written under a different style than what is recommended in
Documentation/CodingGuidelines, but that is a different matter.
While at it, fix obvious typos in the comment.
Signed-off-by: Maxin B. John <maxin@maxinbjohn.info>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 30 Mar 2011 19:22:05 +0000 (12:22 -0700)]
t8001: check the exit status of the command being tested
Avoid running the command being tested as an upstream of a pipe;
doing so will lose its exit status.
While at it, modernise the style of the script.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Witten [Tue, 15 Feb 2011 23:12:04 +0000 (23:12 +0000)]
strbuf.h: remove a tad stale docs-in-comment and reference api-doc instead
Signed-off-by: Michael Witten <mfwitten@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Witten [Tue, 22 Feb 2011 17:15:00 +0000 (17:15 +0000)]
Typos: t/README
Signed-off-by: Michael Witten <mfwitten@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Carlos Martín Nieto [Wed, 30 Mar 2011 10:22:32 +0000 (12:22 +0200)]
Documentation/config.txt: make truth value of numbers more explicit
Change the order to 1/0 to have the same true/false order as the rest
of the possibilities for a boolean variable in order not not confuse
users.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stephen Boyd [Wed, 30 Mar 2011 09:00:06 +0000 (02:00 -0700)]
git-pack-objects.txt: fix grammatical errors
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stephen Boyd [Wed, 30 Mar 2011 08:48:40 +0000 (01:48 -0700)]
parse-remote: replace unnecessary sed invocation
Just use parameter expansion instead.
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 30 Mar 2011 17:49:13 +0000 (10:49 -0700)]
Merge branch 'svn-fe' of git://repo.or.cz/git/jrn
* 'svn-fe' of git://repo.or.cz/git/jrn:
tests: kill backgrounded processes more robustly
vcs-svn: a void function shouldn't try to return something
tests: make sure input to sed is newline terminated
vcs-svn: add missing cast to printf argument
Jeff King [Wed, 30 Mar 2011 03:30:17 +0000 (23:30 -0400)]
tests: kill backgrounded processes more robustly
t0081 creates several background processes that write to a fifo and
then go to sleep for a while (so the reader of the fifo does not see
EOF).
Each background process is made in a curly-braced block in the shell,
and after we are done reading from the fifo, we use "kill $!" to kill
it off.
For a simple, single-command process, this works reliably and kills
the child sleep process. But for more complex commands like
"make_some_output && sleep", the results are less predictable. When
executing under bash, we end up with a subshell that gets killed by
the $! but leaves the sleep process still alive.
This is bad not only for process hygeine (we are leaving random sleep
processes to expire after a while), but also interacts badly with the
"prove" command. When prove executes a test, it does not realize the
test is done when it sees SIGCHLD, but rather waits until the test's
stdout pipe is closed. The orphaned sleep process may keep that pipe
open via test-lib's file descriptor 5, causing prove to hang for 100
seconds.
The solution is to explicitly use a subshell and to exec the final
sleep process, so that when we "kill $!" we get the process id of the
sleep process.
[jn: original patch by Jeff had some additional bits:
1. Wrap the "kill" in a test_when_finished, since we want
to clean up the process whether the test succeeds or not.
2. The "kill" is part of our && chain for test success. It
probably won't fail, but it can if the process has
expired before we manage to kill it. So let's mark it
as OK to fail.
I'm postponing that for now.]
Reported-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Junio C Hamano [Tue, 29 Mar 2011 21:09:15 +0000 (14:09 -0700)]
Merge branch 'maint'
* maint:
HOME must be set before calling git-init when creating test repositories
Junio C Hamano [Tue, 29 Mar 2011 21:09:08 +0000 (14:09 -0700)]
Merge branch 'jc/fetch-progressive-stride'
* jc/fetch-progressive-stride:
Fix potential local deadlock during fetch-pack
Junio C Hamano [Tue, 29 Mar 2011 21:09:02 +0000 (14:09 -0700)]
Merge branches 'sp/maint-fetch-pack-stop-early' and 'sp/maint-upload-pack-stop-early'
* sp/maint-fetch-pack-stop-early:
enable "no-done" extension only when fetching over smart-http
* sp/maint-upload-pack-stop-early:
enable "no-done" extension only when serving over smart-http
Michael Witten [Tue, 29 Mar 2011 17:31:30 +0000 (17:31 +0000)]
vcs-svn: a void function shouldn't try to return something
As v1.7.4-rc0~184 (2010-10-04) and C99 §6.8.6.4.1 remind us, standard
C does not permit returning an expression of type void, even for a
tail call.
Noticed with gcc -pedantic:
vcs-svn/svndump.c: In function 'handle_node':
vcs-svn/svndump.c:213:3: warning: ISO C forbids 'return' with expression,
in function returning void [-pedantic]
[jn: with simplified log message]
Signed-off-by: Michael Witten <mfwitten@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Junio C Hamano [Tue, 29 Mar 2011 19:29:10 +0000 (12:29 -0700)]
Revert two "no-done" reverts
Last night I had to make these two emergency reverts, but now we have a
better understanding of which part of the topic was broken, let's get rid
of the revert to fix it correctly.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 29 Mar 2011 17:24:59 +0000 (10:24 -0700)]
enable "no-done" extension only when serving over smart-http
Do not advertise no-done capability when upload-pack is not serving over
smart-http, as there is no way for this server to know when it should stop
reading in-flight data from the client, even though it is necessary to
drain all the in-flight data in order to unblock the client.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Junio C Hamano [Tue, 29 Mar 2011 17:06:19 +0000 (10:06 -0700)]
Fix potential local deadlock during fetch-pack
The fetch-pack/upload-pack protocol relies on the underlying transport
(local pipe or TCP socket) to have enough slack to allow one window worth
of data in flight without blocking the writer. Traditionally we always
relied on being able to have two windows of 32 "have"s in flight (roughly
3k bytes) to stream.
The recent "progressive-stride" change allows "fetch-pack" to send up to
1024 "have"s without reading any response from "upload-pack". The
outgoing pipe of "upload-pack" can be clogged with many ACK and NAK that
are unread, while "fetch-pack" is still stuffing its outgoing pipe with
more "have"s, leading to a deadlock.
Revert the change unless we are in stateless rpc (aka smart-http) mode, as
using a large window full of "have"s is still a good way to help reduce
the number of back-and-forth, and there is no buffering issue there (it is
strictly "ping-pong" without an overlap).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 29 Mar 2011 17:16:29 +0000 (10:16 -0700)]
enable "no-done" extension only when fetching over smart-http
When 'no-done' protocol extension is used, the upload-pack (i.e. the
server side) process stops listening to the fetch-pack after issuing the
final NAK, and starts sending the generated pack data back, but there may
be more "have" send by the latter in flight that the fetch-pack is
expecting to be responded with ACK/NAK. This will typically result in a
deadlock (both will block on write that the other end never reads) or
SIGPIPE on the fetch-pack end (upload-pack will finish writing a small
pack and goes away).
Disable it unless fetch-pack is running under smart-http, where there is
no such streaming issue.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Alex Riesen [Sat, 26 Mar 2011 18:46:34 +0000 (19:46 +0100)]
HOME must be set before calling git-init when creating test repositories
Otherwise the created test repositories will be affected by users ~/.gitconfig.
For example, setting core.logAllrefupdates in users config will make all
calls to "git config --unset core.logAllrefupdates" fail which will break
the first test which uses the statement and expects it to succeed.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Nieder [Tue, 29 Mar 2011 03:08:20 +0000 (22:08 -0500)]
tests: make sure input to sed is newline terminated
POSIX only requires sed to work on text files and because it does
not end with a newline, this commit's content is not a text file.
Add a newline to fix it. Without this change, OS X sed helpfully
adds a newline to actual.message, causing t9010.13 to fail.
Reported-by: Torsten Bögershausen <tboegi@web.de>
Tested-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Junio C Hamano [Tue, 29 Mar 2011 06:35:39 +0000 (23:35 -0700)]
Revert "fetch-pack: Implement no-done capability"
This reverts commit
761ecf0bc7b6cddf311f00877c59e6381cdbdeea.
Junio C Hamano [Tue, 29 Mar 2011 06:33:51 +0000 (23:33 -0700)]
Revert "upload-pack: Implement no-done capability"
This reverts
3e63b21 (upload-pack: Implement no-done capability,
2011-03-14). Together with
761ecf0 (fetch-pack: Implement no-done
capability, 2011-03-14) it seems to make the fetch-pack process out of
sync and makes it keep talking long after upload-pack stopped listening to
it, terminating the process with SIGPIPE.
Junio C Hamano [Mon, 28 Mar 2011 21:17:17 +0000 (14:17 -0700)]
Merge branch 'maint'
* maint:
git tag documentation grammar fixes and readability updates
grep: Add the option '--line-number'
Michael Witten [Mon, 28 Mar 2011 15:11:49 +0000 (15:11 +0000)]
git tag documentation grammar fixes and readability updates
... with help from Eric Raible.
In addition, describe the use of GIT_COMMITTER_DATE more comprehensively
by including "date-formats.txt"
Signed-off-by: Michael Witten <mfwitten@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jens Lehmann [Mon, 28 Mar 2011 19:16:09 +0000 (21:16 +0200)]
tests: fix overeager scrubbing of environment variables
In commit
95a1d12e9b9f ("tests: scrub environment of GIT_* variables") all
environment variables starting with "GIT_" were unset for the tests using
a perl script rather than unsetting them one by one. Only three exceptions
were made to make them work as before: "GIT_TRACE*", "GIT_DEBUG*" and
"GIT_USE_LOOKUP".
Unfortunately some environment variables used by the test framework itself
were not added to the exceptions and thus stopped working when given
before the make command instead of after it. Those are:
- GIT_NOTES_TIMING_TESTS
- GIT_PATCHID_TIMING_TESTS
- GIT_PROVE_OPTS
- GIT_REMOTE_SVN_TEST_BIG_FILES
- GIT_SKIP_TESTS
- GIT_TEST*
- GIT_VALGRIND_OPTIONS
I noticed that when skipping a test the way I was used to suddenly failed:
GIT_SKIP_TESTS='t1234' GIT_TEST_OPTS='--root=/dev/shm' make -j10 test
This should work according to t/README, but didn't anymore, so let's fix
that by adding them to the exception list. And to avoid having a long
regexp put the exceptions in a separate variable using nicer formatting.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Thanks-to: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Joe Ratterman [Mon, 28 Mar 2011 18:11:55 +0000 (13:11 -0500)]
grep: Add the option '--line-number'
This is a synonym for the existing '-n' option, matching GNU grep.
Signed-off-by: Joe Ratterman <jratt0@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Giuseppe Bilotta [Mon, 28 Mar 2011 07:39:59 +0000 (09:39 +0200)]
Improve test for pthreads flag
When compiling with CC=clang using Clang 1.1 as shipped by Debian
unstable (package version 2.7-3), the -mt flag is sufficient to compile
during the `configure` test. However, building git would then fail at
link time complaining about missing symbols such as `pthread_key_create'
and `pthread_create'.
Work around this issue by adding pthread key creation to the pthreads
configure test source.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Nieder [Mon, 28 Mar 2011 00:38:15 +0000 (19:38 -0500)]
vcs-svn: add missing cast to printf argument
gcc -m32 correctly warns:
vcs-svn/fast_export.c: In function 'fast_export_commit':
vcs-svn/fast_export.c:54:2: warning: format '%llu' expects
argument of type 'long long unsigned int', but argument 2
has type 'unsigned int' [-Wformat]
Fix it.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Nieder [Sun, 27 Mar 2011 17:19:14 +0000 (12:19 -0500)]
vcs-svn: add missing cast to printf argument
gcc -m32 correctly warns:
vcs-svn/fast_export.c: In function 'fast_export_commit':
vcs-svn/fast_export.c:54:2: warning: format '%llu' expects
argument of type 'long long unsigned int', but argument 2
has type 'unsigned int' [-Wformat]
Fix it.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Junio C Hamano [Sun, 27 Mar 2011 03:17:15 +0000 (20:17 -0700)]
Update draft release note to 1.7.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sun, 27 Mar 2011 03:13:17 +0000 (20:13 -0700)]
Merge branch 'mg/rev-list-n-parents'
* mg/rev-list-n-parents:
tests: avoid nonportable {foo,bar} glob
rev-list --min-parents,--max-parents: doc, test and completion
revision.c: introduce --min-parents and --max-parents options
t6009: use test_commit() from test-lib.sh
Junio C Hamano [Sun, 27 Mar 2011 03:13:17 +0000 (20:13 -0700)]
Merge branch 'js/remove-unused-variables'
* js/remove-unused-variables:
Remove unused variables
Junio C Hamano [Sun, 27 Mar 2011 03:13:17 +0000 (20:13 -0700)]
Merge branch 'jp/completion-help-alias'
* jp/completion-help-alias:
git-completion: Add git help completion for aliases
Junio C Hamano [Sun, 27 Mar 2011 03:13:16 +0000 (20:13 -0700)]
Merge branch 'jc/index-update-if-able'
* jc/index-update-if-able:
update $GIT_INDEX_FILE when there are racily clean entries
diff/status: refactor opportunistic index update
Junio C Hamano [Sun, 27 Mar 2011 03:13:16 +0000 (20:13 -0700)]
Merge branch 'jk/checkout-orphan-warning'
* jk/checkout-orphan-warning:
checkout: tweak detached-orphan warning format
checkout: clear commit marks after detached-orphan check
checkout: add basic tests for detached-orphan warning
Junio C Hamano [Sun, 27 Mar 2011 03:13:16 +0000 (20:13 -0700)]
Merge branch 'jc/maint-rerere-in-workdir'
* jc/maint-rerere-in-workdir:
rerere: make sure it works even in a workdir attached to a young repository
Junio C Hamano [Sun, 27 Mar 2011 03:13:15 +0000 (20:13 -0700)]
Merge branch 'nd/index-doc'
* nd/index-doc:
doc: technical details about the index file format
doc: technical details about the index file format
Junio C Hamano [Sun, 27 Mar 2011 03:13:15 +0000 (20:13 -0700)]
Merge branch 'jc/fetch-progressive-stride'
* jc/fetch-progressive-stride:
fetch-pack: use smaller handshake window for initial request
fetch-pack: progressively use larger handshake windows
fetch-pack: factor out hardcoded handshake window size
Conflicts:
builtin/fetch-pack.c
Junio C Hamano [Sat, 26 Mar 2011 18:35:41 +0000 (11:35 -0700)]
Merge branch 'svn-fe' of git://repo.or.cz/git/jrn
* 'svn-fe' of git://repo.or.cz/git/jrn:
vcs-svn: handle log message with embedded NUL
vcs-svn: avoid unnecessary copying of log message and author
vcs-svn: remove buffer_read_string
vcs-svn: make reading of properties binary-safe
Junio C Hamano [Sat, 26 Mar 2011 17:42:26 +0000 (10:42 -0700)]
Merge git-gui 0.14.0
Jonathan Nieder [Sat, 26 Mar 2011 05:49:37 +0000 (00:49 -0500)]
vcs-svn: handle log message with embedded NUL
Pass the log message by strbuf instead of as a C-style string and use
fwrite instead of printf to write it to fast-import so embedded '\0'
bytes can be preserved.
Currently "git log" doesn't show the embedded NULs but "git cat-file
commit" can.
While at it, stop including system headers from repo_tree.h. git
source files need to include git-compat-util.h (or cache.h or
builtin.h) sooner to ensure the appropriate feature test macros are
defined.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Jonathan Nieder [Fri, 25 Mar 2011 04:10:00 +0000 (23:10 -0500)]
vcs-svn: avoid unnecessary copying of log message and author
Use strbuf_swap when storing the svn:log and svn:author properties, so
pointers to rather than the contents of buffers get copied. The main
effect should be to make the code a little easier to read.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Jonathan Nieder [Fri, 25 Mar 2011 04:09:19 +0000 (23:09 -0500)]
vcs-svn: remove buffer_read_string
All previous users of buffer_read_string have already been converted
to use the more intuitive buffer_read_binary, so remove the old API to
avoid some confusion.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Jonathan Nieder [Sat, 26 Mar 2011 05:15:10 +0000 (00:15 -0500)]
vcs-svn: make reading of properties binary-safe
svn-fe errors out on revision 59151 of the ASF repository:
fatal: invalid dump: unexpected end of file
The proximate cause is a property with an embedded NUL character.
Previously such anomalies were ignored but commit
c9d1c8ba
(2010-12-28) introduced a check strlen(val) == len to avoid reading
uninitialized data when a property list ends early and unfortunately
this test does not distinguish between "foo" followed by EOF and the
string "foo\0bar\0baz".
Fix it by using buffer_read_binary to read to a strbuf and checking
the actual length read. Most consumers of properties still use
C-style strings, so in practice an author or log message with embedded
NULs will be truncated, but a least this way svn-fe won't error out
(fixing the regression).
Reported-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Junio C Hamano [Sat, 26 Mar 2011 00:57:08 +0000 (17:57 -0700)]
Sync with 1.7.4.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sat, 26 Mar 2011 00:56:14 +0000 (17:56 -0700)]
Git 1.7.4.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Fri, 25 Mar 2011 18:13:31 +0000 (14:13 -0400)]
pull: do not clobber untracked files on initial pull
For a pull into an unborn branch, we do not use "git merge"
at all. Instead, we call read-tree directly. However, we
used the --reset parameter instead of "-m", which turns off
the safety features.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Fri, 25 Mar 2011 18:10:38 +0000 (14:10 -0400)]
merge: merge unborn index before setting ref
When we merge into an unborn branch, there are basically two
steps:
1. Write the sha1 of the new commit into the ref pointed
to by HEAD.
2. Update the index with the new content, and check it out
to the working tree.
We currently do them in this order. However, (2) is the step
that is much more likely to fail, since it can be blocked by
things like untracked working tree files. When it does, the
merge fails and we are left with an empty index but an
updated HEAD.
This patch switches the order, so that a failure in updating
the index leaves us unchanged. Of course, a failure in
updating the ref now leaves us with an updated index and
mis-matched HEAD. That is arguably not much better, but it
is probably less likely to actually happen.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Fri, 25 Mar 2011 18:09:03 +0000 (14:09 -0400)]
t7607: clean up stray untracked file
This file ends up conflicting with the test just after it
(causing the "git merge" to fail). Neither test is to blame
for the bug, though. It looks like the merge in
1a9fe45
(Merge branch 'tr/merge-unborn-clobber', 2011-02-09) is what
caused the conflict.
We didn't notice because the follow-on test is already
marked as expect_failure (even though it has since been
fixed, and now succeeds once the untracked file is moved out
of the way).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Fri, 25 Mar 2011 18:08:36 +0000 (14:08 -0400)]
t7607: mark known breakage in test 11 as fixed
This was fixed by
1d718a51 (do not overwrite untracked
symlinks, 2011-02-20).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jakub Narebski [Fri, 25 Mar 2011 19:20:49 +0000 (20:20 +0100)]
gitweb: Fix handling of fractional timezones in parse_date
Fractional timezones, like -0330 (NST used in Canada) or +0430
(Afghanistan, Iran DST), were not handled properly in parse_date; this
means values such as 'minute_local' and 'iso-tz' were not generated
correctly.
This was caused by two mistakes:
* sign of timezone was applied only to hour part of offset, and not
as it should be also to minutes part (this affected only negative
fractional timezones).
* 'int $h + $m/60' is 'int($h + $m/60)' and not 'int($h) + $m/60',
so fractional part was discarded altogether ($h is hours, $m is
minutes, which is always less than 60).
Note that positive fractional timezones +0430, +0530 and +1030 can be
found as authortime in git.git repository itself.
For example http://repo.or.cz/w/git.git/commit/
88d50e7 had authortime
of "Fri, 8 Jan 2010 18:48:07 +0000 (23:48 +0530)", which is not marked
with 'atnight', when "git show
88d50e7" gives correct author date of
"Sat Jan 9 00:18:07 2010 +0530".
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Pat Thoyts [Fri, 25 Mar 2011 08:26:47 +0000 (08:26 +0000)]
Merge branch 'ss/git-gui-mergetool'
Pat Thoyts [Fri, 18 Feb 2011 13:42:54 +0000 (13:42 +0000)]
git-gui: detect the use of MUI langauge packs on Windows
The Tcl msgcat package doesn't detect the use of a multi-lingual language
pack on Windows 7. This means that a user may have their display language
set to Japanese but the system installed langauge was English.
This patch reads the relevent registry key to fix this before loading in
the locale specific parts of git-gui.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Jonathan Nieder [Thu, 24 Mar 2011 08:21:24 +0000 (03:21 -0500)]
tests: avoid nonportable {foo,bar} glob
Unlike bash and ksh, dash and busybox ash do not support brace
expansion (as in 'echo {hello,world}'). So when dash is sh,
t6009.13 (set up dodecapus) ends up pass a string beginning with
"root{1,2," to "git merge" verbatim and the test fails.
Fix it by introducing a variable to hold the list of parents for
the dodecapus and populating it in a more low-tech way.
While at it, simplify a little by combining this setup code with the
test it sets up for.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 24 Mar 2011 06:48:24 +0000 (23:48 -0700)]
merge: merge with the default upstream branch without argument
"git merge" without specifying any commit is a no-op by default.
A new option merge.defaultupstream can be set to true to cause such an
invocation of the command to merge the upstream branches configured for
the current branch by using their last observed values stored in their
remote tracking branches.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jared Hance [Thu, 10 Feb 2011 23:52:41 +0000 (18:52 -0500)]
merge: match the help text with the documentation
We used to be very casual in terminology and used <branch>, <ref> and
<rev> more or less interchangeably with <commit>. Match the help text
given by "git merge -h" with that of the documentation.
Signed-off-by: Jared Hance <jaredhance@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 11 Mar 2011 00:02:50 +0000 (16:02 -0800)]
rerere: make sure it works even in a workdir attached to a young repository
The git-new-workdir script in contrib/ makes a new work tree by sharing
many subdirectories of the .git directory with the original repository.
When rerere.enabled is set in the original repository, but the user has
not encountered any conflicts yet, the original repository may not yet
have .git/rr-cache directory.
When rerere wants to run in a new work tree created from such a young
original repository, it fails to mkdir(2) .git/rr-cache that is a symlink
to a yet-to-be-created directory.
There are three possible approaches to this:
- A naive solution is not to create a symlink in the git-new-workdir
script to a directory the original does not have (yet). This is not a
solution, as we tend to lazily create subdirectories of .git/, and
having rerere.enabled configuration set is a strong indication that the
user _wants_ to have this lazy creation to happen;
- We could always create .git/rr-cache upon repository creation. This is
tempting but will not help people with existing repositories.
- Detect this case by seeing that mkdir(2) failed with EEXIST, checking
that the path is a symlink, and try running mkdir(2) on the link
target.
This patch solves the issue by doing the third one.
Strictly speaking, this is incomplete. It does not attempt to handle
relative symbolic link that points into the original repository, but this
is good enough to help people who use contrib/workdir/git-new-workdir
script.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 2 Mar 2011 01:51:01 +0000 (17:51 -0800)]
doc: technical details about the index file format
* Clarify "string of unsigned bytes";
* Blob has two variants (regular file vs symlink), not (blob vs symlink);
* Clarify permission mode bits;
* Clarify ce_namelen() "too long to fit in the length field" case;
* Clarify "." etc are forbidden as path components;
* Match the description with the internal wording "cache-tree";
* All types of extension begin with signature and length as explained in
the first part. Don't repeat the "length" part in the description of
each extension (can be mistaken as if there is a separate 32-bit size
field inside the extension), but state what the signature for each
extension is.
* Don't say "Extension tag", as we have said "Extension signature" in the
first part---be consistent;
* Clarify the invalidation of cache-tree entries;
* Correct description on subtree_nr field in the cache-tree;
* Clarify the order of entries in cache-tree;
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 23 Mar 2011 21:55:55 +0000 (14:55 -0700)]
Merge branch 'kc/gitweb-pathinfo-w-anchor'
* kc/gitweb-pathinfo-w-anchor:
gitweb: fix #patchNN anchors when path_info is enabled
Junio C Hamano [Wed, 23 Mar 2011 21:55:49 +0000 (14:55 -0700)]
Merge branch 'jn/fortify-source-workaround'
* jn/fortify-source-workaround:
run-command: prettify -D_FORTIFY_SOURCE workaround
Junio C Hamano [Wed, 23 Mar 2011 21:55:46 +0000 (14:55 -0700)]
Merge branch 'jn/maint-c99-format'
* jn/maint-c99-format:
unbreak and eliminate NO_C99_FORMAT
mktag: avoid %td in format string
Junio C Hamano [Wed, 23 Mar 2011 21:55:40 +0000 (14:55 -0700)]
Merge branch 'lt/default-abbrev'
* lt/default-abbrev:
Rename core.abbrevlength back to core.abbrev
Make the default abbrev length configurable
Junio C Hamano [Wed, 23 Mar 2011 21:55:37 +0000 (14:55 -0700)]
Merge branch 'pk/stash-apply-status-relative'
* pk/stash-apply-status-relative:
Add test: git stash shows status relative to current dir
git stash: show status relative to current directory
Junio C Hamano [Wed, 23 Mar 2011 21:55:17 +0000 (14:55 -0700)]
Merge branch 'jc/maint-diff-q-filter'
* jc/maint-diff-q-filter:
diff --quiet: disable optimization when --diff-filter=X is used
Junio C Hamano [Wed, 23 Mar 2011 21:54:24 +0000 (14:54 -0700)]
Merge branch 'pw/p4'
* pw/p4:
git-p4: test sync new branch
git-p4: fix sync new branch regression
Michael J Gruber [Wed, 23 Mar 2011 09:38:51 +0000 (10:38 +0100)]
rev-list --min-parents,--max-parents: doc, test and completion
This also adds test for "--merges" and "--no-merges" which we did not
have so far.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael J Gruber [Mon, 21 Mar 2011 10:14:06 +0000 (11:14 +0100)]
revision.c: introduce --min-parents and --max-parents options
Introduce --min-parents and --max-parents options which limit the
revisions to those commits which have at least (or at most) that many
commits, where negative arguments for --max-parents= denote infinity
(i.e. no upper limit).
In particular:
--max-parents=1 is the same as --no-merges;
--min-parents=2 is the same as --merges;
--max-parents=0 shows only roots; and
--min-parents=3 shows only octopus merges
Using --min-parents=n and --max-parents=m with n>m gives you what you ask
for (i.e. nothing) for obvious reasons, just like when you give --merges
(show only merge commits) and --no-merges (show only non-merge commits) at
the same time.
Also, introduce --no-min-parents and --no-max-parents to do the obvious
thing for convenience.
We compute the number of parents only when we limit by that, so there
is no performance impact when there are no limiters.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 23 Mar 2011 05:02:24 +0000 (22:02 -0700)]
Update draft release notes to 1.7.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 23 Mar 2011 04:38:50 +0000 (21:38 -0700)]
Merge branch 'mg/rev-list-one-side-only'
* mg/rev-list-one-side-only:
git-log: put space after commit mark
t6007: test rev-list --cherry
log --cherry: a synonym
rev-list: documentation and test for --cherry-mark
revision.c: introduce --cherry-mark
rev-list/log: factor out revision mark generation
rev-list: --left/right-only are mutually exclusive
rev-list: documentation and test for --left/right-only
t6007: Make sure we test --cherry-pick
revlist.c: introduce --left/right-only for unsymmetric picking
Junio C Hamano [Wed, 23 Mar 2011 04:38:25 +0000 (21:38 -0700)]
Merge branch 'js/maint-stash-index-copy'
* js/maint-stash-index-copy:
stash: copy the index using --index-output instead of cp -p
stash: fix incorrect quoting in cleanup of temporary files
Junio C Hamano [Wed, 23 Mar 2011 04:38:19 +0000 (21:38 -0700)]
Merge branch 'tl/p4'
* tl/p4:
git-p4: Fix error message crash in P4Sync.commit.
Teach git-p4 to ignore case in perforce filenames if configured.
git-p4: Teach gitConfig method about arguments.
Junio C Hamano [Wed, 23 Mar 2011 04:38:15 +0000 (21:38 -0700)]
Merge branch 'mg/doc-bisect-tweak-worktree'
* mg/doc-bisect-tweak-worktree:
git-bisect.txt: example for bisecting with hot-fix
git-bisect.txt: streamline run presentation
Junio C Hamano [Wed, 23 Mar 2011 04:38:12 +0000 (21:38 -0700)]
Merge branch 'jn/test-sanitize-git-env'
* jn/test-sanitize-git-env:
tests: scrub environment of GIT_* variables
config: drop support for GIT_CONFIG_NOGLOBAL
gitattributes: drop support for GIT_ATTR_NOGLOBAL
tests: suppress system gitattributes
tests: stop worrying about obsolete environment variables
Junio C Hamano [Wed, 23 Mar 2011 04:38:06 +0000 (21:38 -0700)]
Merge branch 'sp/maint-upload-pack-stop-early'
* sp/maint-upload-pack-stop-early:
upload-pack: Implement no-done capability
upload-pack: More aggressively send 'ACK %s ready'
Junio C Hamano [Wed, 23 Mar 2011 04:38:03 +0000 (21:38 -0700)]
Merge branch 'sp/maint-fetch-pack-stop-early'
* sp/maint-fetch-pack-stop-early:
fetch-pack: Implement no-done capability
fetch-pack: Finish negotation if remote replies "ACK %s ready"
Junio C Hamano [Wed, 23 Mar 2011 04:37:59 +0000 (21:37 -0700)]
Merge branch 'jc/maint-rev-list-culled-boundary'
* jc/maint-rev-list-culled-boundary:
list-objects.c: don't add an unparsed NULL as a pending tree
Conflicts:
list-objects.c
Junio C Hamano [Wed, 23 Mar 2011 04:37:53 +0000 (21:37 -0700)]
Merge branch 'jc/maint-fetch-alt'
* jc/maint-fetch-alt:
fetch-pack: objects in our alternates are available to us
refs_from_alternate: helper to use refs from alternates
Conflicts:
builtin/receive-pack.c
Junio C Hamano [Wed, 23 Mar 2011 04:37:47 +0000 (21:37 -0700)]
Merge branch 'sg/complete-symmetric-diff'
* sg/complete-symmetric-diff:
bash: complete 'git diff ...branc<TAB>'
bash: fix misindented esac statement in __git_complete_file()