* [PATCH 4/5] git-svn: Provide a default "empty commit message" so the metadata is not the header
From: Alex Vandiver @ 2009-12-02 19:07 UTC (permalink / raw)
To: git
In-Reply-To: <1259780874-14706-1-git-send-email-alex@chmrr.net>
git-svn adds a trailing line of metadata to the commit message. If
the commit message would otherwise be empty, this can lead to
confusing display in `gitk` and `git log --oneline`. Thus, provide a
no-op "(empty commit message)" message for the first line of such
messages.
Signed-off-by: Alex Vandiver <alex@chmrr.net>
---
git-svn.perl | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 0731425..87462c9 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -3111,6 +3111,7 @@ sub make_log_entry {
$log_entry{date} = parse_svn_date($log_entry{date});
parse_svk_log(\%log_entry) if $log_entry{log} =~ svk_header_regex( lenient => 1 );
+ $log_entry{log} = "(empty commit message)\n" unless $log_entry{log} =~ /\S/;
my $author = $log_entry{author} = check_author($log_entry{author});
my ($name, $email) = defined $::users{$author} ? @{$::users{$author}}
--
1.6.6.rc0.327.g032bc
^ permalink raw reply related
* [PATCH 0/5] git-svn: svk log message cleanup
From: Alex Vandiver @ 2009-12-02 19:07 UTC (permalink / raw)
To: git
This patch series tries to clean up the cruft that svk leaves in log
messages, while optionally (using the existing --use-log-author
option) using the information therein to set author username and time.
- Alex
^ permalink raw reply
* [PATCH 3/5] git-svn: Strip SVK headers, optionally parsing author information
From: Alex Vandiver @ 2009-12-02 19:07 UTC (permalink / raw)
To: git
In-Reply-To: <1259780874-14706-1-git-send-email-alex@chmrr.net>
SVK adds additional headers (often nested arbitrarily) detailing
information on the local commit. When possible, strip these headers
so that the first line of git's commit message is actually descriptive
of the commit.
Additionally, these headers contain information about the original
author's username, and their local commit time. If the
--use-log-author flag is set, use this information to set the
information on the git commit. Note that the username thus extracted
may be a _local_ username, and thus may require additional, somewhat
unexpected, entries in the authors file.
Signed-off-by: Alex Vandiver <alex@chmrr.net>
---
git-svn.perl | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 96 insertions(+), 2 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 5337326..0731425 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -3110,7 +3110,8 @@ sub make_log_entry {
close $un or croak $!;
$log_entry{date} = parse_svn_date($log_entry{date});
- $log_entry{log} .= "\n";
+ parse_svk_log(\%log_entry) if $log_entry{log} =~ svk_header_regex( lenient => 1 );
+
my $author = $log_entry{author} = check_author($log_entry{author});
my ($name, $email) = defined $::users{$author} ? @{$::users{$author}}
: ($author, undef);
@@ -3118,7 +3119,15 @@ sub make_log_entry {
my ($commit_name, $commit_email) = ($name, $email);
if ($_use_log_author) {
my $name_field;
- if ($log_entry{log} =~ /From:\s+(.*\S)\s*\n/i) {
+ if ($log_entry{log_author}) {
+ $log_entry{commit_date} = $log_entry{date};
+ $log_entry{date} = $log_entry{log_author_date};
+ $log_entry{log_author} = check_author($log_entry{log_author});
+ my ($log_author_name, $log_author_email)
+ = defined $::users{$log_entry{log_author}} ? @{$::users{$log_entry{log_author}}}
+ : ($log_entry{log_author}, undef);
+ $name_field = "$log_author_name <$log_author_email>";
+ } elsif ($log_entry{log} =~ /From:\s+(.*\S)\s*\n/i) {
$name_field = $1;
} elsif ($log_entry{log} =~ /Signed-off-by:\s+(.*\S)\s*\n/i) {
$name_field = $1;
@@ -3182,6 +3191,91 @@ sub make_log_entry {
\%log_entry;
}
+sub svk_header_regex {
+ my %args = ( lenient => 0, orig => 0, @_ );
+ my $orig = $args{orig} ? qr/ \(orig r\d+\)/ : "";
+ my $atstart = "";
+ if ($args{lenient}) {
+ $atstart = qr/\s*/;
+ $orig = qr/(?: \(orig r\d+\))?/;
+ }
+ return qr/^${atstart}r\d+\@\S+$orig:\s*(\S+)\s*\|\s*(.*?)\s*([+-]\d+)$/m;
+}
+
+sub parse_svk_log {
+ my $log_entry = shift;
+ my $log = $log_entry->{log};
+
+ # Strip off blank lines at the start and end
+ $log =~ s/^(\s*?\n)+//;
+ $log =~ s/\s*$//;
+
+ # If each line starts with a space, this might be an
+ # unmodified SVK log format. As a side effect, this also
+ # trims the leading space off of the lines.
+ my $lines = $log =~ s/^//mg;
+ my $spaced = $log =~ s/^ //mg;
+ return unless $lines == $spaced;
+
+ my $regex = svk_header_regex( orig => 1 );
+ if ($log =~ /\A$regex/) {
+ # This is either a merge commit, or a base-less merge
+ # (replay from a different repository) The \A assures
+ # that this is an _unedited_ merge commit with no
+ # hand-supplied log message.
+ if (@{$log_entry->{merged_branches} || []}) {
+ # This is a merge with no description; provide
+ # one.
+ $log_entry->{log} = "Merge from @{$log_entry->{merged_branches}}\n\n$log";
+ } else {
+ my $commits = 0;
+ $commits++ while $log =~ /$regex/g;
+ if ($commits == 1) {
+ # This is a baseless merge of one
+ # commit; strip off the original
+ # commit info
+ $log_entry->{log_author} = $1;
+ $log_entry->{log_author_date} = "$3 $2";
+ $log =~ s/\A$regex\n*//;
+ $log_entry->{log} = $log;
+ parse_svk_log($log_entry);
+ } else {
+ # A lump baseless merge? Remove all
+ # of the SVK headers on this level,
+ # and add a summary. Trailing
+ # newlines on the svk header lines are
+ # left unmolested, so they become
+ # blank lines.
+ $log =~ s/$regex//g;
+ $log_entry->{log} = "Lump commit\n$log";
+ }
+ }
+ } else {
+ # Look for svk header lines without the (orig r12345),
+ # which were local commits.
+ $regex = svk_header_regex();
+ my $commits = 0;
+ $commits++ while $log =~ /$regex/g;
+ if ($commits == 0) {
+ # No more svk-like commits; don't change anything.
+ } elsif ($commits == 1) {
+ # Only one top-level commit-like object; strip
+ # it off, recurse down.
+ $log_entry->{log_author} = $1;
+ $log_entry->{log_author_date} = "$3 $2";
+ $log =~ s/$regex\n*//;
+ $log_entry->{log} = $log;
+ parse_svk_log($log_entry);
+ } else {
+ # This is a lump push of local commits. Strip
+ # off all of the svk headers in this level,
+ # and call it quits.
+ $log =~ s/$regex//g;
+ $log_entry->{log} = $log;
+ }
+ }
+}
+
sub fetch {
my ($self, $min_rev, $max_rev, @parents) = @_;
my ($last_rev, $last_commit) = $self->last_rev_commit;
--
1.6.6.rc0.327.g032bc
^ permalink raw reply related
* [PATCH 1/5] git-svn: Allow setting the committer and author date separately
From: Alex Vandiver @ 2009-12-02 19:07 UTC (permalink / raw)
To: git
In-Reply-To: <1259780874-14706-1-git-send-email-alex@chmrr.net>
Signed-off-by: Alex Vandiver <alex@chmrr.net>
---
git-svn.perl | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 51f03ad..53bf20c 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2491,7 +2491,7 @@ sub set_commit_header_env {
$ENV{GIT_AUTHOR_NAME} = $log_entry->{name};
$ENV{GIT_AUTHOR_EMAIL} = $log_entry->{email};
- $ENV{GIT_AUTHOR_DATE} = $ENV{GIT_COMMITTER_DATE} = $log_entry->{date};
+ $ENV{GIT_AUTHOR_DATE} = $log_entry->{date};
$ENV{GIT_COMMITTER_NAME} = (defined $log_entry->{commit_name})
? $log_entry->{commit_name}
@@ -2499,6 +2499,9 @@ sub set_commit_header_env {
$ENV{GIT_COMMITTER_EMAIL} = (defined $log_entry->{commit_email})
? $log_entry->{commit_email}
: $log_entry->{email};
+ $ENV{GIT_COMMITTER_DATE} = (defined $log_entry->{commit_date})
+ ? $log_entry->{commit_date}
+ : $log_entry->{date};
\%env;
}
--
1.6.6.rc0.327.g032bc
^ permalink raw reply related
* [PATCH 2/5] git-svn: Make merge metadata accessible to make_log_entry
From: Alex Vandiver @ 2009-12-02 19:07 UTC (permalink / raw)
To: git
In-Reply-To: <1259780874-14706-1-git-send-email-alex@chmrr.net>
Signed-off-by: Alex Vandiver <alex@chmrr.net>
---
git-svn.perl | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 53bf20c..5337326 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2924,7 +2924,7 @@ sub check_author {
}
sub find_extra_svk_parents {
- my ($self, $ed, $tickets, $parents) = @_;
+ my ($self, $ed, $tickets, $parents, $merges) = @_;
# aha! svk:merge property changed...
my @tickets = split "\n", $tickets;
my @known_parents;
@@ -2944,14 +2944,15 @@ sub find_extra_svk_parents {
# wahey! we found it, but it might be
# an old one (!)
push @known_parents, [ $rev, $commit ];
+ push @known_parents, [ $rev, $path, $commit ];
}
}
}
# Ordering matters; highest-numbered commit merge tickets
# first, as they may account for later merge ticket additions
# or changes.
- @known_parents = map {$_->[1]} sort {$b->[0] <=> $a->[0]} @known_parents;
- for my $parent ( @known_parents ) {
+ for my $merge ( sort {$b->[0] <=> $a->[0]} @known_parents ) {
+ my ($rev, $path, $parent) = @{$merge};
my @cmd = ('rev-list', $parent, map { "^$_" } @$parents );
my ($msg_fh, $ctx) = command_output_pipe(@cmd);
my $new;
@@ -2963,6 +2964,7 @@ sub find_extra_svk_parents {
print STDERR
"Found merge parent (svk:merge ticket): $parent\n";
push @$parents, $parent;
+ push @$merges, "$path:$rev";
}
}
}
@@ -3061,27 +3063,31 @@ sub make_log_entry {
my ($self, $rev, $parents, $ed) = @_;
my $untracked = $self->get_untracked($ed);
- my @parents = @$parents;
+ my %log_entry = ( parents => $parents,
+ merged_branches => [],
+ revision => $rev,
+ log => '');
my $ps = $ed->{path_strip} || "";
for my $path ( grep { m/$ps/ } %{$ed->{dir_prop}} ) {
my $props = $ed->{dir_prop}{$path};
if ( $props->{"svk:merge"} ) {
$self->find_extra_svk_parents
- ($ed, $props->{"svk:merge"}, \@parents);
+ ($ed,
+ $props->{"svk:merge"},
+ $log_entry{parents},
+ $log_entry{merged_branches});
}
if ( $props->{"svn:mergeinfo"} ) {
$self->find_extra_svn_parents
($ed,
$props->{"svn:mergeinfo"},
- \@parents);
+ $log_entry{parents});
}
}
open my $un, '>>', "$self->{dir}/unhandled.log" or croak $!;
print $un "r$rev\n" or croak $!;
print $un $_, "\n" foreach @$untracked;
- my %log_entry = ( parents => \@parents, revision => $rev,
- log => '');
my $headrev;
my $logged = delete $self->{logged_rev_props};
--
1.6.6.rc0.327.g032bc
^ permalink raw reply related
* Re: [PATCH/RFC 01/11] mingw: add network-wrappers for daemon
From: Johannes Sixt @ 2009-12-02 19:34 UTC (permalink / raw)
To: kusmabite; +Cc: Martin Storsjö, msysgit, git, dotzenlabs
In-Reply-To: <40aa078e0912020501v9378c37l106e1e23b5e7b43d@mail.gmail.com>
On Mittwoch, 2. Dezember 2009, Erik Faye-Lund wrote:
> I'm not very familiar with poll(), but if I understand the man-pages
> correctly it's waiting for events on file descriptors, and is in our
> case used to check for incoming connections, right? If so, I see three
> possible ways forward: (1) extending our poll()-emulation to handle
> multiple sockets, (2) change daemon.c to check one socket at the time,
> and (3) using select() instead of poll().
>
> (1) seems like the "correct" but tricky thing to do, (2) like the
> "easy" but nasty thing to do. However, (3) strikes me as the least
> dangerous thing to do ;)
>
> For (1), there's also a WSAPoll() function in Windows, but I'm not
> sure how to figure out if an fd is a socket or a pipe. There's also
> WaitForMultipleObjects.
GetFileType() returns FILE_TYPE_PIPE for both pipes and sockets. But once you
know this, you can use getsockopt(): If it succeeds, it is a socket, and in
this case, assume that poll() was called from git-daemon, i.e. all polled-for
fds are sockets and you can select().
-- Hannes
^ permalink raw reply
* Re: [PATCH v2] Add --track option to git clone
From: David Soria Parra @ 2009-12-02 19:27 UTC (permalink / raw)
To: git
In-Reply-To: <20091202190807.GB30778@coredump.intra.peff.net>
On 2009-12-02, Jeff King <peff@peff.net> wrote:
> 1. Add "--track foo" as a convenience wrapper for "-f foo -b foo".
>
> 2. If no "-b" is given, the first "-f" is assumed as "-b". So "git
> clone -f foo" becomes equivalent to David's --track.
>
> And of course the name "-f" (for --fetch, if you were wondering) is open
> to suggestion.
>
> What do you think?
>
This approach is much better than my initial proposal. Sadly I won't have time
to implement this, which is why I wrote the simplest working solution for me.
Fetch seems to reasonable. I can rewrite the patch to be able to use refspecs, but
it would require additional refactoring to be able to specify multiple --fetch parameters.
David
^ permalink raw reply
* Re: [msysGit] [PATCH/RFC 06/11] run-command: add kill_async() and is_async_alive()
From: Johannes Sixt @ 2009-12-02 19:27 UTC (permalink / raw)
To: kusmabite; +Cc: msysgit, git, dotzenlabs
In-Reply-To: <40aa078e0912020757i3b63ef6eh71c3d4d99047f1f2@mail.gmail.com>
On Mittwoch, 2. Dezember 2009, Erik Faye-Lund wrote:
> On Fri, Nov 27, 2009 at 8:59 PM, Johannes Sixt <j6t@kdbg.org> wrote:
> > "relatively small chance of stuff blowing up"? The docs of
> > TerminateThread: "... the kernel32 state for the thread's process could
> > be inconsistent." That's scary if we are talking about a process that
> > should run for days or weeks without interruption.
>
> I think there's a misunderstanding here. I thought your suggestion was
> to simply call die(), which would take down the main process. After
> reading this explanation, I think you're talking about giving an error
> and rejecting the connection instead. Which makes more sense than to
> risk crashing the main-process, indeed.
Just rejecting a connection is certainly the simplest do to keep the daemon
process alive. But the server can be DoS-ed from a single source IP.
Currently git-daemon can only be DDoS-ed because there is a maximum number of
connections, which are not closed if all of them originate from different
IPs.
> > Case 2 could be achieved by using setsockopt() with SO_RCVTIMEO and
> > SO_SNDTIMEO and a tiny timeout. But notice that we would set a timeout in
> > one thread while another thread is waiting in ReadFile() or WriteFile().
> > Would that work?
>
> I think it should work fine, but I won't give you a guarantee ;)
> Perhaps we should have a configurable global max timeout, and just set
> that on all sockets? Or does this open for DDOS attacks?
I'm sure that there is a global timeout already, but it is in the order of
minutes, which is too long. Here I mean it to be set to zero or one
milli-second so that the connection closes right away - as if the process on
the server side had been killed.
Hm - perhaps it is possible to really *close* the socket while some other
thread waits in ReadFile() or WriteFile()?
-- Hannes
^ permalink raw reply
* Re: [PATCH] builtin-commit: add --date option
From: Jeff King @ 2009-12-02 19:26 UTC (permalink / raw)
To: Miklos Vajna; +Cc: git
In-Reply-To: <1259627252-21615-1-git-send-email-vmiklos@frugalware.org>
On Tue, Dec 01, 2009 at 01:27:32AM +0100, Miklos Vajna wrote:
> This is useful in case git commit --amend is used but the user wants to
> set the date of the new commit to a specified one, since GIT_AUTHOR_DATE
> is ignored in such a situation.
Do you really want to set the date to something arbitrary, or do you
just want to set it to "now"? If the latter case, do you really just
want the recently discussed --reset-author?
Also, is there a good reason why GIT_AUTHOR_DATE is not respected in
this case? If not, should we simply be fixing that bug instead?
-Peff
^ permalink raw reply
* Re: [RFC PATCH 0/8] Git remote helpers to implement smart transports.
From: Ilari Liusvaara @ 2009-12-02 19:25 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Sverre Rabbelier, Johannes Schindelin, git
In-Reply-To: <7vk4x5fcbf.fsf@alter.siamese.dyndns.org>
On Wed, Dec 02, 2009 at 10:41:40AM -0800, Junio C Hamano wrote:
> Sverre Rabbelier <srabbelier@gmail.com> writes:
>
> >> Of course, I never understood why the backend should know the
> >> implementation detail that it is based on cURL, so it would be even more
> >> modular (at least by my definition) if there was no hard-coded mapping.
> >
> > Agreed.
>
> I don't get this point at all.
>
> Backend is _very_ aware of how it is implemented itself. Naming one
> implementation git-remote-http is to declare that "I am the one and only
> implementation of http handler" and forces another implementation of http
> handler, perhaps based on different toolkit than libcurl, to forever be a
> second class citizen that need to use name other than 'http'.
At least it can be called as 'foo::http://' (That may be tolerable for
alternate implementations but not for primary ones).
> The "mapping" you two are calling "hard-coded" may be "hard-coded" but is
> a better kind of hard-coding than hard-coding "http" to "this particular
> implementation" implicitly like you two seem to be advocating. Think of
> it as having one extra layer of indirection.
Its already indirected: By filesystem.
> When the second implementation of http handler proves to be better than
> the current one, we can flip the mapping, and anybody who were using
> "http://" to access some repository will automatically updated to use the
> new backend instead of the old one. With your scheme, you probably could
> change the name of the old "http" backend to "http-deprecated" and the new
> one from "second-class-citizen-http" to "http" to achieve a similar
> effect, but I do not think it is as nice as having one extra level of
> indirection.
The new HTTP support must either be internal or not. And:
- If it is internal, renaming can be done anyway.
- If it is not, change can not be made.
And at package manager level, this is what 'conflicts: ' is about (and
alternates of apt).
> > However, I am not convinced that we should do any magic to map
> > "foo://" to git-remote-foo. On the other hand, I do think it makes
> > sense to have something modular that allows "git-remote-http" to be
> > implemented as a separate package that can be installed.
>
> As I said, I do think modular is good, but I think what Dscho is
> advocating does not have much to achieve that goal.
Why should adding new git native protocol (that doesn't have so special
capabilities new core support is fundamentially required) require recompiling
git core? Why it should require more than dropping executable handler to
suitable place?[*]
Why should such protocols need to be specified 'foo::foo://'?
Granted, even with current dispatch meachanisms, its possible to hack
together something that accepts 'foo:://', 'foo::/' or 'foo::' but that
breaks user expectations rather badly (the U in URL stands for 'uniform')...
And currently the URL space to be reassigned just produces fatal error
messages anyway.
[*] Merge strategies have similar issues. IMO, on encountering unknown
merge strategy, git merging code should check if there's handler for it,
if yes, obtain flags from it and then use it.
-Ilari
^ permalink raw reply
* Re: [PATCH] builtin-commit: add --date option
From: Jeff King @ 2009-12-02 19:24 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Miklos Vajna, git
In-Reply-To: <7vpr6xgtxn.fsf@alter.siamese.dyndns.org>
On Wed, Dec 02, 2009 at 09:35:48AM -0800, Junio C Hamano wrote:
> > Is there any documentation describing what does parse_date() accept?
> [...]
> The above are all supported (you can label 2 as ISO even though the
> official ISO8601 wants "T" instead of " " between date and time).
>
> For more amusing ones, see
>
> http://article.gmane.org/gmane.comp.version-control.git/12241
>
> and follow the discussion there ;-)
Aren't the amusing ones the result of approxidate, and not parse_date?
At least that is my recollection from working on the date code when I
ate 30 hot dogs last August.
-Peff
^ permalink raw reply
* Re: [msysGit] [PATCH/RFC 09/11] daemon: use run-command api for async serving
From: Johannes Sixt @ 2009-12-02 19:12 UTC (permalink / raw)
To: kusmabite; +Cc: msysgit, git, dotzenlabs
In-Reply-To: <40aa078e0912020745o4b72342fm722a944621cfda5@mail.gmail.com>
On Mittwoch, 2. Dezember 2009, Erik Faye-Lund wrote:
> On Fri, Nov 27, 2009 at 9:59 PM, Johannes Sixt <j6t@kdbg.org> wrote:
> > Would it make sense to
> > have a function finish_async_nowait() instead of is_async_alive() that
> > (1) stresses the start/finish symmetry and (2) can return more than just
> > Boolean?
>...
>
> I'm not entirely sure how to make the interface, though. Any good
> suggestions?
I suggest to model finish_async_nowait() after waitpid() so that
while ((pid = waitpid(-1, &status, WNOHANG)) > 0) ...
becomes
while ((pid = finish_async_nowait(&some_async, &status)) > 0) ...
but where the resulting status is already "decoded", i.e. zero is success and
non-zero is failure (including death through signal); WIFEXITED and
WEXITSTATUS should not be applicable to status anymore.
-- Hannes
^ permalink raw reply
* Re: [PATCH v2] Add --track option to git clone
From: Jeff King @ 2009-12-02 19:08 UTC (permalink / raw)
To: Nanako Shiraishi; +Cc: David Soria Parra, git
In-Reply-To: <20091202192028.6117@nanako3.lavabit.com>
On Wed, Dec 02, 2009 at 07:20:28PM +0900, Nanako Shiraishi wrote:
> Quoting David Soria Parra <sn_@gmx.net> writes:
>
> > I'm aware that it's not possible to give more than one --track
> > option. Implementing the possibility to specify multiple --track option
> > would certainly a good improvment later, but would also require a lot
> > more work as far as I understand the clone code.
>
> I'm sorry if I'm asking the obvious, but how can multiple --track
> options be a useful future enhancement? If I understand your use
> case correctly, it's useful when you want to work on only one
> branch that isn't the default, and that is why you don't want to
> get data necessary for other branches. What does it mean to give
> two --track options? You will get one master branch that tracks
> both versions, and "git pull" will merge both branches you track?
I would find something like this useful for cloning git.git, where I
explicitly fetch maint, master, next, and pu, but none of html, man, or
todo. This makes "gitk --all" much nicer to view.
However, I don't think --track is the right term. There are really two
things happening here:
1. Setting the fetch refspec(s).
2. Choosing an initial branch to checkout.
We can already do (2) with "-b". But there is no way to do (1)
currently. If we are going to implement (1), I don't see a reason to be
restrictive about it. We should really accept arbitrary refspecs, and
then provide a syntax on top of that for doing both (1) and (2)
together. I am thinking something like:
# most general case
git clone -f 'refs/heads/subset/*:refs/remotes/origin/*' remote.git
# expands to refs/heads/subset/*:refs/remotes/origin/*
git clone -f 'refs/heads/subset/*' remote.git
# expands to refs/heads/subset/*, which then expands as above
git clone -f 'subset/*' remote.git
# multiple -f should add multiple refspec lines
git clone -f maint -f master -f next -f pu git.git
# choose your favorite branch
git clone -f maint -f master -f next -f pu -b next git.git
And for convenience of the user, you would want a way to avoid repeating
the name of the "I want to check this out" branch. So either:
1. Add "--track foo" as a convenience wrapper for "-f foo -b foo".
2. If no "-b" is given, the first "-f" is assumed as "-b". So "git
clone -f foo" becomes equivalent to David's --track.
And of course the name "-f" (for --fetch, if you were wondering) is open
to suggestion.
What do you think?
-Peff
^ permalink raw reply
* Re: [PATCH] transport-helper: remove duplicate free()
From: Junio C Hamano @ 2009-12-02 19:06 UTC (permalink / raw)
To: Daniel Barkalow; +Cc: Tay Ray Chuan, git, Sverre Rabbelier, Junio C Hamano
In-Reply-To: <alpine.LNX.2.00.0912021120440.14365@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> writes:
> On Wed, 2 Dec 2009, Tay Ray Chuan wrote:
>
>> Remove the free() invocation on transport->data in release_helper(), as
>> disconnect_helper() has already done so.
>
> You need to remove the one in disconnect_helper, because the entire point
> of disconnect_helper as opposed to release_helper is to *not* free that
> memory. If you remove this one, you'll access freed memory in any case
> where the helper has to be quit and restarted.
Thanks. I did two things:
- Since the bottom commit cannot be rewritten (as it is based on the
version that is before the change in the caller to free it), I queued a
one liner to remove the free from the callee in 'next'.
- The problem will surface when the series is later merged to 'master'.
I told my rerere database about the necessity of this "evil merge", so
that we will automatically have the equivalent of the one-liner when it
happens.
^ permalink raw reply
* Re: [RFC PATCH 0/8] Git remote helpers to implement smart transports.
From: Junio C Hamano @ 2009-12-02 18:58 UTC (permalink / raw)
To: Junio C Hamano
Cc: Sverre Rabbelier, Johannes Schindelin, Ilari Liusvaara, git
In-Reply-To: <7v3a3tfbsx.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Sverre Rabbelier <srabbelier@gmail.com> writes:
>
>> I don't see how what you are talking about is any different. With the
>> mapping the executable of the alternative implementation still needs
>> to have a different name, no?
>
> Sure, but please search for "second class citizen" in my message.
Also "extra level of indication".
I do not think "remote-curl" was the best name, and hindsight tells me
that "remote-walker" might have been a better name (it tells us how it
does it more clearly).
And I do not at all mind making the current hard-coded mapping from
http:// to remote-walker to an external table look-up, perhaps something
that can be controlled by .git/config, with a built-in default that is
hard-coded like the way we have now.
After all my main objection is against closing the door to others by one
particular implementation squating on "remote-http" name and refusing the
use of that nice, authoritative-sounding name by others.
^ permalink raw reply
* Re: [RFC PATCH 0/8] Git remote helpers to implement smart transports.
From: Sverre Rabbelier @ 2009-12-02 18:55 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Johannes Schindelin, Ilari Liusvaara, git
In-Reply-To: <7v3a3tfbsx.fsf@alter.siamese.dyndns.org>
Heya,
On Wed, Dec 2, 2009 at 19:52, Junio C Hamano <gitster@pobox.com> wrote:
> Sure, but please search for "second class citizen" in my message.
I read that, but I don't understand how exactly the mapping will make
it a non-second class citizen. How will your mapping include the
alternative implementation? The word mapping suggests a 1:1 relation
between protocol and implementation, so I don't see how the
alternative implementation would become first-class :(.
--
Cheers,
Sverre Rabbelier
^ permalink raw reply
* Re: [RFC PATCH 0/8] Git remote helpers to implement smart transports.
From: Junio C Hamano @ 2009-12-02 18:52 UTC (permalink / raw)
To: Sverre Rabbelier
Cc: Junio C Hamano, Johannes Schindelin, Ilari Liusvaara, git
In-Reply-To: <fabb9a1e0912021050r4fd96ed4rf863917a965a42fb@mail.gmail.com>
Sverre Rabbelier <srabbelier@gmail.com> writes:
> I don't see how what you are talking about is any different. With the
> mapping the executable of the alternative implementation still needs
> to have a different name, no?
Sure, but please search for "second class citizen" in my message.
^ permalink raw reply
* Re: [RFC PATCH 0/8] Git remote helpers to implement smart transports.
From: Sverre Rabbelier @ 2009-12-02 18:50 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Johannes Schindelin, Ilari Liusvaara, git
In-Reply-To: <7vk4x5fcbf.fsf@alter.siamese.dyndns.org>
Heya,
On Wed, Dec 2, 2009 at 19:41, Junio C Hamano <gitster@pobox.com> wrote:
> When the second implementation of http handler proves to be better than
> the current one, we can flip the mapping, and anybody who were using
> "http://" to access some repository will automatically updated to use the
> new backend instead of the old one. With your scheme, you probably could
> change the name of the old "http" backend to "http-deprecated" and the new
> one from "second-class-citizen-http" to "http" to achieve a similar
> effect, but I do not think it is as nice as having one extra level of
> indirection.
I don't see how what you are talking about is any different. With the
mapping the executable of the alternative implementation still needs
to have a different name, no?
--
Cheers,
Sverre Rabbelier
^ permalink raw reply
* Re: [RFC PATCH 0/8] Git remote helpers to implement smart transports.
From: Ilari Liusvaara @ 2009-12-02 18:47 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Johannes Schindelin, Sverre Rabbelier, git
In-Reply-To: <7vskbtfdvo.fsf@alter.siamese.dyndns.org>
On Wed, Dec 02, 2009 at 10:07:55AM -0800, Junio C Hamano wrote:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
> The "modular" setup is a good thing to do, but I do not know how it
> relates to the change Ilari did.
Removing core dependency on NO_CURL is required for that. 6/8 is one
way to do that given support for dispatching <scheme>:// to remote
helpers (1/8).
> Isn't it simply a matter of excluding
> git-remote-curl from the current set of binaries to be shipped with
> git-core.rpm and making a separate git-remote-http.rpm to contain it, or
> does it involve a lot more than that from the packager's side?
See above. There's also issues with git remote helper execution, namely
inability to properly handle failure before cap exchange.
With properly fixed main git binary, it is just matter of splitting
remote-xxx executable(s) relating to HTTP to seperate package.
-Ilari
^ permalink raw reply
* Re: [RFC PATCH 0/8] Git remote helpers to implement smart transports.
From: Junio C Hamano @ 2009-12-02 18:41 UTC (permalink / raw)
To: Sverre Rabbelier
Cc: Johannes Schindelin, Ilari Liusvaara, Junio C Hamano, git
In-Reply-To: <fabb9a1e0912021006x2905578bo16dbcaedc0d97bc6@mail.gmail.com>
Sverre Rabbelier <srabbelier@gmail.com> writes:
>> Of course, I never understood why the backend should know the
>> implementation detail that it is based on cURL, so it would be even more
>> modular (at least by my definition) if there was no hard-coded mapping.
>
> Agreed.
I don't get this point at all.
Backend is _very_ aware of how it is implemented itself. Naming one
implementation git-remote-http is to declare that "I am the one and only
implementation of http handler" and forces another implementation of http
handler, perhaps based on different toolkit than libcurl, to forever be a
second class citizen that need to use name other than 'http'.
The "mapping" you two are calling "hard-coded" may be "hard-coded" but is
a better kind of hard-coding than hard-coding "http" to "this particular
implementation" implicitly like you two seem to be advocating. Think of
it as having one extra layer of indirection.
When the second implementation of http handler proves to be better than
the current one, we can flip the mapping, and anybody who were using
"http://" to access some repository will automatically updated to use the
new backend instead of the old one. With your scheme, you probably could
change the name of the old "http" backend to "http-deprecated" and the new
one from "second-class-citizen-http" to "http" to achieve a similar
effect, but I do not think it is as nice as having one extra level of
indirection.
> However, I am not convinced that we should do any magic to map
> "foo://" to git-remote-foo. On the other hand, I do think it makes
> sense to have something modular that allows "git-remote-http" to be
> implemented as a separate package that can be installed.
As I said, I do think modular is good, but I think what Dscho is
advocating does not have much to achieve that goal.
^ permalink raw reply
* Re: [RFC PATCH 0/8] Git remote helpers to implement smart transports.
From: Junio C Hamano @ 2009-12-02 18:07 UTC (permalink / raw)
To: Johannes Schindelin
Cc: Ilari Liusvaara, Sverre Rabbelier, Junio C Hamano, git
In-Reply-To: <alpine.DEB.1.00.0912021832480.4985@pacific.mpi-cbg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> This is definitely a good direction, and it would be even better if the
> absence of the remote helper was also handled gracefully. Just think
> about a (as of now fictious) git-remote-http.rpm relying on git-core.rpm
> and libcurl.rpm. If you do not want to access http:// URLs, you can
> install just git-core. Once you encounter an http:// URL you need to
> access, you install git-remote-http. Keeping git-core. (I like to call
> this setup "modular".)
The "modular" setup is a good thing to do, but I do not know how it
relates to the change Ilari did. Isn't it simply a matter of excluding
git-remote-curl from the current set of binaries to be shipped with
git-core.rpm and making a separate git-remote-http.rpm to contain it, or
does it involve a lot more than that from the packager's side?
^ permalink raw reply
* Re: [RFC PATCH 0/8] Git remote helpers to implement smart transports.
From: Sverre Rabbelier @ 2009-12-02 18:06 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Ilari Liusvaara, Junio C Hamano, git
In-Reply-To: <alpine.DEB.1.00.0912021832480.4985@pacific.mpi-cbg.de>
Heya,
On Wed, Dec 2, 2009 at 18:39, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
> This is definitely a good direction, and it would be even better if the
> absence of the remote helper was also handled gracefully.
Yes, that is definitely an improvement we can and should make
regardless of how we handle http(s) and ftp(s), since currently "git
clone nonsense::http://...." will error out with the message that
"git-remote-nonsense" cannot be found.
> Of course, I never understood why the backend should know the
> implementation detail that it is based on cURL, so it would be even more
> modular (at least by my definition) if there was no hard-coded mapping.
Agreed.
> Sverre -- Cc'ed -- seemed to like URLs of the form "svn::http://..." and
> "cvs::pserver..." to trigger looking for a remote helper explicitely. I
> find the compiled-in mapping rather limiting.
Yes, I do think the double-colon syntax is very nice. That is, someone
who sees "git clone svn::http://" is likely to understand that it is a
svn repo over http that git treats specially.
However, I am not convinced that we should do any magic to map
"foo://" to git-remote-foo. On the other hand, I do think it makes
sense to have something modular that allows "git-remote-http" to be
implemented as a separate package that can be installed.
Perhaps instead of the current special case where "git-remote-curl" is
invoked, it would make more sense to instead special case on "http://"
(etc) and invoke "git-remote-http" in that case. So "git clone svn://"
would not work, but "git clone svn::svn://" would (as is the case
now), as well as "git clone http://" being handled by
"git-remote-http".
--
Cheers,
Sverre Rabbelier
^ permalink raw reply
* Re: equal-tree-merges as way to make rebases fast-forward-able
From: Junio C Hamano @ 2009-12-02 18:03 UTC (permalink / raw)
To: Nanako Shiraishi; +Cc: Junio C Hamano, Bernhard R. Link, git
In-Reply-To: <20091202192026.6117@nanako3.lavabit.com>
Nanako Shiraishi <nanako3@lavabit.com> writes:
>> In any case, at least this patch will make it start behaving a bit
>> more sanely.
>
> Thank you; it fixes the bug for me. Do I have to say
>
> Tested-by: Nanako Shiraishi <nanako3@lavabit.com>
>
> to ask you to include it in the new release?
>
>> -- >8 --
>> Subject: Do not misidentify "git merge foo HEAD" as an old-style invocation
Thanks for reminding me. I almost forgot that I did that patch.
^ permalink raw reply
* Re: [PATCH] builtin-commit: add --date option
From: Junio C Hamano @ 2009-12-02 17:55 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Miklos Vajna, git
In-Reply-To: <7vpr6xgtxn.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Miklos Vajna <vmiklos@frugalware.org> writes:
> ...
>> Is there any documentation describing what does parse_date() accept?
>>
>> Based on t0006-date.sh and the comments in the source, I see 3 supported
>> formats:
>>
>> 1) <unix timestamp> <timezone>
>>
>> 2) A format like 2008-12-02 18:04:00
>>
>> 3) RFC 2822 (Thu, 21 Dec 2000 16:01:07 +0200)
>
> The above are all supported (you can label 2 as ISO even though the
> official ISO8601 wants "T" instead of " " between date and time).
>
> For more amusing ones, see
>
> http://article.gmane.org/gmane.comp.version-control.git/12241
>
> and follow the discussion there ;-)
I should have mentioned ones with more importance in real-life before
referring you to the amusing ones: US and European dates.
date.c::match_multi_number() groks these:
mm/dd/yy[yy] (US)
dd.mm.yy[yy] (European)
^ permalink raw reply
* Re: warning in git version 1.6.6.rc0.114.gc8648
From: Junio C Hamano @ 2009-12-02 17:50 UTC (permalink / raw)
To: Alejandro Riveira; +Cc: git
In-Reply-To: <hf67m0$r10$1@ger.gmane.org>
Alejandro Riveira <ariveira@gmail.com> writes:
> Whenever i do a "git pull" to check updates to the kernel
> or git repo i recieve
>
> warning: 'git merge <msg> HEAD <commit>' is deprecated. Please update
> your script to use 'git merge -m <msg> <commit>' instead.
> In future versions of git, this syntax will be removed.
> Already up-to-date.
>
> git pull should be updated to not use a deprecated form of git merge.
Yes we are aware of the issue and have a patch to do so which requires
another change which we also already have patch for. It will be fixed
before 1.6.6-rc1
Thanks for reporting.
^ 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