Jeff King [Mon, 29 Oct 2012 08:12:15 +0000 (04:12 -0400)]
Merge branch 'jc/grep-pcre-loose-ends'
"git log -F -E --grep='<ere>'" failed to use the given <ere>
pattern as extended regular expression, and instead looked for the
string literally. The early part of this series is a fix for it;
the latter part teaches log to respect the grep.* configuration.
* jc/grep-pcre-loose-ends:
log: honor grep.* configuration
log --grep: accept --basic-regexp and --perl-regexp
log --grep: use the same helper to set -E/-F options as "git grep"
revisions: initialize revs->grep_filter using grep_init()
grep: move pattern-type bits support to top-level grep.[ch]
grep: move the configuration parsing logic to grep.[ch]
builtin/grep.c: make configuration callback more reusable
Jeff King [Mon, 29 Oct 2012 08:12:12 +0000 (04:12 -0400)]
Merge branch 'jl/submodule-add-by-name'
If you remove a submodule, in order to keep the repository so that
"git checkout" to an older commit in the superproject history can
resurrect the submodule, the real repository will stay in $GIT_DIR
of the superproject. A later "git submodule add $path" to add a
different submodule at the same path will fail. Diagnose this case
a bit better, and if the user really wants to add an unrelated
submodule at the same path, give the "--name" option to give it a
place in $GIT_DIR of the superproject that does not conflict with
the original submodule.
* jl/submodule-add-by-name:
submodule add: Fail when .git/modules/<name> already exists unless forced
Teach "git submodule add" the --name option
Jeff King [Mon, 29 Oct 2012 08:12:07 +0000 (04:12 -0400)]
Merge branch 'jl/submodule-rm'
"git rm submodule" cannot blindly remove a submodule directory as
its working tree may have local changes, and worse yet, it may even
have its repository embedded in it. Teach it some special cases
where it is safe to remove a submodule, specifically, when there is
no local changes in the submodule working tree, and its repository
is not embedded in its working tree but is elsewhere and uses the
gitfile mechanism to point at it.
* jl/submodule-rm:
submodule: teach rm to remove submodules unless they contain a git directory
Jeff King [Thu, 25 Oct 2012 10:43:03 +0000 (06:43 -0400)]
Merge branch 'jk/strbuf-detach-always-non-null'
* jk/strbuf-detach-always-non-null:
strbuf: always return a non-NULL value from strbuf_detach
Jeff King [Thu, 25 Oct 2012 10:43:01 +0000 (06:43 -0400)]
Merge branch 'js/mingw-fflush-errno'
* js/mingw-fflush-errno:
maybe_flush_or_die: move a too-loose Windows specific error
Jeff King [Thu, 25 Oct 2012 10:42:57 +0000 (06:42 -0400)]
Merge branch 'da/mergetools-p4'
* da/mergetools-p4:
mergetools/p4merge: Handle "/dev/null"
Jeff King [Thu, 25 Oct 2012 10:42:49 +0000 (06:42 -0400)]
Merge branch 'jc/test-say-color-avoid-echo-escape'
Recent nd/wildmatch series was the first to reveal this ancient bug
in the test scaffolding.
* jc/test-say-color-avoid-echo-escape:
test-lib: Fix say_color () not to interpret \a\b\c in the message
Jeff King [Thu, 25 Oct 2012 10:42:36 +0000 (06:42 -0400)]
Merge branch 'nd/attr-match-optim'
Trivial and obvious optimization for finding attributes that match
a given path.
* nd/attr-match-optim:
attr: avoid searching for basename on every match
attr: avoid strlen() on every match
Jeff King [Thu, 25 Oct 2012 10:42:27 +0000 (06:42 -0400)]
Merge branch 'jk/peel-ref'
Speeds up "git upload-pack" (what is invoked by "git fetch" on the
other side of the connection) by reducing the cost to advertise the
branches and tags that are available in the repository.
* jk/peel-ref:
upload-pack: use peel_ref for ref advertisements
peel_ref: check object type before loading
peel_ref: do not return a null sha1
peel_ref: use faster deref_tag_noverify
Jeff King [Thu, 25 Oct 2012 10:42:11 +0000 (06:42 -0400)]
Merge branch 'bw/config-lift-variable-name-length-limit'
The configuration parser had an unnecessary hardcoded limit on
variable names that was not checked consistently. Lift the limit.
* bw/config-lift-variable-name-length-limit:
Remove the hard coded length limit on variable names in config files
Jeff King [Thu, 25 Oct 2012 10:42:01 +0000 (06:42 -0400)]
Merge branch 'fa/remote-svn'
A GSoC project.
* fa/remote-svn:
Add a test script for remote-svn
remote-svn: add marks-file regeneration
Add a svnrdump-simulator replaying a dump file for testing
remote-svn: add incremental import
remote-svn: Activate import/export-marks for fast-import
Create a note for every imported commit containing svn metadata
vcs-svn: add fast_export_note to create notes
Allow reading svn dumps from files via file:// urls
remote-svn, vcs-svn: Enable fetching to private refs
When debug==1, start fast-import with "--stats" instead of "--quiet"
Add documentation for the 'bidi-import' capability of remote-helpers
Connect fast-import to the remote-helper via pipe, adding 'bidi-import' capability
Add argv_array_detach and argv_array_free_detached
Add svndump_init_fd to allow reading dumps from arbitrary FDs
Add git-remote-testsvn to Makefile
Implement a remote helper for svn in C
Jeff King [Thu, 25 Oct 2012 10:41:57 +0000 (06:41 -0400)]
Merge branch 'jm/diff-context-config'
Teaches a new configuration variable to "git diff" Porcelain and
its friends.
* jm/diff-context-config:
t4055: avoid use of sed 'a' command
diff: diff.context configuration gives default to -U
Jeff King [Thu, 25 Oct 2012 10:41:15 +0000 (06:41 -0400)]
Merge branch 'jk/no-more-pre-exec-callback'
Removes a workaround for buggy version of less older than version
406.
* jk/no-more-pre-exec-callback:
pager: drop "wait for output to run less" hack
Junio C Hamano [Sun, 21 Oct 2012 20:56:23 +0000 (13:56 -0700)]
Git 1.8.0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Thu, 18 Oct 2012 10:00:12 +0000 (06:00 -0400)]
strbuf: always return a non-NULL value from strbuf_detach
The current behavior is to return NULL when strbuf did not
actually allocate a string. This can be quite surprising to
callers, though, who may feed the strbuf from arbitrary data
and expect to always get a valid value.
In most cases, it does not make a difference because calling
any strbuf function will cause an allocation (even if the
function ends up not inserting any data). But if the code is
structured like:
struct strbuf buf = STRBUF_INIT;
if (some_condition)
strbuf_addstr(&buf, some_string);
return strbuf_detach(&buf, NULL);
then you may or may not return NULL, depending on the
condition. This can cause us to segfault in http-push
(when fed an empty URL) and in http-backend (when an empty
parameter like "foo=bar&&" is in the $QUERY_STRING).
This patch forces strbuf_detach to allocate an empty
NUL-terminated string when it is called on a strbuf that has
not been allocated.
I investigated all call-sites of strbuf_detach. The majority
are either not affected by the change (because they call a
strbuf_* function unconditionally), or can handle the empty
string just as easily as NULL.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 17 Oct 2012 22:55:46 +0000 (15:55 -0700)]
Merge tag 'gitgui-0.17.0' of git://repo.or.cz/git-gui
git-gui 0.17.0
* tag 'gitgui-0.17.0' of git://repo.or.cz/git-gui:
git-gui 0.17
git-gui: Don't prepend the prefix if value looks like a full path
git-gui: Detect full path when parsing arguments
git-gui: remove .git/CHERRY_PICK_HEAD after committing
git-gui: Fix a loose/lose mistake
git-gui: Fix semi-working shortcuts for unstage and revert
git-gui: de.po: translate "remote" as "extern"
git-gui: de.po: translate "bare" as "bloß"
git-gui: de.po: consistently add untranslated hook names within braces
git-gui: preserve commit messages in utf-8
git-gui: open console when using --trace on windows
git-gui: fix a typo in po/ files
git-gui: Use PWD if it exists on Mac OS X
git-gui: fix git-gui crash due to uninitialized variable
Pat Thoyts [Wed, 17 Oct 2012 20:57:29 +0000 (21:57 +0100)]
git-gui 0.17
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Andrew Wong [Tue, 2 Oct 2012 16:25:15 +0000 (12:25 -0400)]
git-gui: Don't prepend the prefix if value looks like a full path
When argument parsing fails to detect a file name, "git-gui" will try to
use the previously detected "head" as the file name. We should avoid
prepending the prefix if "head" looks like a full path.
Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Andrew Wong [Tue, 2 Oct 2012 16:25:14 +0000 (12:25 -0400)]
git-gui: Detect full path when parsing arguments
When running "git-gui blame" from a subfolder (which means prefix is
non-empty), if we pass a full path as argument, the argument parsing
will fail to recognize the argument as a file name, because prefix is
prepended to the argument.
This patch handles that scenario by adding an additional branch that
checks the file name without using the prefix.
Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Junio C Hamano [Wed, 17 Oct 2012 17:39:44 +0000 (10:39 -0700)]
Git 1.8.0-rc3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 17 Oct 2012 17:37:40 +0000 (10:37 -0700)]
Merge git://github.com/git-l10n/git-po
* git://github.com/git-l10n/git-po:
l10n: vi.po: update from v1.8.0-rc2-4-g42e55
l10n: Update Swedish translation (1964t0f0u)
Junio C Hamano [Wed, 17 Oct 2012 17:37:32 +0000 (10:37 -0700)]
Sync with 1.7.12.4
Junio C Hamano [Wed, 17 Oct 2012 17:36:01 +0000 (10:36 -0700)]
Git 1.7.12.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 17 Oct 2012 17:29:24 +0000 (10:29 -0700)]
Merge branch 'jk/maint-http-half-auth-push' into maint
* jk/maint-http-half-auth-push:
http: fix segfault in handle_curl_result
Junio C Hamano [Wed, 17 Oct 2012 17:28:56 +0000 (10:28 -0700)]
Merge branch 'rr/git-uri-doc' into maint
* rr/git-uri-doc:
Git url doc: mark ftp/ftps as read-only and deprecate them
Junio C Hamano [Wed, 17 Oct 2012 17:28:48 +0000 (10:28 -0700)]
Merge branch 'bw/cp-a-is-gnuism' into maint
* bw/cp-a-is-gnuism:
tests: "cp -a" is a GNUism
Junio C Hamano [Wed, 17 Oct 2012 17:28:42 +0000 (10:28 -0700)]
Merge branch 'nd/doc-ignore' into maint
* nd/doc-ignore:
gitignore.txt: suggestions how to get literal # or ! at the beginning
Junio C Hamano [Wed, 17 Oct 2012 17:28:34 +0000 (10:28 -0700)]
Merge branch 'jc/doc-long-options' into maint
* jc/doc-long-options:
gitcli: parse-options lets you omit tail of long options
Junio C Hamano [Wed, 17 Oct 2012 17:28:19 +0000 (10:28 -0700)]
Merge branch 'jc/maint-t1450-fsck-order-fix' into maint
* jc/maint-t1450-fsck-order-fix:
t1450: the order the objects are checked is undefined
Junio C Hamano [Wed, 17 Oct 2012 17:27:28 +0000 (10:27 -0700)]
Merge branch 'rr/test-use-shell-path-not-shell' into maint
* rr/test-use-shell-path-not-shell:
test-lib: use $SHELL_PATH, not $SHELL
Junio C Hamano [Wed, 17 Oct 2012 17:27:21 +0000 (10:27 -0700)]
Merge branch 'rr/test-make-sure-we-have-git' into maint
* rr/test-make-sure-we-have-git:
t/test-lib: make sure Git has already been built
Junio C Hamano [Wed, 17 Oct 2012 17:27:10 +0000 (10:27 -0700)]
Merge branch 'po/maint-docs' into maint
* po/maint-docs:
Doc branch: show -vv option and alternative
Doc clean: add See Also link
Doc add: link gitignore
Doc: separate gitignore pattern sources
Doc: shallow clone deepens _to_ new depth
Junio C Hamano [Wed, 17 Oct 2012 17:26:51 +0000 (10:26 -0700)]
Merge branch 'jc/ll-merge-binary-ours' into maint
* jc/ll-merge-binary-ours:
ll-merge: warn about inability to merge binary files only when we can't
attr: "binary" attribute should choose built-in "binary" merge driver
merge: teach -Xours/-Xtheirs to binary ll-merge driver
Junio C Hamano [Wed, 17 Oct 2012 17:25:37 +0000 (10:25 -0700)]
Merge branch 'db/doc-custom-xmlto' into maint
* db/doc-custom-xmlto:
Documentation/Makefile: Allow custom XMLTO binary
Johannes Sixt [Wed, 17 Oct 2012 07:05:51 +0000 (09:05 +0200)]
maybe_flush_or_die: move a too-loose Windows specific error
check to compat
Commit
b2f5e268 (Windows: Work around an oddity when a pipe with no reader
is written to) introduced a check for EINVAL after fflush() to fight
spurious "Invalid argument" errors on Windows when a pipe was broken. But
this check may hide real errors on systems that do not have the this odd
behavior. Introduce an fflush wrapper in compat/mingw.* so that the treatment
is only applied on Windows.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jiang Xin [Wed, 17 Oct 2012 01:38:30 +0000 (09:38 +0800)]
Merge branch 'master' of https://github.com/nafmo/git-l10n-sv
* 'master' of https://github.com/nafmo/git-l10n-sv:
l10n: Update Swedish translation (1964t0f0u)
Jiang Xin [Wed, 17 Oct 2012 01:37:30 +0000 (09:37 +0800)]
Merge branch 'master' of git://github.com/vnwildman/git
* 'master' of git://github.com/vnwildman/git:
l10n: vi.po: update from v1.8.0-rc2-4-g42e55
Tran Ngoc Quan [Wed, 17 Oct 2012 01:15:28 +0000 (08:15 +0700)]
l10n: vi.po: update from v1.8.0-rc2-4-g42e55
* translate 3 new messages
* review quotes
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
Thomas Ackermann [Tue, 16 Oct 2012 17:26:23 +0000 (19:26 +0200)]
Documentation/RelNotes: remove "updated up to this revision" markers
These were used to keep track of the last commit a release notes
entry was written for, and should have been removed when cutting
the final release.
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 16 Oct 2012 20:27:23 +0000 (13:27 -0700)]
Update draft release notes to 1.8.0
We are almost there...
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 16 Oct 2012 18:44:37 +0000 (11:44 -0700)]
Merge branch 'jk/maint-http-half-auth-push'
Fixes a regression in maint-1.7.11 (v1.7.11.7), maint (v1.7.12.1)
and master (v1.8.0-rc0).
* jk/maint-http-half-auth-push:
http: fix segfault in handle_curl_result
Peter Krefting [Tue, 16 Oct 2012 07:38:11 +0000 (08:38 +0100)]
l10n: Update Swedish translation (1964t0f0u)
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Jiang Xin [Tue, 16 Oct 2012 00:39:10 +0000 (08:39 +0800)]
l10n: Update git.pot (3 new, 6 removed messages)
This po/git.pot update is generated from v1.8.0-rc2-4-g42e55.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Jiang Xin [Tue, 16 Oct 2012 00:31:22 +0000 (08:31 +0800)]
Merge branch 'master' of git://github.com/vnwildman/git
* 'master' of git://github.com/vnwildman/git:
l10n: vi.po: update translation upto
cc76011
Tran Ngoc Quan [Mon, 15 Oct 2012 07:35:49 +0000 (14:35 +0700)]
l10n: vi.po: update translation upto
cc76011
* translate all new messages (100%)
* review some others
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
Junio C Hamano [Sun, 14 Oct 2012 06:05:54 +0000 (23:05 -0700)]
Merge branch 'maint'
* maint:
Fix spelling error in post-receive-email hook
Richard Fearn [Sat, 13 Oct 2012 22:32:50 +0000 (23:32 +0100)]
Fix spelling error in post-receive-email hook
Signed-off-by: Richard Fearn <richardfearn@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 12 Oct 2012 18:36:06 +0000 (11:36 -0700)]
Merge branch 'maint'
* maint:
gitweb.cgi: fix "comitter_tz" typo in feed
Jeff King [Fri, 12 Oct 2012 06:22:49 +0000 (02:22 -0400)]
http: fix segfault in handle_curl_result
When we create an http active_request_slot, we can set its
"results" pointer back to local storage. The http code will
fill in the details of how the request went, and we can
access those details even after the slot has been cleaned
up.
Commit
8809703 (http: factor out http error code handling)
switched us from accessing our local results struct directly
to accessing it via the "results" pointer of the slot. That
means we're accessing the slot after it has been marked as
finished, defeating the whole purpose of keeping the results
storage separate.
Most of the time this doesn't matter, as finishing the slot
does not actually clean up the pointer. However, when using
curl's multi interface with the dumb-http revision walker,
we might actually start a new request before handing control
back to the original caller. In that case, we may reuse the
slot, zeroing its results pointer, and leading the original
caller to segfault while looking for its results inside the
slot.
Instead, we need to pass a pointer to our local results
storage to the handle_curl_result function, rather than
relying on the pointer in the slot struct. This matches what
the original code did before the refactoring (which did not
use a separate function, and therefore just accessed the
results struct directly).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Dylan Alex Simon [Thu, 11 Oct 2012 20:40:35 +0000 (16:40 -0400)]
gitweb.cgi: fix "comitter_tz" typo in feed
gitweb's feeds sometimes contained committer timestamps in the wrong timezone
due to a misspelling.
Signed-off-by: Dylan Simon <dylan@dylex.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
David Aguilar [Thu, 11 Oct 2012 03:22:36 +0000 (20:22 -0700)]
mergetools/p4merge: Handle "/dev/null"
p4merge does not properly handle the case where "/dev/null"
is passed as a filename.
Work it around by creating a temporary file for this purpose.
Reported-by: Jeremy Morton <admin@game-point.net>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
Needs to be amended with Tested-by when a report comes...
Junio C Hamano [Thu, 11 Oct 2012 18:18:56 +0000 (11:18 -0700)]
Git 1.8.0-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 11 Oct 2012 17:40:36 +0000 (10:40 -0700)]
test-lib: Fix say_color () not to interpret \a\b\c in the message
When running with color disabled (e.g. under prove to produce TAP
output), say_color() helper function is defined to use echo to show
the message. With a message that ends with "\c", echo is allowed to
interpret it as "Do not end the line with LF".
Use printf "%s\n" to emit the message literally.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 10 Oct 2012 21:57:26 +0000 (14:57 -0700)]
Merge branch 'rr/git-uri-doc'
* rr/git-uri-doc:
Git url doc: mark ftp/ftps as read-only and deprecate them
Junio C Hamano [Wed, 10 Oct 2012 21:57:09 +0000 (14:57 -0700)]
Merge branch 'bw/cp-a-is-gnuism'
* bw/cp-a-is-gnuism:
tests: "cp -a" is a GNUism
Junio C Hamano [Wed, 10 Oct 2012 21:57:02 +0000 (14:57 -0700)]
Merge branch 'nd/doc-ignore'
* nd/doc-ignore:
gitignore.txt: suggestions how to get literal # or ! at the beginning
Junio C Hamano [Wed, 10 Oct 2012 21:56:52 +0000 (14:56 -0700)]
Merge branch 'jc/doc-long-options'
* jc/doc-long-options:
gitcli: parse-options lets you omit tail of long options
Junio C Hamano [Wed, 10 Oct 2012 21:54:25 +0000 (14:54 -0700)]
Sync with maint
* maint:
attr: a note about the order of .gitattributes lookup
Junio C Hamano [Wed, 10 Oct 2012 20:53:56 +0000 (13:53 -0700)]
Merge git://bogomips.org/git-svn
* git://bogomips.org/git-svn:
svn test: escape peg revision separator using empty peg rev
git svn: work around SVN 1.7 mishandling of svn:special changes
Jonathan Nieder [Tue, 9 Oct 2012 08:41:45 +0000 (01:41 -0700)]
svn test: escape peg revision separator using empty peg rev
This test script uses "svn cp" to create a branch with an @-sign in
its name:
svn cp "pr ject/trunk" "pr ject/branches/not-a@{0}reflog"
That sets up for later tests that fetch the branch and check that git
svn mangles the refname appropriately.
Unfortunately, modern svn versions interpret path arguments with an
@-sign as an example of path@revision syntax (which pegs a path to a
particular revision) and truncate the path or error out with message
"svn:
E205000: Syntax error parsing peg revision '{0}reflog'".
When using subversion 1.6.x, escaping the @ sign as %40 avoids trouble
(see
08fd28bb, 2010-07-08). Newer versions are stricter:
$ svn cp "$repo/pr ject/trunk" "$repo/pr ject/branches/not-a%40{reflog}"
svn:
E205000: Syntax error parsing peg revision '%7B0%7Dreflog'
The recommended method for escaping a literal @ sign in a path passed
to subversion is to add an empty peg revision at the end of the path
("branches/not-a@{0}reflog@"). Do that.
Pre-1.6.12 versions of Subversion probably treat the trailing @ as
another literal @-sign (svn issue 3651). Luckily ever since
v1.8.0-rc0~155^2~7 (t9118: workaround inconsistency between SVN
versions, 2012-07-28) the test can survive that.
Tested with Debian Subversion 1.6.12dfsg-6 and 1.7.5-1 and r1395837
of Subversion trunk (1.8.x).
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Tested-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Jonathan Nieder [Tue, 9 Oct 2012 10:12:39 +0000 (03:12 -0700)]
git svn: work around SVN 1.7 mishandling of svn:special changes
Subversion represents symlinks as ordinary files with content starting
with "link " and the svn:special property set to "*". Thus a file can
switch between being a symlink and a non-symlink simply by toggling
its svn:special property, and new checkouts will automatically write a
file of the appropriate type. Likewise, in subversion 1.6 and older,
running "svn update" would notice changes in filetype and update the
working copy appropriately.
Starting in subversion 1.7 (issue 4091), changes to the svn:special
property trip an assertion instead:
$ svn up svn-tree
Updating 'svn-tree':
svn:
E235000: In file 'subversion/libsvn_wc/update_editor.c' \
line 1583: assertion failed (action == svn_wc_conflict_action_edit \
|| action == svn_wc_conflict_action_delete || action == \
svn_wc_conflict_action_replace)
Revisions prepared with ordinary svn commands ("svn add" and not "svn
propset") don't trip this because they represent these filetype
changes using a replace operation, which is approximately equivalent
to removal followed by adding a new file and works fine. Follow suit.
Noticed using t9100. After this change, git-svn's file-to-symlink
changes are sent in a format that modern "svn update" can handle and
tests t9100.11-13 pass again.
[ew: s,git-svn\.perl,perl/Git/SVN/Editor.pm,g]
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Ramsay Jones [Sat, 6 Oct 2012 17:33:08 +0000 (18:33 +0100)]
MALLOC_CHECK: Allow checking to be disabled from config.mak
The malloc checks can be disabled using the TEST_NO_MALLOC_CHECK
variable, either from the environment or command line of an
'make test' invocation. In order to allow the malloc checks to be
disabled from the 'config.mak' file, we add TEST_NO_MALLOC_CHECK
to the environment using an export directive.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyen Thai Ngoc Duy [Wed, 10 Oct 2012 13:55:52 +0000 (20:55 +0700)]
attr: a note about the order of .gitattributes lookup
This is the documentation part of
1a9d7e9 (attr.c: read .gitattributes from index as well. - 2007-08-14)
06f33c1 (Read attributes from the index that is being checked out - 2009-03-13)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 9 Oct 2012 23:49:57 +0000 (16:49 -0700)]
log: honor grep.* configuration
Now the grep_config() callback is reusable from other configuration
callbacks, call it from git_log_config() so that grep.patterntype
and friends can be used with the commands in the "git log" family.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 3 Oct 2012 22:01:34 +0000 (15:01 -0700)]
log --grep: accept --basic-regexp and --perl-regexp
When we added the "--perl-regexp" option (or "-P") to "git grep", we
should have done the same for the commands in the "git log" family,
but somehow we forgot to do so. This corrects it, but we will
reserve the short-and-sweet "-P" option for something else for now.
Also introduce the "--basic-regexp" option for completeness, so that
the "last one wins" principle can be used to defeat an earlier -E
option, e.g. "git log -E --basic-regexp --grep='<bre>'". Note that
it cannot have the short "-G" option as the option is to grep in the
patch text in the context of "log" family.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 3 Oct 2012 21:50:51 +0000 (14:50 -0700)]
log --grep: use the same helper to set -E/-F options as "git grep"
The command line option parser for "git log -F -E --grep='<ere>'"
did not flip the "fixed" bit, violating the general "last option
wins" principle among conflicting options.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 9 Oct 2012 23:40:03 +0000 (16:40 -0700)]
revisions: initialize revs->grep_filter using grep_init()
Instead of using the hand-rolled initialization sequence,
use grep_init() to populate the necessary bits. This opens
the door to allow the calling commands to optionally read
grep.* configuration variables via git_config() if they
want to.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 3 Oct 2012 21:47:48 +0000 (14:47 -0700)]
grep: move pattern-type bits support to top-level grep.[ch]
Switching between -E/-G/-P/-F correctly needs a lot more than just
flipping opt->regflags bit these days, and we have a nice helper
function buried in builtin/grep.c for the sole use of "git grep".
Extract it so that "log --grep" family can also use it.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 9 Oct 2012 23:17:50 +0000 (16:17 -0700)]
grep: move the configuration parsing logic to grep.[ch]
The configuration handling is a library-ish part of this program,
that is not specific to "git grep" command. It should be reusable
by "log" and others.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 9 Oct 2012 23:04:12 +0000 (16:04 -0700)]
builtin/grep.c: make configuration callback more reusable
The grep_config() function takes one instance of grep_opt as its
callback parameter, and populates it by running git_config().
This has three practical implications:
- You have to have an instance of grep_opt already when you call
the configuration, but that is not necessarily always true. You
may be trying to initialize the grep_filter member of rev_info,
but are not ready to call init_revisions() on it yet.
- It is not easy to enhance grep_config() in such a way to make it
cascade to other callback functions to grab other variables in
one call of git_config(); grep_config() can be cascaded into from
other callbacks, but it has to be at the leaf level of a cascade.
- If you ever need to use more than one instance of grep_opt, you
will have to open and read the configuration file(s) every time
you initialize them.
Rearrange the configuration mechanism and model it after how diff
configuration variables are handled. An early call to git_config()
reads and remembers the values taken from the configuration in the
default "template", and a separate call to grep_init() uses this
template to instantiate a grep_opt.
The next step will be to move some of this out of this file so that
the other user of the grep machinery (i.e. "log") can use it.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 9 Oct 2012 21:23:45 +0000 (14:23 -0700)]
Merge branch 'maint'
* maint:
l10n: de.po: fix a few minor typos
Øyvind A. Holm [Tue, 9 Oct 2012 14:26:11 +0000 (16:26 +0200)]
configure.ac: Add missing comma to CC_LD_DYNPATH
40bfbde ("build: don't duplicate substitution of make variables",
2012-09-11) by mistake removed a necessary comma at the end of
"CC_LD_DYNPATH=-Wl,rpath," in line 414.
When executing "./configure --with-zlib=PATH", this resulted in
[...]
CC xdiff/xhistogram.o
AR xdiff/lib.a
LINK git-credential-store
/usr/bin/ld: bad -rpath option
collect2: ld returned 1 exit status
make: *** [git-credential-store] Error 1
$
during make.
Signed-off-by: Øyvind A. Holm <sunny@sunbase.org>
Acked-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 9 Oct 2012 18:48:53 +0000 (11:48 -0700)]
Merge branch 'maint' of git://github.com/git-l10n/git-po into maint
* 'maint' of git://github.com/git-l10n/git-po:
l10n: de.po: fix a few minor typos
Ben Walton [Mon, 8 Oct 2012 08:08:01 +0000 (09:08 +0100)]
tests: "cp -a" is a GNUism
These tests just want a bit-for-bit identical copy; they do not need
even -H (there is no symbolic link involved) nor -p (there is no
funny permission or ownership issues involved).
Just use "cp -R" instead.
Signed-off-by: Ben Walton <bdwalton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ramkumar Ramachandra [Mon, 8 Oct 2012 17:26:53 +0000 (10:26 -0700)]
Git url doc: mark ftp/ftps as read-only and deprecate them
It is not even worth mentioning their removal; just discourage
people from using them.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 8 Oct 2012 18:45:41 +0000 (11:45 -0700)]
Git 1.8.0-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 8 Oct 2012 18:43:10 +0000 (11:43 -0700)]
Merge branch 'jc/maint-t1450-fsck-order-fix'
The fsck test assumed too much on what kind of error it will
detect. The only important thing is the inconsistency is detected
as an error.
* jc/maint-t1450-fsck-order-fix:
t1450: the order the objects are checked is undefined
Junio C Hamano [Mon, 8 Oct 2012 18:42:15 +0000 (11:42 -0700)]
Merge branch 'jc/merge-bases-paint-fix'
"git fmt-merge-msg" (an internal helper reduce_heads() it uses) had
a severe performance regression; an empty "git pull" took forever to
finish as the result.
* jc/merge-bases-paint-fix:
paint_down_to_common(): parse commit before relying on its timestamp
Junio C Hamano [Mon, 8 Oct 2012 18:41:21 +0000 (11:41 -0700)]
Sync with 1.7.12.3
Junio C Hamano [Mon, 8 Oct 2012 18:40:43 +0000 (11:40 -0700)]
Git 1.7.12.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 8 Oct 2012 18:34:34 +0000 (11:34 -0700)]
Merge branch 'os/commit-submodule-ignore' into maint
"git status" honored the ignore=dirty settings in .gitmodules but
"git commit" didn't.
* os/commit-submodule-ignore:
commit: pay attention to submodule.$name.ignore in .gitmodules
Junio C Hamano [Mon, 8 Oct 2012 18:34:19 +0000 (11:34 -0700)]
Merge branch 'jk/receive-pack-unpack-error-to-pusher' into maint
"git receive-pack" (the counterpart to "git push") did not give
progress output while processing objects it received to the puser
when run over the smart-http protocol.
* jk/receive-pack-unpack-error-to-pusher:
receive-pack: drop "n/a" on unpacker errors
receive-pack: send pack-processing stderr over sideband
receive-pack: redirect unpack-objects stdout to /dev/null
Junio C Hamano [Mon, 8 Oct 2012 18:34:02 +0000 (11:34 -0700)]
Merge branch 'rt/maint-clone-single' into maint
A repository created with "git clone --single" had its fetch
refspecs set up just like a clone without "--single", leading the
subsequent "git fetch" to slurp all the other branches, defeating
the whole point of specifying "only this branch".
* rt/maint-clone-single:
clone --single: limit the fetch refspec to fetched branch
Junio C Hamano [Mon, 8 Oct 2012 18:33:35 +0000 (11:33 -0700)]
Merge branch 'jc/blame-follows-renames' into maint
It was unclear in the documentation for "git blame" that it is
unnecessary for users to use the "--follow" option.
* jc/blame-follows-renames:
git blame: document that it always follows origin across whole-file renames
Junio C Hamano [Mon, 8 Oct 2012 18:32:59 +0000 (11:32 -0700)]
Merge branch 'lt/mailinfo-handle-attachment-more-sanely' into maint
A patch attached as application/octet-stream (e.g. not text/*) were
mishandled, not correctly honoring Content-Transfer-Encoding
(e.g. base64).
* lt/mailinfo-handle-attachment-more-sanely:
mailinfo: don't require "text" mime type for attachments
Nguyễn Thái Ngọc Duy [Sun, 7 Oct 2012 03:13:54 +0000 (10:13 +0700)]
gitignore.txt: suggestions how to get literal # or ! at the beginning
We support backslash escape, but we hide the details behind the phrase
"a shell glob suitable for consumption by fnmatch(3)". So it may not
be obvious how one can get literal # or ! at the beginning of pattern.
Add a few lines on how to work around the magic characters.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Florian Achleitner [Wed, 19 Sep 2012 15:21:30 +0000 (17:21 +0200)]
Add a test script for remote-svn
Use svnrdump_sim.py to emulate svnrdump without an svn server.
Tests fetching, incremental fetching, fetching from file://,
and the regeneration of fast-import's marks file.
Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Florian Achleitner [Wed, 19 Sep 2012 15:21:29 +0000 (17:21 +0200)]
remote-svn: add marks-file regeneration
fast-import mark files are stored outside the object database and are
therefore not fetched and can be lost somehow else. marks provide a
svn revision --> git sha1 mapping, while the notes that are attached
to each commit when it is imported provide a git sha1 --> svn revision
mapping.
If the marks file is not available or not plausible, regenerate it by
walking through the notes tree. , i.e. The plausibility check tests
if the highest revision in the marks file matches the revision of the
top ref. It doesn't ensure that the mark file is completely correct.
This could only be done with an effort equal to unconditional
regeneration.
Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Florian Achleitner [Wed, 19 Sep 2012 15:21:28 +0000 (17:21 +0200)]
Add a svnrdump-simulator replaying a dump file for testing
To ease testing without depending on a reachable svn server, this
compact python script mimics parts of svnrdumps behaviour. It
requires the remote url to start with sim://.
Start and end revisions are evaluated. If the requested revision
doesn't exist, as it is the case with incremental imports, if no new
commit was added, it returns 1 (like svnrdump).
To allow using the same dump file for simulating multiple incremental
imports, the highest revision can be limited by setting the environment
variable SVNRMAX to that value. This simulates the situation where
higher revs don't exist yet.
Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Florian Achleitner [Wed, 19 Sep 2012 15:21:27 +0000 (17:21 +0200)]
remote-svn: add incremental import
Search for a note attached to the ref to update and read it's
'Revision-number:'-line. Start import from the next svn revision.
If there is no next revision in the svn repo, svnrdump terminates with
a message on stderr an non-zero return value. This looks a little
weird, but there is no other way to know whether there is a new
revision in the svn repo.
On the start of an incremental import, the parent of the first commit
in the fast-import stream is set to the branch name to update. All
following commits specify their parent by a mark number. Previous mark
files are currently not reused.
Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Florian Achleitner [Wed, 19 Sep 2012 15:21:26 +0000 (17:21 +0200)]
remote-svn: Activate import/export-marks for fast-import
Enable import and export of a marks file by sending the appropriate
feature commands to fast-import before sending data.
Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Florian Achleitner [Wed, 19 Sep 2012 15:21:25 +0000 (17:21 +0200)]
Create a note for every imported commit containing svn metadata
To provide metadata from svn dumps for further processing, e.g.
branch detection, attach a note to each imported commit that stores
additional information. The notes are currently hard-coded in
refs/notes/svn/revs. Currently the following lines from the svn dump
are directly accumulated in the note. This can be refined as needed.
- "Revision-number"
- "Node-path"
- "Node-kind"
- "Node-action"
- "Node-copyfrom-path"
- "Node-copyfrom-rev"
Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Dmitry Ivankov [Wed, 19 Sep 2012 15:21:24 +0000 (17:21 +0200)]
vcs-svn: add fast_export_note to create notes
fast_export lacked a method to writes notes to fast-import stream.
Add two new functions fast_export_note which is similar to
fast_export_modify. And also add fast_export_buf_to_data to be able to
write inline blobs that don't come from a line_buffer or from delta
application.
To be used like this:
fast_export_begin_commit("refs/notes/somenotes", ...)
fast_export_note("refs/heads/master", "inline")
fast_export_buf_to_data(&data)
or maybe
fast_export_note("refs/heads/master", sha1)
Signed-off-by: Dmitry Ivankov <divanorama@gmail.com>
Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Florian Achleitner [Wed, 19 Sep 2012 15:21:23 +0000 (17:21 +0200)]
Allow reading svn dumps from files via file:// urls
For testing as well as for importing large, already available dumps,
it's useful to bypass svnrdump and replay the svndump from a file
directly.
Add support for file:// urls in the remote url, e.g.
svn::file:///path/to/dump
When the remote helper finds an url starting with file:// it tries to
open that file instead of invoking svnrdump.
Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Florian Achleitner [Wed, 19 Sep 2012 15:21:22 +0000 (17:21 +0200)]
remote-svn, vcs-svn: Enable fetching to private refs
The reference to update by the fast-import stream is hard-coded. When
fetching from a remote the remote-helper shall update refs in a
private namespace, i.e. a private subdir of refs/. This namespace is
defined by the 'refspec' capability, that the remote-helper advertises
as a reply to the 'capabilities' command.
Extend svndump and fast-export to allow passing the target ref.
Update svn-fe to be compatible.
Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Florian Achleitner [Wed, 19 Sep 2012 15:21:21 +0000 (17:21 +0200)]
When debug==1, start fast-import with "--stats" instead of "--quiet"
fast-import prints statistics that could be interesting to the
developer of remote helpers.
Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Florian Achleitner [Wed, 19 Sep 2012 15:21:20 +0000 (17:21 +0200)]
Add documentation for the 'bidi-import' capability of remote-helpers
Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Florian Achleitner [Wed, 19 Sep 2012 15:21:19 +0000 (17:21 +0200)]
Connect fast-import to the remote-helper via pipe, adding 'bidi-import' capability
The fast-import commands 'cat-blob' and 'ls' can be used by
remote-helpers to retrieve information about blobs and trees that
already exist in fast-import's memory. This requires a channel from
fast-import to the remote-helper.
remote-helpers that use these features shall advertise the new
'bidi-import' capability to signal that they require the communication
channel. When forking fast-import in transport-helper.c connect it to
a dup of the remote-helper's stdin-pipe. The additional file
descriptor is passed to fast-import via its command line
(--cat-blob-fd). It follows that git and fast-import are connected to
the remote-helpers's stdin.
Because git can send multiple commands to the remote-helper on it's
stdin, it is required that helpers that advertise 'bidi-import' buffer
all input commands until the batch of 'import' commands is ended by a
newline before sending data to fast-import. This is to prevent mixing
commands and fast-import responses on the helper's stdin.
Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Florian Achleitner [Wed, 19 Sep 2012 15:21:18 +0000 (17:21 +0200)]
Add argv_array_detach and argv_array_free_detached
Allow detaching of ownership of the argv_array's contents and add a
function to free those detached argv_arrays later.
This makes it possible to use argv_array efficiently with the exiting
struct child_process which only contains a member char **argv.
Add to documentation.
Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Florian Achleitner [Wed, 19 Sep 2012 15:21:17 +0000 (17:21 +0200)]
Add svndump_init_fd to allow reading dumps from arbitrary FDs
The existing function only allows reading from a filename or from
stdin. Allow passing of a FD and an additional FD for the back report
pipe. This allows us to retrieve the name of the pipe in the caller.
Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>