From bcd8ee5b4368594f2fe646c97d75a8bcdfb1d4e7 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 29 Apr 2007 14:05:54 -0700 Subject: Fix symlink handling in git-svn, related to PerlIO After reading the leading contents from a symlink data obtained from subversion, which we expect to begin with 'link ', the code forked to hash the remainder (which should match readlink() result) using git-hash-objects, by redirecting its STDIN from the filehandle we read that 'link ' from. This was Ok with Perl on modern Linux, but on Mac OS, the read in the parent process slurped more than we asked for in stdio buffer, and the child did not correctly see the "remainder". This attempts to fix the issue by using lower level sysseek and sysread instead of seek and read to bypass the stdio buffer. Signed-off-by: Junio C Hamano Acked-by: Eric Wong Acked-by: Seth Falcon --- git-svn.perl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index 4be8576894..6f509f85e4 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -2470,9 +2470,9 @@ sub close_file { my $got = $md5->hexdigest; die "Checksum mismatch: $path\n", "expected: $exp\n got: $got\n" if ($got ne $exp); - seek($fh, 0, 0) or croak $!; + sysseek($fh, 0, 0) or croak $!; if ($fb->{mode_b} == 120000) { - read($fh, my $buf, 5) == 5 or croak $!; + sysread($fh, my $buf, 5) == 5 or croak $!; $buf eq 'link ' or die "$path has mode 120000", "but is not a link\n"; } -- cgit v1.2.1 From b3cb7e4582410c7fcaa531a2283b43499eb8fb22 Mon Sep 17 00:00:00 2001 From: Adam Roben Date: Sun, 29 Apr 2007 01:35:27 -0700 Subject: git-svn: Add 'find-rev' command This patch adds a new 'find-rev' command to git-svn that lets you easily translate between SVN revision numbers and git tree-ish. Signed-off-by: Adam Roben Acked-by: Eric Wong Signed-off-by: Junio C Hamano --- Documentation/git-svn.txt | 5 +++-- git-svn.perl | 19 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index a35b9de3bf..62d7ef8be4 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -161,8 +161,9 @@ Any other arguments are passed directly to `git log' -- 'find-rev':: When given an SVN revision number of the form 'rN', returns the - corresponding git commit hash. When given a tree-ish, returns the - corresponding SVN revision number. + corresponding git commit hash (this can optionally be followed by a + tree-ish to specify which branch should be searched). When given a + tree-ish, returns the corresponding SVN revision number. 'set-tree':: You should consider using 'dcommit' instead of this command. diff --git a/git-svn.perl b/git-svn.perl index 6f509f85e4..6657e100fb 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -434,17 +434,16 @@ sub cmd_find_rev { my $revision_or_hash = shift; my $result; if ($revision_or_hash =~ /^r\d+$/) { - my $desired_revision = substr($revision_or_hash, 1); - my ($fh, $ctx) = command_output_pipe('rev-list', 'HEAD'); - while (my $hash = <$fh>) { - chomp($hash); - my (undef, $rev, undef) = cmt_metadata($hash); - if ($rev && $rev eq $desired_revision) { - $result = $hash; - last; - } + my $head = shift; + $head ||= 'HEAD'; + my @refs; + my (undef, undef, undef, $gs) = working_head_info($head, \@refs); + unless ($gs) { + die "Unable to determine upstream SVN information from ", + "$head history\n"; } - command_close_pipe($fh, $ctx); + my $desired_revision = substr($revision_or_hash, 1); + $result = $gs->rev_db_get($desired_revision); } else { my (undef, $rev, undef) = cmt_metadata($revision_or_hash); $result = $rev; -- cgit v1.2.1 From a7af09d2dbf39bae4c12c7d1c8829f8598011257 Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Mon, 30 Apr 2007 19:04:25 +0300 Subject: Clarify SubmittingPatches Checklist Separate things to be checked when making commits, and things to be checked when sending patches. Signed-off-by: Jari Aalto Signed-off-by: Junio C Hamano --- Documentation/SubmittingPatches | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index 131bcff9b2..8cf5093dd9 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches @@ -1,5 +1,7 @@ Checklist (and a short version for the impatient): + Commits: + - make commits of logical units - check for unnecessary whitespace with "git diff --check" before committing @@ -12,8 +14,14 @@ Checklist (and a short version for the impatient): commit message (or just use the option "-s" when committing) to confirm that you agree to the Developer's Certificate of Origin - - do not PGP sign your patch + + Patch: + - use "git format-patch -M" to create the patch + - send your patch to . If you use + git-send-email(1), please test it first by sending + email to yourself. + - do not PGP sign your patch - do not attach your patch, but read in the mail body, unless you cannot teach your mailer to leave the formatting of the patch alone. -- cgit v1.2.1 From 34b604af293ec288ed11cbb5cac90a2ddb87e159 Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Mon, 30 Apr 2007 14:21:38 +0300 Subject: git.7: Mention preformatted html doc location Signed-off-by: Jari Aalto Signed-off-by: Junio C Hamano --- Documentation/git.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/git.txt b/Documentation/git.txt index c81162eba5..aa65802c86 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -29,6 +29,10 @@ in a coherent way to git enlightenment ;-). The COMMAND is either a name of a Git command (see below) or an alias as defined in the configuration file (see gitlink:git-config[1]). +Formatted and hyperlinked version of the latest git +documentation can be viewed at +`http://www.kernel.org/pub/software/scm/git/docs/`. + ifdef::stalenotes[] [NOTE] ============ -- cgit v1.2.1 From 928a559000e1c9ba0d570c5d3d4e11155b4d1ffd Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Mon, 30 Apr 2007 15:37:28 +0300 Subject: send-email documentation: clarify --smtp-server It can be either hostname/address, or a full path to a local executable. Signed-off-by: Jari Aalto Signed-off-by: Junio C Hamano --- Documentation/git-send-email.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index 795db873fc..7ae39fd5a2 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -54,7 +54,7 @@ The --cc option must be repeated for each user you want on the cc list. --in-reply-to:: Specify the contents of the first In-Reply-To header. - Subsequent emails will refer to the previous email + Subsequent emails will refer to the previous email instead of this if --chain-reply-to is set (the default) Only necessary if --compose is also set. If --compose is not set, this will be prompted for. @@ -68,8 +68,9 @@ The --cc option must be repeated for each user you want on the cc list. all that is output. --smtp-server:: - If set, specifies the outgoing SMTP server to use. A full - pathname of a sendmail-like program can be specified instead; + If set, specifies the outgoing SMTP server to use (e.g. + `smtp.example.com` or a raw IP address). Alternatively it can + specify a full pathname of a sendmail-like program instead; the program must support the `-i` option. Default value can be specified by the 'sendemail.smtpserver' configuration option; the built-in default is `/usr/sbin/sendmail` or -- cgit v1.2.1 From b5cc62f701abf8b903387a5d7c77a59f347d66fd Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 30 Apr 2007 17:09:48 -0700 Subject: GIT v1.5.1.3 Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.5.1.3.txt | 20 ++++++++++++++------ GIT-VERSION-GEN | 2 +- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Documentation/RelNotes-1.5.1.3.txt b/Documentation/RelNotes-1.5.1.3.txt index 9a4b069ccc..2ddeabd029 100644 --- a/Documentation/RelNotes-1.5.1.3.txt +++ b/Documentation/RelNotes-1.5.1.3.txt @@ -1,4 +1,4 @@ -GIT v1.5.1.3 Release Notes (draft) +GIT v1.5.1.3 Release Notes ========================== Fixes since v1.5.1.2 @@ -19,6 +19,8 @@ Fixes since v1.5.1.2 - git-svn inconsistently stripped away username from the URL only when svnsync_props was in use. + - git-svn got confused when handling symlinks on Mac OS. + - git-send-email was not quoting recipient names that have period '.' in them. Also it did not allow overriding envelope sender, which made it impossible to send patches to @@ -31,8 +33,14 @@ Fixes since v1.5.1.2 packfiles incorrectly closed the fd that was still being used to read the pack. ---- -exec >/var/tmp/1 -O=v1.5.1.2-23-gbf7af11 -echo O=`git describe refs/heads/maint` -git shortlog --no-merges $O..refs/heads/maint + - import-tars contributed front-end for fastimport was passing + wrong directory modes without checking. + + - git-fastimport trusted its input too much and allowed to + create corrupt tree objects with entries without a name. + + - git-fetch needlessly barfed when too long reflog action + description was given by the caller. + +Also contains various documentation updates. + diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 41ee8b4ea2..cd9e0500e0 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.5.1.2.GIT +DEF_VER=v1.5.1.3.GIT LF=' ' -- cgit v1.2.1