From 082afee621aeb2d3746c8ae290af98823f981f34 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Thu, 26 Apr 2012 21:34:02 +0200 Subject: [PATCH 1/3] git-svn: use platform specific auth providers On Linux, this makes authentication using passwords from gnome-keyring and kwallet work (only the former was tested). On Mac OS X, this allows using the OS X Keychain. Signed-off-by: Matthijs Kooijman Acked-by: Eric Wong --- git-svn.perl | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index f8e9ef0ea6..427da9e7a1 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -5444,7 +5444,7 @@ BEGIN { } sub _auth_providers () { - [ + my @rv = ( SVN::Client::get_simple_provider(), SVN::Client::get_ssl_server_trust_file_provider(), SVN::Client::get_simple_prompt_provider( @@ -5460,7 +5460,23 @@ sub _auth_providers () { \&Git::SVN::Prompt::ssl_server_trust), SVN::Client::get_username_prompt_provider( \&Git::SVN::Prompt::username, 2) - ] + ); + + # earlier 1.6.x versions would segfault, and <= 1.5.x didn't have + # this function + if ($SVN::Core::VERSION gt '1.6.12') { + my $config = SVN::Core::config_get_config($config_dir); + my ($p, @a); + # config_get_config returns all config files from + # ~/.subversion, auth_get_platform_specific_client_providers + # just wants the config "file". + @a = ($config->{'config'}, undef); + $p = SVN::Core::auth_get_platform_specific_client_providers(@a); + # Insert the return value from + # auth_get_platform_specific_providers + unshift @rv, @$p; + } + \@rv; } sub escape_uri_only { From 4c0a89fcde219df8db8fdb9635ef2ef40d002a6e Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 25 Apr 2012 08:00:36 -0400 Subject: [PATCH 2/3] config: expand tildes in include.path variable You can already use relative paths in include.path, which means that including "foo" from your global "~/.gitconfig" will look in your home directory. However, you might want to do something clever like putting "~/.gitconfig-foo" in a specific repository's config file. Signed-off-by: Jeff King Acked-by: Matthieu Moy Signed-off-by: Junio C Hamano --- Documentation/config.txt | 5 ++++- config.c | 6 ++++++ t/t1305-config-include.sh | 8 ++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index c081657be7..e67c8ef369 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -95,7 +95,9 @@ included file is expanded immediately, as if its contents had been found at the location of the include directive. If the value of the `include.path` variable is a relative path, the path is considered to be relative to the configuration file in which the include directive was -found. See below for examples. +found. The value of `include.path` is subject to tilde expansion: `{tilde}/` +is expanded to the value of `$HOME`, and `{tilde}user/` to the specified +user's home directory. See below for examples. Example ~~~~~~~ @@ -122,6 +124,7 @@ Example [include] path = /path/to/foo.inc ; include by absolute path path = foo ; expand "foo" relative to the current file + path = ~/foo ; expand "foo" in your $HOME directory Variables ~~~~~~~~~ diff --git a/config.c b/config.c index 68d32940f3..2bbf02d1e8 100644 --- a/config.c +++ b/config.c @@ -37,6 +37,11 @@ static int handle_path_include(const char *path, struct config_include_data *inc { int ret = 0; struct strbuf buf = STRBUF_INIT; + char *expanded = expand_user_path(path); + + if (!expanded) + return error("Could not expand include path '%s'", path); + path = expanded; /* * Use an absolute path as-is, but interpret relative paths @@ -63,6 +68,7 @@ static int handle_path_include(const char *path, struct config_include_data *inc inc->depth--; } strbuf_release(&buf); + free(expanded); return ret; } diff --git a/t/t1305-config-include.sh b/t/t1305-config-include.sh index 4b1cbaa028..a70707620f 100755 --- a/t/t1305-config-include.sh +++ b/t/t1305-config-include.sh @@ -29,6 +29,14 @@ test_expect_success 'chained relative paths' ' test_cmp expect actual ' +test_expect_success 'include paths get tilde-expansion' ' + echo "[test]one = 1" >one && + echo "[include]path = ~/one" >.gitconfig && + echo 1 >expect && + git config test.one >actual && + test_cmp expect actual +' + test_expect_success 'include options can still be examined' ' echo "[test]one = 1" >one && echo "[include]path = one" >.gitconfig && From 10d4332e007132a38dc61f03c760d355da5cd550 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 29 Apr 2012 18:00:47 -0700 Subject: [PATCH 3/3] The seventh batch of topics graduated to 'master' Signed-off-by: Junio C Hamano --- Documentation/RelNotes/1.7.11.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/RelNotes/1.7.11.txt b/Documentation/RelNotes/1.7.11.txt index af736591d2..429f304972 100644 --- a/Documentation/RelNotes/1.7.11.txt +++ b/Documentation/RelNotes/1.7.11.txt @@ -19,6 +19,9 @@ UI, Workflows & Features variables with REMOTE_USER and REMOTE_ADDR, but these variables are now preserved when set. + * "include.path" mechanism of the configuration files learned to + understand "~/path" and "~user/path". + * "git am" learned the "--include" option, which is an opposite of existing the "--exclude" option. @@ -47,12 +50,19 @@ Foreign Interface * "git svn" used to die with unwanted SIGPIPE when talking with HTTP server that uses keep-alive. + * "git svn" learned to use platform specific authentication + providers, e.g. gnome-keyring, kwallet, etc. + * "git p4" has been moved out of contrib/ area. Performance * "git apply" had some memory leaks plugged. + * "git repack" used to write out unreachable objects as loose objects + when repacking, even if such loose objects will immediately pruned + due to its age. + * Setting up a revision traversal with many starting points was inefficient as these were placed in a date-order priority queue one-by-one. Now they are collected in the queue unordered first, @@ -86,6 +96,12 @@ 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 details). + * The test scaffolding for git-daemon was flaky. + (merge 46e3581 js/daemon-test-race-fix later to maint). + + * The test scaffolding for fast-import was flaky. + (merge 7fb8e16 pw/t5800-import-race-fix later to maint). + * Octopus merge strategy did not reduce heads that are recorded in the final commit correctly. (merge 5802f81 jc/merge-reduce-parents-early later to maint).