* Re: [PATCH] Submodules always use a relative path to gitdir
From: Junio C Hamano @ 2012-01-03 22:17 UTC (permalink / raw)
To: Jens Lehmann; +Cc: Antony Male, git, iveqy
In-Reply-To: <4F037CBF.9010005@web.de>
Jens Lehmann <Jens.Lehmann@web.de> writes:
> Not if we would implement a "if no worktree is set but we came here via
> a gitfile, then take the directory the gitfile was found in as worktree"
> heuristic. And that heuristic looks quite sane to me, as a gitfile can
> only be found in a work tree, or am I missing something obvious here?
Like it wouldn't work without changes to the core side?
^ permalink raw reply
* Re: [PATCH 1/2] git-svn, perl/Git.pm: add central method for prompting passwords honoring GIT_ASKPASS and SSH_ASKPASS
From: Junio C Hamano @ 2012-01-03 22:51 UTC (permalink / raw)
To: Ævar Arnfjörð Bjarmason
Cc: Sven Strickroth, git, Jakub Narebski, Jeff King
In-Reply-To: <CACBZZX7P9PEq0wZp0d3dSwDjF6J6Z3cO4VtWc9_frBengtqPLw@mail.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> On Wed, Dec 28, 2011 at 01:11, Sven Strickroth
> <sven.strickroth@tu-clausthal.de> wrote:
>
> Nom nom, some Perl. Thanks for tackling this. Reviewing it as
> requested by Junio.
>
As I'd like to have this in 1.7.9-rc-something, here is my attempt to
rewrite the patch based on your comments, modulo the "chomp()" bit, to
expedite the cycle. Major fixes are:
* make "prompt" just a helper subroutine. It does not have to be tied to
any particular repository object anyway.
* Move the "ah, the environment is there but the value is not set to
anything sensible" logic from the caller "prompt" to the helper
"_prompt". For now, forget about an executable whose name is "0" for
simplicity.
* Do so using Perl-ish idiom "return unless ($foo)" to avoid potential
issues with callers who might call it in the list context (I do not
think it is reasonable to call "prompt" in the list context to begin
with, though. It is not like the function is to return a list of zero
or more answers, in which case "@answers = function()" makes
sense. This is "ask to get a single answer" interface).
* "open ... or return", not "||".
Sven, does it look agreeable? And more importantly, does it still work? ;-)
Thanks.
git-svn.perl | 20 +-------------------
perl/Git.pm | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 51 insertions(+), 20 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index e30df22..6a01176 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -4415,25 +4415,7 @@ sub username {
sub _read_password {
my ($prompt, $realm) = @_;
- my $password = '';
- if (exists $ENV{GIT_ASKPASS}) {
- open(PH, "-|", $ENV{GIT_ASKPASS}, $prompt);
- $password = <PH>;
- $password =~ s/[\012\015]//; # \n\r
- close(PH);
- } else {
- print STDERR $prompt;
- STDERR->flush;
- require Term::ReadKey;
- Term::ReadKey::ReadMode('noecho');
- while (defined(my $key = Term::ReadKey::ReadKey(0))) {
- last if $key =~ /[\012\015]/; # \n\r
- $password .= $key;
- }
- Term::ReadKey::ReadMode('restore');
- print STDERR "\n";
- STDERR->flush;
- }
+ my $password = Git::prompt($prompt);
$password;
}
diff --git a/perl/Git.pm b/perl/Git.pm
index f7ce511..abf9de9 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -58,7 +58,7 @@ require Exporter;
command_output_pipe command_input_pipe command_close_pipe
command_bidi_pipe command_close_bidi_pipe
version exec_path html_path hash_object git_cmd_try
- remote_refs
+ remote_refs prompt
temp_acquire temp_release temp_reset temp_path);
@@ -512,6 +512,55 @@ C<git --html-path>). Useful mostly only internally.
sub html_path { command_oneline('--html-path') }
+=item prompt ( PROMPT )
+
+Query user C<PROMPT> and return answer from user.
+
+If an external helper is specified via GIT_ASKPASS or SSH_ASKPASS, it
+is used to interact with the user; otherwise the prompt is given to
+and the answer is read from the terminal.
+
+=cut
+
+sub prompt {
+ my ($prompt) = @_;
+ my $ret;
+ if (!defined $ret) {
+ $ret = _prompt($ENV{'GIT_ASKPASS'}, $prompt);
+ }
+ if (!defined $ret) {
+ $ret = _prompt($ENV{'SSH_ASKPASS'}, $prompt);
+ }
+ if (!defined $ret) {
+ $ret = '';
+ print STDERR $prompt;
+ STDERR->flush;
+ require Term::ReadKey;
+ Term::ReadKey::ReadMode('noecho');
+ while (defined(my $key = Term::ReadKey::ReadKey(0))) {
+ last if $key =~ /[\012\015]/; # \n\r
+ $ret .= $key;
+ }
+ Term::ReadKey::ReadMode('restore');
+ print STDERR "\n";
+ STDERR->flush;
+ }
+ return $ret;
+}
+
+sub _prompt {
+ my ($askpass, $prompt) = @_;
+ return unless ($askpass);
+
+ open my $fh, "-|", $askpass, $prompt
+ or return;
+ my $ret = <$fh>;
+ $ret =~ s/[\012\015]//g; # \n\r
+ close ($fh);
+ return $ret;
+}
+
+
=item repo_path ()
Return path to the git repository. Must be called on a repository instance.
^ permalink raw reply related
* Re: [PATCH 2/2] git-svn, perl/Git.pm: extend and use Git->prompt method for querying users
From: Sven Strickroth @ 2012-01-03 23:24 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git, Jeff King, Jakub Narebski
In-Reply-To: <7vzke4vebl.fsf@alter.siamese.dyndns.org>
git-svn reads usernames and other user queries from an interactive
terminal. This cause GUIs (w/o STDIN connected) to hang waiting forever
for git-svn to complete (http://code.google.com/p/tortoisegit/issues/detail?id=967).
git-core already asks for username using *_ASKPASS tools, this commit
also enables git-svn to do so.
This change extends the Git::prompt method, so that it can also be used
for non password queries (e.g. usernames), and makes use of it instead
of using hand-rolled prompt-response code that only works with the
interactive terminal.
Signed-off-by: Sven Strickroth <email@cs-ware.de>
---
git-svn.perl | 19 ++++++++-----------
perl/Git.pm | 27 ++++++++++++++++-----------
2 files changed, 24 insertions(+), 22 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index ade88ae..be713f5 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -4356,17 +4356,16 @@ sub ssl_server_trust {
map $cert_info->$_, qw(hostname valid_from valid_until
issuer_dname fingerprint);
my $choice;
-prompt:
- print STDERR $may_save ?
+ my $options = $may_save ?
"(R)eject, accept (t)emporarily or accept (p)ermanently? " :
"(R)eject or accept (t)emporarily? ";
- STDERR->flush;
- $choice = lc(substr(<STDIN> || 'R', 0, 1));
- if ($choice =~ /^t$/i) {
+prompt:
+ $choice = lc(substr(Git::prompt($options) || 'R', 0, 1));
+ if ($choice eq 't') {
$cred->may_save(undef);
- } elsif ($choice =~ /^r$/i) {
+ } elsif ($choice eq 'r') {
return -1;
- } elsif ($may_save && $choice =~ /^p$/i) {
+ } elsif ($may_save && $choice eq 'p') {
$cred->may_save($may_save);
} else {
goto prompt;
@@ -4404,9 +4403,7 @@ sub username {
if (defined $_username) {
$username = $_username;
} else {
- print STDERR "Username: ";
- STDERR->flush;
- chomp($username = <STDIN>);
+ $username = Git::prompt("Username: ");
}
$cred->username($username);
$cred->may_save($may_save);
@@ -4415,7 +4412,7 @@ sub username {
sub _read_password {
my ($prompt, $realm) = @_;
- my $password = Git::prompt($prompt);
+ my $password = Git::prompt($prompt, 1);
$password;
}
diff --git a/perl/Git.pm b/perl/Git.pm
index 46f11a8..33e68c4 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -512,18 +512,19 @@ C<git --html-path>). Useful mostly only internally.
sub html_path { command_oneline('--html-path') }
-=item prompt ( PROMPT )
+=item prompt ( PROMPT , ISPASSWORD )
Query user C<PROMPT> and return answer from user.
If an external helper is specified via GIT_ASKPASS or SSH_ASKPASS, it
is used to interact with the user; otherwise the prompt is given to
and the answer is read from the terminal.
+If C<ISPASSWORD> is true, the terminal disables echo.
=cut
sub prompt {
- my ($prompt) = @_;
+ my ($prompt, $isPassword) = @_;
my $ret;
if (!defined $ret) {
$ret = _prompt($ENV{'GIT_ASKPASS'}, $prompt);
@@ -532,18 +533,22 @@ sub prompt {
$ret = _prompt($ENV{'SSH_ASKPASS'}, $prompt);
}
if (!defined $ret) {
- $ret = '';
print STDERR $prompt;
STDERR->flush;
- require Term::ReadKey;
- Term::ReadKey::ReadMode('noecho');
- while (defined(my $key = Term::ReadKey::ReadKey(0))) {
- last if $key =~ /[\012\015]/; # \n\r
- $ret .= $key;
+ if ($isPassword) {
+ $ret = '';
+ require Term::ReadKey;
+ Term::ReadKey::ReadMode('noecho');
+ while (defined(my $key = Term::ReadKey::ReadKey(0))) {
+ last if $key =~ /[\012\015]/; # \n\r
+ $ret .= $key;
+ }
+ Term::ReadKey::ReadMode('restore');
+ print STDERR "\n";
+ STDERR->flush;
+ } else {
+ chomp($ret = <STDIN>);
}
- Term::ReadKey::ReadMode('restore');
- print STDERR "\n";
- STDERR->flush;
}
return $ret;
}
--
1.7.8.msysgit.0
^ permalink raw reply related
* Re: [PATCH 1/2] git-svn, perl/Git.pm: add central method for prompting passwords honoring GIT_ASKPASS and SSH_ASKPASS
From: Sven Strickroth @ 2012-01-03 23:27 UTC (permalink / raw)
To: Junio C Hamano
Cc: Ævar Arnfjörð Bjarmason, git, Jakub Narebski,
Jeff King
In-Reply-To: <7vboqks8la.fsf@alter.siamese.dyndns.org>
Am 03.01.2012 23:51 schrieb Junio C Hamano:
> Sven, does it look agreeable? And more importantly, does it still work? ;-)
Works for me :)
I also updated my second patch minutes ago to fit onto the new patch
(w/o the filename stuff).
--
Best regards,
Sven Strickroth
ClamAV, a GPL anti-virus toolkit http://www.clamav.net
PGP key id F5A9D4C4 @ any key-server
^ permalink raw reply
* Re: [PATCH] write first for-merge ref to FETCH_HEAD first
From: Junio C Hamano @ 2012-01-03 23:57 UTC (permalink / raw)
To: Joey Hess; +Cc: git
In-Reply-To: <7v1urp97mp.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Joey Hess <joey@kitenet.net> writes:
>
>> The FETCH_HEAD refname is supposed to refer to the ref that was fetched
>> and should be merged. However all fetched refs are written to
>> .git/FETCH_HEAD in an arbitrary order, and resolve_ref_unsafe simply
>> takes the first ref as the FETCH_HEAD, which is often the wrong one,
>> when other branches were also fetched.
>>
>> The solution is to write the for-merge ref(s) to FETCH_HEAD first.
>> ...
>
> Sign-off?
Ping? I think this is a good change to go in before 1.7.9.
The change broke quite a lot of tests, and I think I've fixed them all.
-- >8 --
From: Joey Hess <joey@kitenet.net>
Date: Mon, 26 Dec 2011 12:16:56 -0400
Subject: [PATCH] write first for-merge ref to FETCH_HEAD first
The FETCH_HEAD refname is supposed to refer to the ref that was fetched
and should be merged. However all fetched refs are written to
.git/FETCH_HEAD in an arbitrary order, and resolve_ref_unsafe simply
takes the first ref as the FETCH_HEAD, which is often the wrong one,
when other branches were also fetched.
The solution is to write the for-merge ref(s) to FETCH_HEAD first.
Then, unless --append is used, the FETCH_HEAD refname behaves as intended.
If the user uses --append, they presumably are doing so in order to
preserve the old FETCH_HEAD.
While we are at it, update an old example in the read-tree documentation
that implied that each entry in FETCH_HEAD only has the object name, which
is not true for quite a while.
---
Documentation/git-read-tree.txt | 2 +-
builtin/fetch.c | 160 +++++++++++---------
t/t5510-fetch.sh | 2 +-
t/t5515/fetch.br-branches-default-merge | 2 +-
...etch.br-branches-default-merge_branches-default | 2 +-
t/t5515/fetch.br-branches-default-octopus | 2 +-
...ch.br-branches-default-octopus_branches-default | 2 +-
t/t5515/fetch.br-branches-one-merge | 2 +-
t/t5515/fetch.br-branches-one-merge_branches-one | 2 +-
t/t5515/fetch.br-config-explicit-merge | 2 +-
.../fetch.br-config-explicit-merge_config-explicit | 2 +-
t/t5515/fetch.br-config-explicit-octopus | 2 +-
...etch.br-config-explicit-octopus_config-explicit | 2 +-
t/t5515/fetch.br-config-glob-merge | 2 +-
t/t5515/fetch.br-config-glob-merge_config-glob | 2 +-
t/t5515/fetch.br-config-glob-octopus | 4 +-
t/t5515/fetch.br-config-glob-octopus_config-glob | 4 +-
t/t5515/fetch.br-remote-explicit-merge | 2 +-
.../fetch.br-remote-explicit-merge_remote-explicit | 2 +-
t/t5515/fetch.br-remote-explicit-octopus | 2 +-
...etch.br-remote-explicit-octopus_remote-explicit | 2 +-
t/t5515/fetch.br-remote-glob-merge | 2 +-
t/t5515/fetch.br-remote-glob-merge_remote-glob | 2 +-
t/t5515/fetch.br-remote-glob-octopus | 4 +-
t/t5515/fetch.br-remote-glob-octopus_remote-glob | 4 +-
25 files changed, 114 insertions(+), 102 deletions(-)
diff --git a/Documentation/git-read-tree.txt b/Documentation/git-read-tree.txt
index 5375549..2d3ff23 100644
--- a/Documentation/git-read-tree.txt
+++ b/Documentation/git-read-tree.txt
@@ -342,7 +342,7 @@ since you pulled from him:
----------------
$ git fetch git://.... linus
-$ LT=`cat .git/FETCH_HEAD`
+$ LT=`git rev-parse FETCH_HEAD`
----------------
Your work tree is still based on your HEAD ($JC), but you have
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 33ad3aa..0481c16 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -377,6 +377,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
const char *what, *kind;
struct ref *rm;
char *url, *filename = dry_run ? "/dev/null" : git_path("FETCH_HEAD");
+ int want_merge;
fp = fopen(filename, "a");
if (!fp)
@@ -393,84 +394,95 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
goto abort;
}
- for (rm = ref_map; rm; rm = rm->next) {
- struct ref *ref = NULL;
-
- if (rm->peer_ref) {
- ref = xcalloc(1, sizeof(*ref) + strlen(rm->peer_ref->name) + 1);
- strcpy(ref->name, rm->peer_ref->name);
- hashcpy(ref->old_sha1, rm->peer_ref->old_sha1);
- hashcpy(ref->new_sha1, rm->old_sha1);
- ref->force = rm->peer_ref->force;
- }
+ /*
+ * The first pass writes objects to be merged and then the
+ * second pass writes the rest, in order to allow using
+ * FETCH_HEAD as a refname to refer to the ref to be merged.
+ */
+ for (want_merge = 1; 0 <= want_merge; want_merge--) {
+ for (rm = ref_map; rm; rm = rm->next) {
+ struct ref *ref = NULL;
+
+ commit = lookup_commit_reference_gently(rm->old_sha1, 1);
+ if (!commit)
+ rm->merge = 0;
+
+ if (rm->merge != want_merge)
+ continue;
+
+ if (rm->peer_ref) {
+ ref = xcalloc(1, sizeof(*ref) + strlen(rm->peer_ref->name) + 1);
+ strcpy(ref->name, rm->peer_ref->name);
+ hashcpy(ref->old_sha1, rm->peer_ref->old_sha1);
+ hashcpy(ref->new_sha1, rm->old_sha1);
+ ref->force = rm->peer_ref->force;
+ }
- commit = lookup_commit_reference_gently(rm->old_sha1, 1);
- if (!commit)
- rm->merge = 0;
- if (!strcmp(rm->name, "HEAD")) {
- kind = "";
- what = "";
- }
- else if (!prefixcmp(rm->name, "refs/heads/")) {
- kind = "branch";
- what = rm->name + 11;
- }
- else if (!prefixcmp(rm->name, "refs/tags/")) {
- kind = "tag";
- what = rm->name + 10;
- }
- else if (!prefixcmp(rm->name, "refs/remotes/")) {
- kind = "remote-tracking branch";
- what = rm->name + 13;
- }
- else {
- kind = "";
- what = rm->name;
- }
+ if (!strcmp(rm->name, "HEAD")) {
+ kind = "";
+ what = "";
+ }
+ else if (!prefixcmp(rm->name, "refs/heads/")) {
+ kind = "branch";
+ what = rm->name + 11;
+ }
+ else if (!prefixcmp(rm->name, "refs/tags/")) {
+ kind = "tag";
+ what = rm->name + 10;
+ }
+ else if (!prefixcmp(rm->name, "refs/remotes/")) {
+ kind = "remote-tracking branch";
+ what = rm->name + 13;
+ }
+ else {
+ kind = "";
+ what = rm->name;
+ }
- url_len = strlen(url);
- for (i = url_len - 1; url[i] == '/' && 0 <= i; i--)
- ;
- url_len = i + 1;
- if (4 < i && !strncmp(".git", url + i - 3, 4))
- url_len = i - 3;
-
- strbuf_reset(¬e);
- if (*what) {
- if (*kind)
- strbuf_addf(¬e, "%s ", kind);
- strbuf_addf(¬e, "'%s' of ", what);
- }
- fprintf(fp, "%s\t%s\t%s",
- sha1_to_hex(rm->old_sha1),
- rm->merge ? "" : "not-for-merge",
- note.buf);
- for (i = 0; i < url_len; ++i)
- if ('\n' == url[i])
- fputs("\\n", fp);
- else
- fputc(url[i], fp);
- fputc('\n', fp);
-
- strbuf_reset(¬e);
- if (ref) {
- rc |= update_local_ref(ref, what, ¬e);
- free(ref);
- } else
- strbuf_addf(¬e, "* %-*s %-*s -> FETCH_HEAD",
- TRANSPORT_SUMMARY_WIDTH,
- *kind ? kind : "branch",
- REFCOL_WIDTH,
- *what ? what : "HEAD");
- if (note.len) {
- if (verbosity >= 0 && !shown_url) {
- fprintf(stderr, _("From %.*s\n"),
- url_len, url);
- shown_url = 1;
+ url_len = strlen(url);
+ for (i = url_len - 1; url[i] == '/' && 0 <= i; i--)
+ ;
+ url_len = i + 1;
+ if (4 < i && !strncmp(".git", url + i - 3, 4))
+ url_len = i - 3;
+
+ strbuf_reset(¬e);
+ if (*what) {
+ if (*kind)
+ strbuf_addf(¬e, "%s ", kind);
+ strbuf_addf(¬e, "'%s' of ", what);
+ }
+ fprintf(fp, "%s\t%s\t%s",
+ sha1_to_hex(rm->old_sha1),
+ rm->merge ? "" : "not-for-merge",
+ note.buf);
+ for (i = 0; i < url_len; ++i)
+ if ('\n' == url[i])
+ fputs("\\n", fp);
+ else
+ fputc(url[i], fp);
+ fputc('\n', fp);
+
+ strbuf_reset(¬e);
+ if (ref) {
+ rc |= update_local_ref(ref, what, ¬e);
+ free(ref);
+ } else
+ strbuf_addf(¬e, "* %-*s %-*s -> FETCH_HEAD",
+ TRANSPORT_SUMMARY_WIDTH,
+ *kind ? kind : "branch",
+ REFCOL_WIDTH,
+ *what ? what : "HEAD");
+ if (note.len) {
+ if (verbosity >= 0 && !shown_url) {
+ fprintf(stderr, _("From %.*s\n"),
+ url_len, url);
+ shown_url = 1;
+ }
+ if (verbosity >= 0)
+ fprintf(stderr, " %s\n", note.buf);
}
- if (verbosity >= 0)
- fprintf(stderr, " %s\n", note.buf);
}
}
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index e88dbd5..79ee913 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -70,8 +70,8 @@ test_expect_success "fetch test for-merge" '
master_in_two=`cd ../two && git rev-parse master` &&
one_in_two=`cd ../two && git rev-parse one` &&
{
- echo "$master_in_two not-for-merge"
echo "$one_in_two "
+ echo "$master_in_two not-for-merge"
} >expected &&
cut -f -2 .git/FETCH_HEAD >actual &&
test_cmp expected actual'
diff --git a/t/t5515/fetch.br-branches-default-merge b/t/t5515/fetch.br-branches-default-merge
index e3a41ae..12ab08e 100644
--- a/t/t5515/fetch.br-branches-default-merge
+++ b/t/t5515/fetch.br-branches-default-merge
@@ -1,6 +1,6 @@
# br-branches-default-merge
-754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
0567da4d5edd2ff4bb292a465ba9e64dcad9536b branch 'three' of ../
+754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
22feea448b023a2d864ef94b013735af34d238ba not-for-merge tag 'tag-one-tree' of ../
diff --git a/t/t5515/fetch.br-branches-default-merge_branches-default b/t/t5515/fetch.br-branches-default-merge_branches-default
index 1f60561..5442752 100644
--- a/t/t5515/fetch.br-branches-default-merge_branches-default
+++ b/t/t5515/fetch.br-branches-default-merge_branches-default
@@ -1,6 +1,6 @@
# br-branches-default-merge branches-default
-754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
0567da4d5edd2ff4bb292a465ba9e64dcad9536b branch 'three' of ../
+754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
22feea448b023a2d864ef94b013735af34d238ba not-for-merge tag 'tag-one-tree' of ../
diff --git a/t/t5515/fetch.br-branches-default-octopus b/t/t5515/fetch.br-branches-default-octopus
index f31e1b3..498a761 100644
--- a/t/t5515/fetch.br-branches-default-octopus
+++ b/t/t5515/fetch.br-branches-default-octopus
@@ -1,7 +1,7 @@
# br-branches-default-octopus
-754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 branch 'one' of ../
6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 branch 'two' of ../
+754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
22feea448b023a2d864ef94b013735af34d238ba not-for-merge tag 'tag-one-tree' of ../
diff --git a/t/t5515/fetch.br-branches-default-octopus_branches-default b/t/t5515/fetch.br-branches-default-octopus_branches-default
index 7060bd9..0857f13 100644
--- a/t/t5515/fetch.br-branches-default-octopus_branches-default
+++ b/t/t5515/fetch.br-branches-default-octopus_branches-default
@@ -1,7 +1,7 @@
# br-branches-default-octopus branches-default
-754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 branch 'one' of ../
6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 branch 'two' of ../
+754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
22feea448b023a2d864ef94b013735af34d238ba not-for-merge tag 'tag-one-tree' of ../
diff --git a/t/t5515/fetch.br-branches-one-merge b/t/t5515/fetch.br-branches-one-merge
index aa1c8a9..54a7742 100644
--- a/t/t5515/fetch.br-branches-one-merge
+++ b/t/t5515/fetch.br-branches-one-merge
@@ -1,6 +1,6 @@
# br-branches-one-merge
-8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge branch 'one' of ../
0567da4d5edd2ff4bb292a465ba9e64dcad9536b branch 'three' of ../
+8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge branch 'one' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
22feea448b023a2d864ef94b013735af34d238ba not-for-merge tag 'tag-one-tree' of ../
diff --git a/t/t5515/fetch.br-branches-one-merge_branches-one b/t/t5515/fetch.br-branches-one-merge_branches-one
index c93310a..b4d1bb0 100644
--- a/t/t5515/fetch.br-branches-one-merge_branches-one
+++ b/t/t5515/fetch.br-branches-one-merge_branches-one
@@ -1,6 +1,6 @@
# br-branches-one-merge branches-one
-8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge branch 'one' of ../
0567da4d5edd2ff4bb292a465ba9e64dcad9536b branch 'three' of ../
+8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge branch 'one' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
22feea448b023a2d864ef94b013735af34d238ba not-for-merge tag 'tag-one-tree' of ../
diff --git a/t/t5515/fetch.br-config-explicit-merge b/t/t5515/fetch.br-config-explicit-merge
index f6475b7..5ce764a 100644
--- a/t/t5515/fetch.br-config-explicit-merge
+++ b/t/t5515/fetch.br-config-explicit-merge
@@ -1,8 +1,8 @@
# br-config-explicit-merge
+0567da4d5edd2ff4bb292a465ba9e64dcad9536b branch 'three' of ../
754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge branch 'one' of ../
6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 not-for-merge branch 'two' of ../
-0567da4d5edd2ff4bb292a465ba9e64dcad9536b branch 'three' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
22feea448b023a2d864ef94b013735af34d238ba not-for-merge tag 'tag-one-tree' of ../
diff --git a/t/t5515/fetch.br-config-explicit-merge_config-explicit b/t/t5515/fetch.br-config-explicit-merge_config-explicit
index 018bdd7..b1152b7 100644
--- a/t/t5515/fetch.br-config-explicit-merge_config-explicit
+++ b/t/t5515/fetch.br-config-explicit-merge_config-explicit
@@ -1,8 +1,8 @@
# br-config-explicit-merge config-explicit
+0567da4d5edd2ff4bb292a465ba9e64dcad9536b branch 'three' of ../
754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge branch 'one' of ../
6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 not-for-merge branch 'two' of ../
-0567da4d5edd2ff4bb292a465ba9e64dcad9536b branch 'three' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
22feea448b023a2d864ef94b013735af34d238ba not-for-merge tag 'tag-one-tree' of ../
diff --git a/t/t5515/fetch.br-config-explicit-octopus b/t/t5515/fetch.br-config-explicit-octopus
index 36d0270..110577b 100644
--- a/t/t5515/fetch.br-config-explicit-octopus
+++ b/t/t5515/fetch.br-config-explicit-octopus
@@ -1,7 +1,7 @@
# br-config-explicit-octopus
-754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 branch 'one' of ../
6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 branch 'two' of ../
+754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
0567da4d5edd2ff4bb292a465ba9e64dcad9536b not-for-merge branch 'three' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
diff --git a/t/t5515/fetch.br-config-explicit-octopus_config-explicit b/t/t5515/fetch.br-config-explicit-octopus_config-explicit
index 6654ad0..a29dd8b 100644
--- a/t/t5515/fetch.br-config-explicit-octopus_config-explicit
+++ b/t/t5515/fetch.br-config-explicit-octopus_config-explicit
@@ -1,7 +1,7 @@
# br-config-explicit-octopus config-explicit
-754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 branch 'one' of ../
6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 branch 'two' of ../
+754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
0567da4d5edd2ff4bb292a465ba9e64dcad9536b not-for-merge branch 'three' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
diff --git a/t/t5515/fetch.br-config-glob-merge b/t/t5515/fetch.br-config-glob-merge
index 8bb5e8b..89f2596 100644
--- a/t/t5515/fetch.br-config-glob-merge
+++ b/t/t5515/fetch.br-config-glob-merge
@@ -1,7 +1,7 @@
# br-config-glob-merge
+0567da4d5edd2ff4bb292a465ba9e64dcad9536b branch 'three' of ../
754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge branch 'one' of ../
-0567da4d5edd2ff4bb292a465ba9e64dcad9536b branch 'three' of ../
6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 not-for-merge branch 'two' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
diff --git a/t/t5515/fetch.br-config-glob-merge_config-glob b/t/t5515/fetch.br-config-glob-merge_config-glob
index 113c08d..2ba4832 100644
--- a/t/t5515/fetch.br-config-glob-merge_config-glob
+++ b/t/t5515/fetch.br-config-glob-merge_config-glob
@@ -1,7 +1,7 @@
# br-config-glob-merge config-glob
+0567da4d5edd2ff4bb292a465ba9e64dcad9536b branch 'three' of ../
754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge branch 'one' of ../
-0567da4d5edd2ff4bb292a465ba9e64dcad9536b branch 'three' of ../
6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 not-for-merge branch 'two' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
diff --git a/t/t5515/fetch.br-config-glob-octopus b/t/t5515/fetch.br-config-glob-octopus
index 9bbd537..64994df 100644
--- a/t/t5515/fetch.br-config-glob-octopus
+++ b/t/t5515/fetch.br-config-glob-octopus
@@ -1,8 +1,8 @@
# br-config-glob-octopus
-754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 branch 'one' of ../
-0567da4d5edd2ff4bb292a465ba9e64dcad9536b not-for-merge branch 'three' of ../
6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 branch 'two' of ../
+754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
+0567da4d5edd2ff4bb292a465ba9e64dcad9536b not-for-merge branch 'three' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
22feea448b023a2d864ef94b013735af34d238ba not-for-merge tag 'tag-one-tree' of ../
diff --git a/t/t5515/fetch.br-config-glob-octopus_config-glob b/t/t5515/fetch.br-config-glob-octopus_config-glob
index 4e51043..681a725 100644
--- a/t/t5515/fetch.br-config-glob-octopus_config-glob
+++ b/t/t5515/fetch.br-config-glob-octopus_config-glob
@@ -1,8 +1,8 @@
# br-config-glob-octopus config-glob
-754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 branch 'one' of ../
-0567da4d5edd2ff4bb292a465ba9e64dcad9536b not-for-merge branch 'three' of ../
6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 branch 'two' of ../
+754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
+0567da4d5edd2ff4bb292a465ba9e64dcad9536b not-for-merge branch 'three' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
22feea448b023a2d864ef94b013735af34d238ba not-for-merge tag 'tag-one-tree' of ../
diff --git a/t/t5515/fetch.br-remote-explicit-merge b/t/t5515/fetch.br-remote-explicit-merge
index 7421b2c..d018b35 100644
--- a/t/t5515/fetch.br-remote-explicit-merge
+++ b/t/t5515/fetch.br-remote-explicit-merge
@@ -1,8 +1,8 @@
# br-remote-explicit-merge
+0567da4d5edd2ff4bb292a465ba9e64dcad9536b branch 'three' of ../
754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge branch 'one' of ../
6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 not-for-merge branch 'two' of ../
-0567da4d5edd2ff4bb292a465ba9e64dcad9536b branch 'three' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
22feea448b023a2d864ef94b013735af34d238ba not-for-merge tag 'tag-one-tree' of ../
diff --git a/t/t5515/fetch.br-remote-explicit-merge_remote-explicit b/t/t5515/fetch.br-remote-explicit-merge_remote-explicit
index b6975d3..0d3d780 100644
--- a/t/t5515/fetch.br-remote-explicit-merge_remote-explicit
+++ b/t/t5515/fetch.br-remote-explicit-merge_remote-explicit
@@ -1,8 +1,8 @@
# br-remote-explicit-merge remote-explicit
+0567da4d5edd2ff4bb292a465ba9e64dcad9536b branch 'three' of ../
754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge branch 'one' of ../
6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 not-for-merge branch 'two' of ../
-0567da4d5edd2ff4bb292a465ba9e64dcad9536b branch 'three' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
22feea448b023a2d864ef94b013735af34d238ba not-for-merge tag 'tag-one-tree' of ../
diff --git a/t/t5515/fetch.br-remote-explicit-octopus b/t/t5515/fetch.br-remote-explicit-octopus
index 7681281..6f84304 100644
--- a/t/t5515/fetch.br-remote-explicit-octopus
+++ b/t/t5515/fetch.br-remote-explicit-octopus
@@ -1,7 +1,7 @@
# br-remote-explicit-octopus
-754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 branch 'one' of ../
6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 branch 'two' of ../
+754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
0567da4d5edd2ff4bb292a465ba9e64dcad9536b not-for-merge branch 'three' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
diff --git a/t/t5515/fetch.br-remote-explicit-octopus_remote-explicit b/t/t5515/fetch.br-remote-explicit-octopus_remote-explicit
index 4c896cf..3546a83 100644
--- a/t/t5515/fetch.br-remote-explicit-octopus_remote-explicit
+++ b/t/t5515/fetch.br-remote-explicit-octopus_remote-explicit
@@ -1,7 +1,7 @@
# br-remote-explicit-octopus remote-explicit
-754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 branch 'one' of ../
6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 branch 'two' of ../
+754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
0567da4d5edd2ff4bb292a465ba9e64dcad9536b not-for-merge branch 'three' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
diff --git a/t/t5515/fetch.br-remote-glob-merge b/t/t5515/fetch.br-remote-glob-merge
index 4b62b01..7e1a433 100644
--- a/t/t5515/fetch.br-remote-glob-merge
+++ b/t/t5515/fetch.br-remote-glob-merge
@@ -1,7 +1,7 @@
# br-remote-glob-merge
+0567da4d5edd2ff4bb292a465ba9e64dcad9536b branch 'three' of ../
754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge branch 'one' of ../
-0567da4d5edd2ff4bb292a465ba9e64dcad9536b branch 'three' of ../
6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 not-for-merge branch 'two' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
diff --git a/t/t5515/fetch.br-remote-glob-merge_remote-glob b/t/t5515/fetch.br-remote-glob-merge_remote-glob
index 7478f1f..53571bb 100644
--- a/t/t5515/fetch.br-remote-glob-merge_remote-glob
+++ b/t/t5515/fetch.br-remote-glob-merge_remote-glob
@@ -1,7 +1,7 @@
# br-remote-glob-merge remote-glob
+0567da4d5edd2ff4bb292a465ba9e64dcad9536b branch 'three' of ../
754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge branch 'one' of ../
-0567da4d5edd2ff4bb292a465ba9e64dcad9536b branch 'three' of ../
6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 not-for-merge branch 'two' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
diff --git a/t/t5515/fetch.br-remote-glob-octopus b/t/t5515/fetch.br-remote-glob-octopus
index 2543420..c7c8b6d 100644
--- a/t/t5515/fetch.br-remote-glob-octopus
+++ b/t/t5515/fetch.br-remote-glob-octopus
@@ -1,8 +1,8 @@
# br-remote-glob-octopus
-754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 branch 'one' of ../
-0567da4d5edd2ff4bb292a465ba9e64dcad9536b not-for-merge branch 'three' of ../
6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 branch 'two' of ../
+754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
+0567da4d5edd2ff4bb292a465ba9e64dcad9536b not-for-merge branch 'three' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
22feea448b023a2d864ef94b013735af34d238ba not-for-merge tag 'tag-one-tree' of ../
diff --git a/t/t5515/fetch.br-remote-glob-octopus_remote-glob b/t/t5515/fetch.br-remote-glob-octopus_remote-glob
index 5ffde9c..36076fb 100644
--- a/t/t5515/fetch.br-remote-glob-octopus_remote-glob
+++ b/t/t5515/fetch.br-remote-glob-octopus_remote-glob
@@ -1,8 +1,8 @@
# br-remote-glob-octopus remote-glob
-754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 branch 'one' of ../
-0567da4d5edd2ff4bb292a465ba9e64dcad9536b not-for-merge branch 'three' of ../
6134ee8f857693b96ff1cc98d3e2fd62b199e5a8 branch 'two' of ../
+754b754407bf032e9a2f9d5a9ad05ca79a6b228f not-for-merge branch 'master' of ../
+0567da4d5edd2ff4bb292a465ba9e64dcad9536b not-for-merge branch 'three' of ../
6c9dec2b923228c9ff994c6cfe4ae16c12408dc5 not-for-merge tag 'tag-master' of ../
8e32a6d901327a23ef831511badce7bf3bf46689 not-for-merge tag 'tag-one' of ../
22feea448b023a2d864ef94b013735af34d238ba not-for-merge tag 'tag-one-tree' of ../
--
1.7.8.2.334.ge177b0f
^ permalink raw reply related
* Re: [PATCH] write first for-merge ref to FETCH_HEAD first
From: Joey Hess @ 2012-01-04 0:03 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7v7h18s5kg.fsf@alter.siamese.dyndns.org>
[-- Attachment #1: Type: text/plain, Size: 255 bytes --]
Junio C Hamano wrote:
> Ping? I think this is a good change to go in before 1.7.9.
>
> The change broke quite a lot of tests, and I think I've fixed them all.
Signed-off-by: Joey Hess <joey@kitenet.net>
(Hope that's enough!)
--
see shy jo
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* Re: [PATCH 1/2] git-svn, perl/Git.pm: add central method for prompting passwords honoring GIT_ASKPASS and SSH_ASKPASS
From: Junio C Hamano @ 2012-01-04 0:10 UTC (permalink / raw)
To: Sven Strickroth
Cc: Ævar Arnfjörð Bjarmason, git, Jakub Narebski,
Jeff King
In-Reply-To: <4F038EC8.505@tu-clausthal.de>
Sven Strickroth <sven.strickroth@tu-clausthal.de> writes:
> Am 03.01.2012 23:51 schrieb Junio C Hamano:
>> Sven, does it look agreeable? And more importantly, does it still work? ;-)
>
> Works for me :)
>
> I also updated my second patch minutes ago to fit onto the new patch
> (w/o the filename stuff).
Thanks.
For the second patch, I have a feeling that Peff's earlier suggestion to
give precedence to the terminal interaction over SSH_ASKPASS iff we can
open terminal, but I think the first one is OK for 1.7.9.
I'll queue both of them in 'pu' for now just in case others spot silly
mistakes I made while rewriting the first one, though.
^ permalink raw reply
* Re: [PATCH 2/2] git-svn, perl/Git.pm: extend and use Git->prompt method for querying users
From: Junio C Hamano @ 2012-01-04 0:12 UTC (permalink / raw)
To: Sven Strickroth; +Cc: git, Jeff King, Jakub Narebski
In-Reply-To: <4F038E49.9080809@tu-clausthal.de>
Sven Strickroth <sven.strickroth@tu-clausthal.de> writes:
> git-svn reads usernames and other user queries from an interactive
> terminal. This cause GUIs (w/o STDIN connected) to hang waiting forever
> for git-svn to complete (http://code.google.com/p/tortoisegit/issues/detail?id=967).
> git-core already asks for username using *_ASKPASS tools, this commit
> also enables git-svn to do so.
>
> This change extends the Git::prompt method, so that it can also be used
> for non password queries (e.g. usernames), and makes use of it instead
> of using hand-rolled prompt-response code that only works with the
> interactive terminal.
Now "prompt" is no longer a method but is merely a helper function, so
I've queued this (and 1/2 rewrite we discussed in a separate thread) to
'pu' after rewording the commit log message.
Thanks.
^ permalink raw reply
* Re: [PATCH] write first for-merge ref to FETCH_HEAD first
From: Junio C Hamano @ 2012-01-04 0:12 UTC (permalink / raw)
To: Joey Hess; +Cc: Junio C Hamano, git
In-Reply-To: <20120104000339.GA22662@gnu.kitenet.net>
Joey Hess <joey@kitenet.net> writes:
> Junio C Hamano wrote:
>> Ping? I think this is a good change to go in before 1.7.9.
>>
>> The change broke quite a lot of tests, and I think I've fixed them all.
>
> Signed-off-by: Joey Hess <joey@kitenet.net>
>
> (Hope that's enough!)
Yes. Thanks.
^ permalink raw reply
* Incremental preview of "What's cooking" 1st issue of this year
From: Junio C Hamano @ 2012-01-04 0:24 UTC (permalink / raw)
To: git
These are only notable new bits. I'll send out the real report probably
tomorrow or the day after.
--------------------------------------------------
[New Topics]
* ss/git-svn-prompt-sans-terminal (2012-01-03) 2 commits
- git-svn, perl/Git.pm: extend Git::prompt helper for querying users
- perl/Git.pm: "prompt" helper to honor GIT_ASKPASS and SSH_ASKPASS
The bottom one has been replaced with a rewrite based on comments from
Ævar, and the top one was adjusted to it. Peff's suggestion to give
precedence to tty over SSH_ASKPASS when terminal is available may make
sense for the second one, so we may want to fix the second one further
once 1.7.9 is out. I think the bottom one is OK for 1.7.9.
Will merge the bottom one to 'next' soonish.
* pw/p4-view-updates (2012-01-03) 6 commits
(merged to 'next' on 2012-01-03 at c3b5872)
+ git-p4: view spec documentation
+ git-p4: rewrite view handling
+ git-p4: support single file p4 client view maps
+ git-p4: sort client views by reverse View number
+ git-p4: fix test for unsupported P4 Client Views
+ git-p4: test client view handling
Will merge to 'master' by 1.7.9 unless real git-p4 users object (I am not
one of them, so I cannot really judge).
--------------------------------------------------
[Graduated to "master"]
* jv/maint-config-set (2011-12-27) 1 commit
(merged to 'next' on 2011-12-27 at 551ac8f)
+ Fix an incorrect reference to --set-all.
* pw/p4-docs-and-tests (2011-12-27) 11 commits
(merged to 'next' on 2011-12-28 at 8acf26e)
+ git-p4: document and test submit options
+ git-p4: test and document --use-client-spec
+ git-p4: test --keep-path
+ git-p4: test --max-changes
+ git-p4: document and test --import-local
+ git-p4: honor --changesfile option and test
+ git-p4: document and test clone --branch
+ git-p4: test cloning with two dirs, clarify doc
+ git-p4: clone does not use --git-dir
+ git-p4: introduce asciidoc documentation
+ rename git-p4 tests
--------------------------------------------------
[Cooking]
* jh/fetch-head-update (2012-01-03) 1 commit
- write first for-merge ref to FETCH_HEAD first
Will merge to 'next'.
* jc/signed-commit (2011-11-29) 5 commits
(merged to 'next' on 2011-12-21 at 8fcbf00)
+ gpg-interface: allow use of a custom GPG binary
+ pretty: %G[?GS] placeholders
+ test "commit -S" and "log --show-signature"
+ log: --show-signature
+ commit: teach --gpg-sign option
I am ambivalent on this one. I do not desperately need it myself, I know
the kernel folks do not, I heard some other people might.
We should to do something similar to what we do for the embedded "gpgsig"
header in this series to the embedded "mergetag" header that is used to
record a merge of a signed tag when the "--show-signature" option and/or
"%G[?GS]" pretty placeholders are used, so it may make sense to merge this
and build such feature on top of it before 1.7.9 ships.
Opinions?
^ permalink raw reply
* Re: [BUG] gitweb generates wrong links in grep search results (git_search_files)
From: Junio C Hamano @ 2012-01-04 0:28 UTC (permalink / raw)
To: Thomas Perl, Jakub Narebski; +Cc: git
In-Reply-To: <CA+uOhx6i-07kW8K0y3Co++2ABD=Lmaq3r4h1hN4YLskAE+hR1Q@mail.gmail.com>
Thomas Perl <th.perl@gmail.com> writes:
> I think I found a bug in gitweb when grep'ing for text in a branch
> different from "master". Here's how to reproduce it:
Thanks for a detailed report (and thanks for gpodder ;-).
Jakub, care to take a look?
>
> 1. Have a project with a master branch and a branch different from master
> 2. Start gitweb for that project (e.g. using "git instaweb") and open
> it in a web browser
> 3. Switch to the non-master branch (e.g.
> http://127.0.0.1:1234/?p=.git;a=shortlog;h=refs/heads/mynonmasterbranch)
> 4. In the top right search box, select "grep" in the combo box and
> enter a text that only appears in the non-master branch
> 5. Submit the search by pressing enter, you should be at:
> http://127.0.0.1:1234/?p=.git&a=search&h=refs%2Fheads%2Fmynonmasterbranch&st=grep&s=somesearchtext
>
> ACTUAL RESULT
> In that list of results, you should now see some files matching the
> search - note that the links for the file names and the line numbers
> go to e.g. http://127.0.0.1:1234/?p=.git;a=blob;f=somefile.txt for a
> file "somefile.txt". The links therefore go to the master branch,
> while the search results refer to the non-master branch.
>
> EXPECTED RESULT
> The link should (presumably) go to
> http://127.0.0.1:1234/?p=.git;a=blob;hb=refs%2Fheads%2Fmynonmasterbranch;f=somefile.txt
> so that when the link is clicked, the right file (somefile.txt in
> mynonmasterbranch) is shown.
>
> I also investigated a bit in where the problem happens, and nailed it
> down to: gitweb/gitweb.perl, sub git_search_files, line 5871 in commit
> 17b4e93d5b849293e6a3659bbc4075ed8a6e97e2 (current master tip of
> https://github.com/gitster/git). I haven't looked at the intrinsics of
> the "href" sub, but I believe that it should somehow get the "h"
> parameter from the original page and incorporate it into the final
> link (as "hb" parameter?) to the file. The same fix that is applied
> there then also needs to be applied at line 5891 (same commit, same
> file).
>
> No patch, because after several tries, I didn't get it to work, my
> Perl foo might not be up to the task, and I believe that someone more
> familiar with gitweb's code base might have an easier time to fix
> this.
>
> Thanks,
> Thomas
^ permalink raw reply
* Re: [PATCH 1/2] git-svn, perl/Git.pm: add central method for prompting passwords honoring GIT_ASKPASS and SSH_ASKPASS
From: Sven Strickroth @ 2012-01-04 7:55 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Jeff King, Jakub Narebski
In-Reply-To: <7v39bws4xi.fsf@alter.siamese.dyndns.org>
Am 04.01.2012 01:10 schrieb Junio C Hamano:
> I'll queue both of them in 'pu' for now just in case others spot silly
> mistakes I made while rewriting the first one, though.
I just hit another issue (I created another patch, but we might want to
integrate it into the first one). This is especially needed if we want
to apply my second patch in this mail.
From: Sven Strickroth <email@cs-ware.de>
Date: Wed, 4 Jan 2012 08:32:13 +0100
Subject: [PATCH] Git.pm: check if value is defined before accessing it
Some perl versions, like the one from msys, crash sometimes
if reading from STDIN wasn't successful and chomp is applied
to the variable into which was read.
Errormessage:
Username: Use of uninitialized value in chomp at C:\Program
Files\Git/libexec/git-core\git-svn line 4321.
0 [main] perl.exe" 1916 handle_exceptions: Exception:
STATUS_ACCESS_VIOLATION
1297 [main] perl.exe" 1916 open_stackdumpfile: Dumping stack trace to
perl.exe.stackdump
Signed-off-by: Sven Strickroth <email@cs-ware.de>
---
perl/Git.pm | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/perl/Git.pm b/perl/Git.pm
index 33e68c4..1c96a20 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -547,7 +547,12 @@ sub prompt {
print STDERR "\n";
STDERR->flush;
} else {
- chomp($ret = <STDIN>);
+ $ret = <STDIN>;
+ if (defined $ret) {
+ chomp($ret);
+ } else {
+ $ret = '';
+ }
}
}
return $ret;
> For the second patch, I have a feeling that Peff's earlier suggestion to
> give precedence to the terminal interaction over SSH_ASKPASS iff we can
> open terminal, but I think the first one is OK for 1.7.9.
We also do the wrong order for querying the password. if we want to
adopt this, we should also update prompt.c, the make both prompt methods
behave the same way again.
The Git.pm part is easy, but I also tried to update prompt.c (untested).
From: Sven Strickroth <email@cs-ware.de>
Date: Wed, 4 Jan 2012 08:44:48 +0100
Subject: [PATCH] Git.pm, prompt: try reading from interactive terminal
before
using SSH_ASKPASS
SVN tries to read reading from interactive terminal before using
SSH_ASKPASS helper. This change adjust git to behave the same way.
Signed-off-by: Sven Strickroth <email@cs-ware.de>
---
perl/Git.pm | 6 +++---
prompt.c | 14 +++++++++++---
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/perl/Git.pm b/perl/Git.pm
index 1c96a20..6ce193e 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -530,9 +530,6 @@ sub prompt {
$ret = _prompt($ENV{'GIT_ASKPASS'}, $prompt);
}
if (!defined $ret) {
- $ret = _prompt($ENV{'SSH_ASKPASS'}, $prompt);
- }
- if (!defined $ret) {
print STDERR $prompt;
STDERR->flush;
if ($isPassword) {
@@ -555,5 +552,8 @@ sub prompt {
}
}
+ if (!defined $ret) {
+ $ret = _prompt($ENV{'SSH_ASKPASS'}, $prompt);
+ }
return $ret;
}
diff --git a/prompt.c b/prompt.c
index 72ab9de..e791619 100644
--- a/prompt.c
+++ b/prompt.c
@@ -52,9 +52,17 @@ char *git_prompt(const char *prompt, int flags)
}
r = git_terminal_prompt(prompt, flags & PROMPT_ECHO);
- if (!r)
- die_errno("could not read '%s'", prompt);
- return r;
+ if (r)
+ return r;
+
+ if (flags & PROMPT_ASKPASS) {
+ const char *askpass;
+ askpass = getenv("SSH_ASKPASS");
+ if (askpass && *askpass)
+ return do_askpass(askpass, prompt);
+ }
+
+ die_errno("could not read '%s'", prompt);
}
char *git_getpass(const char *prompt)
--
Best regards,
Sven Strickroth
ClamAV, a GPL anti-virus toolkit http://www.clamav.net
PGP key id F5A9D4C4 @ any key-server
^ permalink raw reply related
* Re: [PATCH 1/2] git-svn, perl/Git.pm: add central method for prompting passwords honoring GIT_ASKPASS and SSH_ASKPASS
From: Sven Strickroth @ 2012-01-04 8:31 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Jeff King, Jakub Narebski
In-Reply-To: <4F0405D4.9090102@tu-clausthal.de>
Am 04.01.2012 08:55 schrieb Sven Strickroth:
> The Git.pm part is easy, but I also tried to update prompt.c (untested).
I said "easy" and then I mailed the wrong/outdated patch :(
I'm sorry for the noise.
From: Sven Strickroth <email@cs-ware.de>
Date: Wed, 4 Jan 2012 08:44:48 +0100
Subject: [PATCH] Git.pm, prompt: try reading from interactive terminal
before using SSH_ASKPASS
SVN tries to read reading from interactive terminal before using
SSH_ASKPASS helper. This change adjust git to behave the same way.
Signed-off-by: Sven Strickroth <email@cs-ware.de>
---
perl/Git.pm | 9 ++++-----
prompt.c | 14 +++++++++++---
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/perl/Git.pm b/perl/Git.pm
index 1c96a20..721aef7 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -530,13 +530,9 @@ sub prompt {
$ret = _prompt($ENV{'GIT_ASKPASS'}, $prompt);
}
if (!defined $ret) {
- $ret = _prompt($ENV{'SSH_ASKPASS'}, $prompt);
- }
- if (!defined $ret) {
print STDERR $prompt;
STDERR->flush;
if ($isPassword) {
- $ret = '';
require Term::ReadKey;
Term::ReadKey::ReadMode('noecho');
while (defined(my $key = Term::ReadKey::ReadKey(0))) {
@@ -551,10 +547,13 @@ sub prompt {
if (defined $ret) {
chomp($ret);
} else {
- $ret = '';
+ undef $ret;
}
}
}
+ if (!defined $ret) {
+ $ret = _prompt($ENV{'SSH_ASKPASS'}, $prompt);
+ }
return $ret;
}
diff --git a/prompt.c b/prompt.c
index 72ab9de..e791619 100644
--- a/prompt.c
+++ b/prompt.c
@@ -52,9 +52,17 @@ char *git_prompt(const char *prompt, int flags)
}
r = git_terminal_prompt(prompt, flags & PROMPT_ECHO);
- if (!r)
- die_errno("could not read '%s'", prompt);
- return r;
+ if (r)
+ return r;
+
+ if (flags & PROMPT_ASKPASS) {
+ const char *askpass;
+ askpass = getenv("SSH_ASKPASS");
+ if (askpass && *askpass)
+ return do_askpass(askpass, prompt);
+ }
+
+ die_errno("could not read '%s'", prompt);
}
char *git_getpass(const char *prompt)
--
Best regards,
Sven Strickroth
ClamAV, a GPL anti-virus toolkit http://www.clamav.net
PGP key id F5A9D4C4 @ any key-server
^ permalink raw reply related
* Re: git-p4 under cygwin
From: Paul Chown @ 2012-01-04 8:54 UTC (permalink / raw)
To: Thomas Berg; +Cc: git
On 1/3/12, Thomas Berg <merlin66b@gmail.com> wrote:
> On Tue, Jan 3, 2012 at 4:32 PM, Paul Chown <pmchown@yahoo.co.uk> wrote:
>> Path '/cygdrive/c/work/perforce/config_test\...' is not under client's
>> root 'c:\work\perforce\config_test'.
>
> Ah, sorry, I did not see this part of the error message when I first
> replied. This does seem like a cygwin related problem. Not sure how
> easy it is to solve. But as mentioned, msysgit works fine with git-p4.
>
> - Thomas
>
Thanks! with msysgit it works a lot better. The 'vi' invocation failed during the submit, and I tried just about every EDITOR variation that I could think of without success, but I could workround that by setting EDITOR to use the Windows notepad.exe instead.
Paul
^ permalink raw reply
* Auto-refresh git-gui
From: Victor Engmark @ 2012-01-04 9:15 UTC (permalink / raw)
To: git
Is there some way to make `git-gui` rescan automatically when anything
in the repository changes? That would enable a more fluid workflow when
combined with other Git tools.
Use cases:
* "Dashboard" functionality to keep track of changes without having to
run `git status` all the time.
* `git` / `git-gui` introduction: See what happens live while working
with the other tool.
--
Victor Engmark
terreActive AG
Kasinostrasse 30
CH-5001 Aarau
Tel: +41 62 834 00 55
Fax: +41 62 823 93 56
www.terreactive.ch
Wir sichern Ihren Erfolg - seit 15 Jahren
^ permalink raw reply
* Re: Warning from AV software about kill.exe
From: Erik Blake @ 2012-01-04 9:15 UTC (permalink / raw)
To: Pat Thoyts; +Cc: Thomas Rast, git
In-Reply-To: <878vm4lb9q.fsf@fox.patthoyts.tk>
Another way to implement this (on Windows) would be for the git programs
to tag themselves with a mutex. Then the "kill" program can determine
which git programs are running and send them user-defined windows
messages to shut themselves down. Alternatively, you could send the
programs the standard windows WM_CLOSE message, but the OS or an AV
program might still be troubled by that behaviour.
This is how we implement this type of behaviour in our windows programs.
It does not raise the ire of the OS or AV since you do not have one
process trying to shut down another. It also bypasses all issues with
process privileges etc.
Erik
On 2011-12-22 19:19, Pat Thoyts wrote:
> Thomas Rast<trast@student.ethz.ch> writes:
>
>> Erik Blake<erik@icefield.yk.ca> writes:
>>
>>> I'm running git under Win7 64. As I selected "Repository|Visualize all
>>> branch history" in the git gui, my AV software (Trustport) trapped the
>>> bin\kill.exe program for "trying to modify system global settings
>>> (time, timezone, registry quota, etc.)"
>>>
>>> Does anyone know the details of this process and what it's function
>>> is? First time I've seen it, though I'm a relatively new user.
>> 'kill' is a standard unix utility that sends signals to processes, in
>> particular signals that cause the processes to exit or be killed
>> forcibly by the kernel, hence the name. (I don't know how the windows
>> equivalent works under the hood, but presumably it's something similar.)
>>
>> git-gui and gitk use kill to terminate background worker processes that
>> are no longer needed because you closed the window their output would
>> have been displayed in, etc.
> You might try replacing the command in the tcl scripts with 'exec
> taskkill /f /pid $pid' and see if that avoids the error. taskkill is
> present on XP and above as part of the OS distribution so shouldn't
> suffer any AV complaints.
>
^ permalink raw reply
* [PATCH] Catch invalid --depth option passed to clone or fetch
From: Nguyễn Thái Ngọc Duy @ 2012-01-04 10:01 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
transport.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/transport.c b/transport.c
index 51814b5..8a13f43 100644
--- a/transport.c
+++ b/transport.c
@@ -474,8 +474,12 @@ static int set_git_option(struct git_transport_options *opts,
} else if (!strcmp(name, TRANS_OPT_DEPTH)) {
if (!value)
opts->depth = 0;
- else
- opts->depth = atoi(value);
+ else {
+ char *end;
+ opts->depth = strtol(value, &end, 0);
+ if (*end)
+ die("transport: invalid depth option '%s'", value);
+ }
return 0;
}
return 1;
--
1.7.3.1.256.g2539c.dirty
^ permalink raw reply related
* Re: Stashing individual files
From: Tor Arntsen @ 2012-01-04 10:12 UTC (permalink / raw)
To: Jeff King; +Cc: Chris Leong, git
In-Reply-To: <20120103190612.GC20926@sigill.intra.peff.net>
On Tue, Jan 3, 2012 at 20:06, Jeff King <peff@peff.net> wrote:
> IOW, make the "--" a requirement for specifying filenames. The only
> regression is that "--" as a single argument can no longer be used in
> stash messages. So this works now:
>
> git stash save working on foo -- needs bar
>
> but would be interpreted under my proposal as stashing "needs" and "bar"
> with the message "working on foo". You would instead have to spell it:
>
> git stash save "working on foo -- needs bar"
For what it's worth, that's how I always add messages to stash.. with
quotes. It had never occured to me to use the form
git stash save working on foo -- needs bar
(no quotes), it's so ingrained that a multi-word message should be
quoted that I would never have thought of even trying without the
quotes! :-)
-Tor
^ permalink raw reply
* [PATCH] gitweb: accept trailing "/" in $project_list
From: Matthieu Moy @ 2012-01-04 10:07 UTC (permalink / raw)
To: git, gitster; +Cc: Matthieu Moy
The current code is removing the trailing "/", but computing the string
length on the previous value, i.e. with the trailing "/". Later in the
code, we do
my $path = substr($File::Find::name, $pfxlen + 1);
And the "$pfxlen + 1" is supposed to mean "the length of the prefix, plus
1 for the / separating the prefix and the path", but with an incorrect
$pfxlen, this basically eats the first character of the path, and yields
"404 - No projects found".
While we're there, also fix $pfxdepth to use $dir, although a change of 1
in the depth shouldn't really matter.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
I'm not fluent in Perl, and not familiar at all with gitweb, but this
sounds a rather obvious (too obvious?) fix.
gitweb/gitweb.perl | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index f80f259..4512b89 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2835,8 +2835,8 @@ sub git_get_projects_list {
my $dir = $projects_list;
# remove the trailing "/"
$dir =~ s!/+$!!;
- my $pfxlen = length("$projects_list");
- my $pfxdepth = ($projects_list =~ tr!/!!);
+ my $pfxlen = length("$dir");
+ my $pfxdepth = ($dir =~ tr!/!!);
# when filtering, search only given subdirectory
if ($filter) {
$dir .= "/$filter";
--
1.7.8.384.g29bb3
^ permalink raw reply related
* [PATCH] Do not fetch tags on new shallow clones
From: Nguyễn Thái Ngọc Duy @ 2012-01-04 11:35 UTC (permalink / raw)
To: git; +Cc: Nguyễn Thái Ngọc Duy
The main purpose of shallow clones is to reduce download. Fetching
tags likely defeats this purpose because old-enough repos tend to have
a lot of tags, spreading across history, which may increase the number
of objects to download significantly.
For example, "git clone --depth=10 git://.../git.git" without changes
fetches ~16M (50k objects). The same command with changes fetches
~6.5M (10k objects).
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
This could also be applied for normal clones. But I don't think
there are many use cases for it, enough to deserve new --no-tags
option.
We should also fetch a single branch, but because branches are
usually less crowded and stay close the tip, they do not produce too
many extra objects. Let's leave it until somebody yells up.
We should also fetch tags that reference to downloaded objects. But I
don't know how fetch does that magic, so for now users have to do
"git fetch" after cloning for tags. I have only gone as far as
fetching tags along by setting TRANS_OPT_FOLLOWTAGS? Help?
builtin/clone.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin/clone.c b/builtin/clone.c
index 86db954..abd8578 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -428,7 +428,7 @@ static struct ref *wanted_peer_refs(const struct ref *refs,
struct ref **tail = head ? &head->next : &local_refs;
get_fetch_map(refs, refspec, &tail, 0);
- if (!option_mirror)
+ if (!option_mirror && !option_depth)
get_fetch_map(refs, tag_refspec, &tail, 0);
return local_refs;
--
1.7.8.36.g69ee2
^ permalink raw reply related
* Re: [PATCH 1/2] git-svn, perl/Git.pm: add central method for prompting passwords honoring GIT_ASKPASS and SSH_ASKPASS
From: Jeff King @ 2012-01-04 13:34 UTC (permalink / raw)
To: Sven Strickroth; +Cc: git, Junio C Hamano, Jakub Narebski
In-Reply-To: <4F040E46.5030001@tu-clausthal.de>
On Wed, Jan 04, 2012 at 09:31:02AM +0100, Sven Strickroth wrote:
> diff --git a/prompt.c b/prompt.c
> index 72ab9de..e791619 100644
> --- a/prompt.c
> +++ b/prompt.c
> @@ -52,9 +52,17 @@ char *git_prompt(const char *prompt, int flags)
> }
>
> r = git_terminal_prompt(prompt, flags & PROMPT_ECHO);
> - if (!r)
> - die_errno("could not read '%s'", prompt);
> - return r;
> + if (r)
> + return r;
> +
> + if (flags & PROMPT_ASKPASS) {
> + const char *askpass;
> + askpass = getenv("SSH_ASKPASS");
> + if (askpass && *askpass)
> + return do_askpass(askpass, prompt);
> + }
> +
> + die_errno("could not read '%s'", prompt);
> }
Wouldn't you also have to drop checking of SSH_ASKPASS in the block
right before calling git_terminal_prompt (right before the context in
your patch)?
-Peff
^ permalink raw reply
* Re: [PATCH 1/2] git-svn, perl/Git.pm: add central method for prompting passwords honoring GIT_ASKPASS and SSH_ASKPASS
From: Sven Strickroth @ 2012-01-04 14:13 UTC (permalink / raw)
To: Jeff King; +Cc: git, Junio C Hamano, Jakub Narebski
In-Reply-To: <20120104133459.GA6564@sigill.intra.peff.net>
Am 04.01.2012 14:34 schrieb Jeff King:
> Wouldn't you also have to drop checking of SSH_ASKPASS in the block
> right before calling git_terminal_prompt (right before the context in
> your patch)?
of course :( Thanks for spotting this...
diff --git a/prompt.c b/prompt.c
index 72ab9de..230ac3c 100644
--- a/prompt.c
+++ b/prompt.c
@@ -45,16 +45,23 @@ char *git_prompt(const char *prompt, int flags)
askpass = getenv("GIT_ASKPASS");
if (!askpass)
askpass = askpass_program;
- if (!askpass)
- askpass = getenv("SSH_ASKPASS");
if (askpass && *askpass)
return do_askpass(askpass, prompt);
}
r = git_terminal_prompt(prompt, flags & PROMPT_ECHO);
- if (!r)
- die_errno("could not read '%s'", prompt);
- return r;
+ if (r)
+ return r;
+
+ if (flags & PROMPT_ASKPASS) {
+ const char *askpass;
+
+ askpass = getenv("SSH_ASKPASS");
+ if (askpass && *askpass)
+ return do_askpass(askpass, prompt);
+ }
+
+ die_errno("could not read '%s'", prompt);
}
char *git_getpass(const char *prompt)
--
Best regards,
Sven Strickroth
ClamAV, a GPL anti-virus toolkit http://www.clamav.net
PGP key id F5A9D4C4 @ any key-server
^ permalink raw reply related
* Re: [PATCH] Do not fetch tags on new shallow clones
From: Shawn Pearce @ 2012-01-04 15:16 UTC (permalink / raw)
To: Nguyễn Thái Ngọc Duy; +Cc: git
In-Reply-To: <1325676922-6995-1-git-send-email-pclouds@gmail.com>
2012/1/4 Nguyễn Thái Ngọc Duy <pclouds@gmail.com>:
> The main purpose of shallow clones is to reduce download. Fetching
> tags likely defeats this purpose because old-enough repos tend to have
> a lot of tags, spreading across history, which may increase the number
> of objects to download significantly.
Thank you for looking at this. I complained about it to Junio many
weeks ago, but never took the time myself to fix it. :-)
> We should also fetch a single branch, but because branches are
> usually less crowded and stay close the tip, they do not produce too
> many extra objects. Let's leave it until somebody yells up.
Depends on the project. In git.git maint stays relatively close to
master, but its still not really that close. In other projects, there
are certainly huge differences between two active branches, sometimes
spanning years. Consider any product with a multiple year support
contract on an older version, where the support contract demands
patches for the older version to fix bugs. :-)
I agree this can be looked at later with a different change, but there
should be a way to specify exactly which branches you want to clone,
especially in the shallow case.
> We should also fetch tags that reference to downloaded objects. But I
> don't know how fetch does that magic,
If the remote advertises the capability "include-tag", and the client
wants tags, it asks for that include-tag capability in its request.
This is handled by the fetch_pack args field include_tag being set to
1. When the remote side sees the client requesting include-tag and it
packs the thing a tag points at, the tag is also packed, even though
it wasn't explicitly requested by the client.
> so for now users have to do
> "git fetch" after cloning for tags. I have only gone as far as
> fetching tags along by setting TRANS_OPT_FOLLOWTAGS? Help?
Right. Set TRANS_OPT_FOLLOWTAGS in the transport structure to fetch
only tags that are pointing at things already being sent. The delta
increase in transfer is 1 object (the tag) and whatever that tag takes
up on disk.
> diff --git a/builtin/clone.c b/builtin/clone.c
> index 86db954..abd8578 100644
> --- a/builtin/clone.c
> +++ b/builtin/clone.c
> @@ -428,7 +428,7 @@ static struct ref *wanted_peer_refs(const struct ref *refs,
> struct ref **tail = head ? &head->next : &local_refs;
>
> get_fetch_map(refs, refspec, &tail, 0);
> - if (!option_mirror)
> + if (!option_mirror && !option_depth)
> get_fetch_map(refs, tag_refspec, &tail, 0);
>
> return local_refs;
I think if you just add this into your patch, you get the auto follow
tag feature enabled:
diff --git a/builtin/clone.c b/builtin/clone.c
index efe8b6c..ecaafdb 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -641,6 +641,7 @@ int cmd_clone(int argc, const char **argv, const char *prefi
die(_("Don't know how to clone %s"), transport->url);
transport_set_option(transport, TRANS_OPT_KEEP, "yes");
+ transport_set_option(transport, TRANS_OPT_FOLLOWTAGS, "1");
if (option_depth)
transport_set_option(transport, TRANS_OPT_DEPTH,
totally untested (didn't even compile). This only works for the
"remote" cases where the native Git protocol is used. A local clone
using the hardlink or copy objects path, or a dumb HTTP or rsync clone
will ignore the option and not supply you the tags.
Annnddddd..... it doesn't appear to work.
You need to copy a block of code from fetch. The problem is the object
was copied locally by the transport, but the transport doesn't tell
you what extra objects came along. Clone has to loop back through the
advertised reference map from the transport, checking each tag to see
if has_sha1_file() says the object exists locally. If it does, then
clone needs to add that reference update to the set of things it will
store (and print to the terminal).
I think this loop is the find_non_local_tags() in builtin/fetch.c. Its
been a long time since I hacked on this code. The JGit version of
looking for these extra objects post transfer is more clearly
documented. *sigh*
^ permalink raw reply related
* git-subtree
From: David Greene @ 2012-01-04 15:53 UTC (permalink / raw)
To: git
Hey all,
Avery Pennarun has suckered me into^W^W^Wasked me to submit his
git-subtree tool for inclusion into mainline. Apparently there was some
discussion about this at GitTogether.
I have a patch ready. It takes git-subtree from the current GitHub
master, fixes the tests to use the standard git test harness and updates
the build to recognize git-subtree.
How does the git community want the patch presented? Right now it's one
monolithic thing. I understand that isn't ideal but I don't think
incorporating the entire GitHub master history is necessarily the best
idea either.
So I'm looking for some guidance.
Thanks!
-Dave
^ permalink raw reply
* Re: [PATCH 1/2] daemon: add tests
From: Clemens Buchacher @ 2012-01-04 15:55 UTC (permalink / raw)
To: Junio C Hamano
Cc: git, Jonathan Nieder, Jeff King, Erik Faye-Lund, Ilari Liusvaara,
Nguyễn Thái Ngọc Duy
In-Reply-To: <7v8vlovavj.fsf@alter.siamese.dyndns.org>
Thanks for your review. Please find fixes in reply to this email. In
order to better show individual changes I have not squashed them into
one commit. For upstream, you will probably want to squash patches 3-6
into patch 2. Patch 2 is the same as the one once queued as part of
cb/daemon-permission-errors.
[PATCH 1/6] t5550: repack everything into one file
[PATCH 2/6] daemon: add tests
[PATCH 3/6] avoid use of pkill
[PATCH 4/6] explain expected exit code
[PATCH 5/6] t5570: everything into one file
[PATCH 6/6] chmod: use lower-case x
On Tue, Jan 03, 2012 at 11:34:08AM -0800, Junio C Hamano wrote:
> >> +
> >> +LIB_DAEMON_PORT=${LIB_DAEMON_PORT-'8121'}
>
> In lib-httpd.sh, LIB_HTTPD_PORT is defined in a similar way, but that is
> always overridden by the users and the convention there is to use the test
> numbers (cf. "git grep LIB_HTTPD_PORT t/"), which should be followed here
> as well.
This you already fixed in the version previously queued and is contained
in [PATCH 2/6] daemon: add tests.
> I am not very keen on the "lib-daemon.sh", GIT_TEST_DAEMON, etc. naming to
> pretend as if "git daemon" will forever be the only daemon we will ever
> ship, by the way. We might one day want to add an inotify daemon, a
> daemon for the git-pubsub protocol or somesuch.
Are you saying that the name "daemon" is too general, and it should
instead be "lib-git-daemon.sh" and GIT_TEST_GIT_DAEMON? Or do you
mean that it is not general enough and it should be called
lib-networking.sh and "GIT_TEST_NETWORKING"?
Either way, I have no preference here. Feel free to change any way you
like.
> >> + # kill git-daemon child of git
> >> + say >&3 "Stopping git daemon ..."
> >> + pkill -P "$DAEMON_PID"
>
> How portable is this one (I usually do not trust use of pkill anywhere)?
I read that it is supposed to be more portable than skill or killall.
But I have no way to research this. I have implemented a workaround
using only 'ps' and 'kill' in [PATCH 3/6] avoid use of pkill.
> >> + wait "$DAEMON_PID"
> >> + ret=$?
> # Please comment what 143 is on this line.
> >> + if test $ret -ne 143
Fixed in [PATCH 4/6] explain expected exit code.
> >> + git --bare repack &&
>
> As the later tests assume there will be only one pack, don't you want at
> least "-a" and possibly "-a -d" here?
Fixed in
[PATCH 1/6] t5550: repack everything into one file,
[PATCH 5/6] t5570: repack everything into one file.
> I find the use of cap X here dubious; it makes your intention unclear.
>
> Are you interested in the current status of 'x' bits on that directory, or
> are you more interested in dropping the executable/searchable bits from
> the directory no matter what its current status is (rhetorical: I fully
> expect that the answer is the latter)?
For directories, upper-case X does not have that meaning. The status is
always overwritten, irrespective of the current status. I wanted to
emphasize the fact that I am changing 'searchable' bits. But since that
does not seem to have the desired effect, I changed it to lower-case in
[PATCH 6/6] chmod: use lower-case x.
Clemens
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox