mirror of
https://github.com/git-for-windows/git.git
synced 2026-04-11 11:58:26 -05:00
Merge branch 'master' into next
* master: The eighth batch of topics graduated to 'master' git-svn: introduce SVN version comparison function
This commit is contained in:
@@ -6,6 +6,13 @@ Updates since v1.7.10
|
|||||||
|
|
||||||
UI, Workflows & Features
|
UI, Workflows & Features
|
||||||
|
|
||||||
|
* A new mode for push, "simple", which is a cross between "current"
|
||||||
|
and "upstream", has been introduced. "git push" without any refspec
|
||||||
|
will push the current branch out to the same name at the remote
|
||||||
|
repository only when it is set to track the branch with the same
|
||||||
|
name over there. The plan is to make this mode the new default
|
||||||
|
value when push.default is not configured.
|
||||||
|
|
||||||
* A third-party tool "git subtree" is distributed in contrib/
|
* A third-party tool "git subtree" is distributed in contrib/
|
||||||
|
|
||||||
* Error messages given when @{u} is used for a branch without its
|
* Error messages given when @{u} is used for a branch without its
|
||||||
@@ -30,12 +37,18 @@ UI, Workflows & Features
|
|||||||
needed such treatment are now reported to the end user, so that the
|
needed such treatment are now reported to the end user, so that the
|
||||||
result in them can be eyeballed with extra care.
|
result in them can be eyeballed with extra care.
|
||||||
|
|
||||||
|
* The output from "diff/log --stat" used to always allocate 4 columns
|
||||||
|
to show the number of modified lines, but not anymore.
|
||||||
|
|
||||||
* The "fmt-merge-msg" command learns to list the primary contributors
|
* The "fmt-merge-msg" command learns to list the primary contributors
|
||||||
involved in the side topic you are merging.
|
involved in the side topic you are merging.
|
||||||
|
|
||||||
* The cases "git push" fails due to non-ff can be broken into three
|
* The cases "git push" fails due to non-ff can be broken into three
|
||||||
categories; each case is given a separate advise message.
|
categories; each case is given a separate advise message.
|
||||||
|
|
||||||
|
* "git rebase" learned to optionally keep commits that do not
|
||||||
|
introduce any change in the original history.
|
||||||
|
|
||||||
* "git push --recurse-submodules" learned to optionally look into the
|
* "git push --recurse-submodules" learned to optionally look into the
|
||||||
histories of submodules bound to the superproject and push them
|
histories of submodules bound to the superproject and push them
|
||||||
out.
|
out.
|
||||||
@@ -53,9 +66,18 @@ Foreign Interface
|
|||||||
* "git svn" learned to use platform specific authentication
|
* "git svn" learned to use platform specific authentication
|
||||||
providers, e.g. gnome-keyring, kwallet, etc.
|
providers, e.g. gnome-keyring, kwallet, etc.
|
||||||
|
|
||||||
* "git p4" has been moved out of contrib/ area.
|
* "git p4" has been moved out of contrib/ area and has seen more work
|
||||||
|
on importing labels as tags from (and exporting tags as labels to)
|
||||||
|
p4.
|
||||||
|
|
||||||
Performance
|
Performance and Internal Implementation (please report possible regressions)
|
||||||
|
|
||||||
|
* An experimental "version 4" format of the index file has been
|
||||||
|
introduced to reduce on-disk footprint and I/O overhead.
|
||||||
|
|
||||||
|
* The code to compute hash values for lines used by the internal diff
|
||||||
|
engine was optimized on little-endian machines, using the same
|
||||||
|
trick the kernel folks came up with.
|
||||||
|
|
||||||
* "git apply" had some memory leaks plugged.
|
* "git apply" had some memory leaks plugged.
|
||||||
|
|
||||||
@@ -68,8 +90,6 @@ Performance
|
|||||||
one-by-one. Now they are collected in the queue unordered first,
|
one-by-one. Now they are collected in the queue unordered first,
|
||||||
and sorted immediately before getting used.
|
and sorted immediately before getting used.
|
||||||
|
|
||||||
Internal Implementation (please report possible regressions)
|
|
||||||
|
|
||||||
* "git rev-parse --show-prefix" used to emit nothing when run at the
|
* "git rev-parse --show-prefix" used to emit nothing when run at the
|
||||||
top-level of the working tree, but now it gives a blank line.
|
top-level of the working tree, but now it gives a blank line.
|
||||||
|
|
||||||
@@ -96,6 +116,24 @@ Unless otherwise noted, all the fixes since v1.7.10 in the maintenance
|
|||||||
releases are contained in this release (see release notes to them for
|
releases are contained in this release (see release notes to them for
|
||||||
details).
|
details).
|
||||||
|
|
||||||
|
* When using a Perl script on a system where "perl" found on user's
|
||||||
|
$PATH could be ancient or otherwise broken, we allow builders to
|
||||||
|
specify the path to a good copy of Perl with $PERL_PATH. The
|
||||||
|
gitweb test forgot to use that Perl when running its test.
|
||||||
|
(merge 0754e08 jk/maint-gitweb-test-use-sane-perl later to maint).
|
||||||
|
|
||||||
|
* A contrib script "rerere-train" did not work out of the box unless
|
||||||
|
user futzed with her $PATH.
|
||||||
|
(merge 53876fc jc/rerere-train later to maint).
|
||||||
|
|
||||||
|
* "log --graph" was not very friendly with "--stat" option and its
|
||||||
|
output had line breaks at wrong places.
|
||||||
|
(merge bafa16e lp/diffstat-with-graph later to maint).
|
||||||
|
|
||||||
|
* "git config --rename-section" to rename an existing section into a
|
||||||
|
bogus one did not check the new name.
|
||||||
|
(merge 94a35b1 jk/maint-config-bogus-section later to maint).
|
||||||
|
|
||||||
* The test scaffolding for git-daemon was flaky.
|
* The test scaffolding for git-daemon was flaky.
|
||||||
(merge 46e3581 js/daemon-test-race-fix later to maint).
|
(merge 46e3581 js/daemon-test-race-fix later to maint).
|
||||||
|
|
||||||
@@ -136,31 +174,3 @@ details).
|
|||||||
* The "diff --no-index" codepath used limited-length buffers, risking
|
* The "diff --no-index" codepath used limited-length buffers, risking
|
||||||
pathnames getting truncated. Update it to use the strbuf API.
|
pathnames getting truncated. Update it to use the strbuf API.
|
||||||
(merge 875b91b jm/maint-strncpy-diff-no-index later to maint).
|
(merge 875b91b jm/maint-strncpy-diff-no-index later to maint).
|
||||||
|
|
||||||
* The parser in "fast-import" did not diagnose ":9" style references
|
|
||||||
that is not followed by required SP/LF as an error.
|
|
||||||
(merge 06454cb pw/fast-import-dataref-parsing later to maint).
|
|
||||||
|
|
||||||
* When "git fetch" encounters repositories with too many references,
|
|
||||||
the command line of "fetch-pack" that is run by a helper
|
|
||||||
e.g. remote-curl, may fail to hold all of them. Now such an
|
|
||||||
internal invocation can feed the references through the standard
|
|
||||||
input of "fetch-pack".
|
|
||||||
(merge 7103d25 it/fetch-pack-many-refs later to maint).
|
|
||||||
|
|
||||||
* "git fetch" that recurses into submodules on demand did not check
|
|
||||||
if it needs to go into submodules when non branches (most notably,
|
|
||||||
tags) are fetched.
|
|
||||||
(merge a6801ad jl/maint-submodule-recurse-fetch later to maint).
|
|
||||||
|
|
||||||
* "git blame" started missing quite a few changes from the origin
|
|
||||||
since we stopped using the diff minimalization by default in v1.7.2
|
|
||||||
era.
|
|
||||||
(merge 059a500 jc/maint-blame-minimal later to maint).
|
|
||||||
|
|
||||||
* "log -p --graph" used with "--stat" had a few formatting error.
|
|
||||||
(merge e2c5966 lp/maint-diff-three-dash-with-graph later to maint).
|
|
||||||
|
|
||||||
* Giving "--continue" to a conflicted "rebase -i" session skipped a
|
|
||||||
commit that only results in changes to submodules.
|
|
||||||
(merge a6754cd jk/rebase-i-submodule-conflict-only later to maint).
|
|
||||||
|
|||||||
32
git-svn.perl
32
git-svn.perl
@@ -41,11 +41,28 @@ sub fatal (@) { print STDERR "@_\n"; exit 1 }
|
|||||||
# repository decides to close the connection which we expect to be kept alive.
|
# repository decides to close the connection which we expect to be kept alive.
|
||||||
$SIG{PIPE} = 'IGNORE';
|
$SIG{PIPE} = 'IGNORE';
|
||||||
|
|
||||||
|
# Given a dot separated version number, "subtract" it from
|
||||||
|
# the SVN::Core::VERSION; non-negaitive return means the SVN::Core
|
||||||
|
# is at least at the version the caller asked for.
|
||||||
|
sub compare_svn_version {
|
||||||
|
my (@ours) = split(/\./, $SVN::Core::VERSION);
|
||||||
|
my (@theirs) = split(/\./, $_[0]);
|
||||||
|
my ($i, $diff);
|
||||||
|
|
||||||
|
for ($i = 0; $i < @ours && $i < @theirs; $i++) {
|
||||||
|
$diff = $ours[$i] - $theirs[$i];
|
||||||
|
return $diff if ($diff);
|
||||||
|
}
|
||||||
|
return 1 if ($i < @ours);
|
||||||
|
return -1 if ($i < @theirs);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
sub _req_svn {
|
sub _req_svn {
|
||||||
require SVN::Core; # use()-ing this causes segfaults for me... *shrug*
|
require SVN::Core; # use()-ing this causes segfaults for me... *shrug*
|
||||||
require SVN::Ra;
|
require SVN::Ra;
|
||||||
require SVN::Delta;
|
require SVN::Delta;
|
||||||
if ($SVN::Core::VERSION lt '1.1.0') {
|
if (::compare_svn_version('1.1.0') < 0) {
|
||||||
fatal "Need SVN::Core 1.1.0 or better (got $SVN::Core::VERSION)";
|
fatal "Need SVN::Core 1.1.0 or better (got $SVN::Core::VERSION)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1474,7 +1491,7 @@ sub cmd_info {
|
|||||||
}
|
}
|
||||||
::_req_svn();
|
::_req_svn();
|
||||||
$result .= "Repository UUID: $uuid\n" unless $diff_status eq "A" &&
|
$result .= "Repository UUID: $uuid\n" unless $diff_status eq "A" &&
|
||||||
($SVN::Core::VERSION le '1.5.4' || $file_type ne "dir");
|
(::compare_svn_version('1.5.4') <= 0 || $file_type ne "dir");
|
||||||
$result .= "Revision: " . ($diff_status eq "A" ? 0 : $rev) . "\n";
|
$result .= "Revision: " . ($diff_status eq "A" ? 0 : $rev) . "\n";
|
||||||
|
|
||||||
$result .= "Node Kind: " .
|
$result .= "Node Kind: " .
|
||||||
@@ -5464,7 +5481,7 @@ sub _auth_providers () {
|
|||||||
|
|
||||||
# earlier 1.6.x versions would segfault, and <= 1.5.x didn't have
|
# earlier 1.6.x versions would segfault, and <= 1.5.x didn't have
|
||||||
# this function
|
# this function
|
||||||
if ($SVN::Core::VERSION gt '1.6.12') {
|
if (::compare_svn_version('1.6.12') > 0) {
|
||||||
my $config = SVN::Core::config_get_config($config_dir);
|
my $config = SVN::Core::config_get_config($config_dir);
|
||||||
my ($p, @a);
|
my ($p, @a);
|
||||||
# config_get_config returns all config files from
|
# config_get_config returns all config files from
|
||||||
@@ -5623,7 +5640,7 @@ sub get_log {
|
|||||||
# drop it. Therefore, the receiver callback passed to it
|
# drop it. Therefore, the receiver callback passed to it
|
||||||
# is made aware of this limitation by being wrapped if
|
# is made aware of this limitation by being wrapped if
|
||||||
# the limit passed to is being wrapped.
|
# the limit passed to is being wrapped.
|
||||||
if ($SVN::Core::VERSION le '1.2.0') {
|
if (::compare_svn_version('1.2.0') <= 0) {
|
||||||
my $limit = splice(@args, 3, 1);
|
my $limit = splice(@args, 3, 1);
|
||||||
if ($limit > 0) {
|
if ($limit > 0) {
|
||||||
my $receiver = pop @args;
|
my $receiver = pop @args;
|
||||||
@@ -5655,7 +5672,8 @@ sub trees_match {
|
|||||||
|
|
||||||
sub get_commit_editor {
|
sub get_commit_editor {
|
||||||
my ($self, $log, $cb, $pool) = @_;
|
my ($self, $log, $cb, $pool) = @_;
|
||||||
my @lock = $SVN::Core::VERSION ge '1.2.0' ? (undef, 0) : ();
|
|
||||||
|
my @lock = (::compare_svn_version('1.2.0') >= 0) ? (undef, 0) : ();
|
||||||
$self->SUPER::get_commit_editor($log, $cb, @lock, $pool);
|
$self->SUPER::get_commit_editor($log, $cb, @lock, $pool);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5673,7 +5691,7 @@ sub gs_do_update {
|
|||||||
my (@pc) = split m#/#, $path;
|
my (@pc) = split m#/#, $path;
|
||||||
my $reporter = $self->do_update($rev_b, (@pc ? shift @pc : ''),
|
my $reporter = $self->do_update($rev_b, (@pc ? shift @pc : ''),
|
||||||
1, $editor, $pool);
|
1, $editor, $pool);
|
||||||
my @lock = $SVN::Core::VERSION ge '1.2.0' ? (undef) : ();
|
my @lock = (::compare_svn_version('1.2.0') >= 0) ? (undef) : ();
|
||||||
|
|
||||||
# Since we can't rely on svn_ra_reparent being available, we'll
|
# Since we can't rely on svn_ra_reparent being available, we'll
|
||||||
# just have to do some magic with set_path to make it so
|
# just have to do some magic with set_path to make it so
|
||||||
@@ -5723,7 +5741,7 @@ sub gs_do_switch {
|
|||||||
$ra ||= $self;
|
$ra ||= $self;
|
||||||
$url_b = escape_url($url_b);
|
$url_b = escape_url($url_b);
|
||||||
my $reporter = $ra->do_switch($rev_b, '', 1, $url_b, $editor, $pool);
|
my $reporter = $ra->do_switch($rev_b, '', 1, $url_b, $editor, $pool);
|
||||||
my @lock = $SVN::Core::VERSION ge '1.2.0' ? (undef) : ();
|
my @lock = (::compare_svn_version('1.2.0') >= 0) ? (undef) : ();
|
||||||
$reporter->set_path('', $rev_a, 0, @lock, $pool);
|
$reporter->set_path('', $rev_a, 0, @lock, $pool);
|
||||||
$reporter->finish_report($pool);
|
$reporter->finish_report($pool);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user