From 08ddd4f7649ccf8b9f61c903de420bfd0a8a602e Mon Sep 17 00:00:00 2001 From: Herbert Valerio Riedel Date: Mon, 17 Apr 2006 06:58:39 -0400 Subject: [PATCH 1/4] git-svnimport symlink support added svn:special symlink support for access methods other than direct-http Signed-off-by: Herbert Valerio Riedel Acked-by: Matthias Urlichs Signed-off-by: Junio C Hamano --- git-svnimport.perl | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/git-svnimport.perl b/git-svnimport.perl index 4d5371ca90..60ed7ae3ee 100755 --- a/git-svnimport.perl +++ b/git-svnimport.perl @@ -98,6 +98,7 @@ package SVNconn; use File::Spec; use File::Temp qw(tempfile); use POSIX qw(strftime dup2); +use Fcntl qw(SEEK_SET); sub new { my($what,$repo) = @_; @@ -143,9 +144,22 @@ sub file { } my $mode; if (exists $properties->{'svn:executable'}) { - $mode = '0755'; + $mode = '100755'; + } elsif (exists $properties->{'svn:special'}) { + my ($special_content, $filesize); + $filesize = tell $fh; + seek $fh, 0, SEEK_SET; + read $fh, $special_content, $filesize; + if ($special_content =~ s/^link //) { + $mode = '120000'; + seek $fh, 0, SEEK_SET; + truncate $fh, 0; + print $fh $special_content; + } else { + die "unexpected svn:special file encountered"; + } } else { - $mode = '0644'; + $mode = '100644'; } close ($fh); From f56ef54174598d5362d0446c5a560cb5892537c2 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 18 Apr 2006 11:29:33 -0700 Subject: [PATCH 2/4] diff --stat: make sure to set recursive. Just like "patch" format always needs recursive, "diffstat" format does not make sense without setting recursive. Signed-off-by: Junio C Hamano --- diff-tree.c | 3 --- diff.c | 10 ++++++++++ git.c | 2 -- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/diff-tree.c b/diff-tree.c index 7015b06c7f..d1c61c8515 100644 --- a/diff-tree.c +++ b/diff-tree.c @@ -117,9 +117,6 @@ int main(int argc, const char **argv) if (opt->dense_combined_merges) opt->diffopt.output_format = DIFF_FORMAT_PATCH; - if (opt->diffopt.output_format == DIFF_FORMAT_PATCH) - opt->diffopt.recursive = 1; - diff_tree_setup_paths(get_pathspec(prefix, argv), &opt->diffopt); diff_setup_done(&opt->diffopt); diff --git a/diff.c b/diff.c index b54bbfa627..3a1e6ce619 100644 --- a/diff.c +++ b/diff.c @@ -1029,6 +1029,16 @@ int diff_setup_done(struct diff_options *options) options->detect_rename != DIFF_DETECT_COPY) || (0 <= options->rename_limit && !options->detect_rename)) return -1; + + /* + * These cases always need recursive; we do not drop caller-supplied + * recursive bits for other formats here. + */ + if ((options->output_format == DIFF_FORMAT_PATCH) || + (options->output_format == DIFF_FORMAT_DIFFSTAT) || + (options->with_stat)) + options->recursive = 1; + if (options->detect_rename && options->rename_limit < 0) options->rename_limit = diff_rename_limit_default; if (options->setup & DIFF_SETUP_USE_CACHE) { diff --git a/git.c b/git.c index 140ed1873d..5209b04de5 100644 --- a/git.c +++ b/git.c @@ -344,8 +344,6 @@ static int cmd_log(int argc, const char **argv, char **envp) opt.ignore_merges = 0; if (opt.dense_combined_merges) opt.diffopt.output_format = DIFF_FORMAT_PATCH; - if (opt.diffopt.output_format == DIFF_FORMAT_PATCH) - opt.diffopt.recursive = 1; if (!full_diff && rev.prune_data) diff_tree_setup_paths(rev.prune_data, &opt.diffopt); diff_setup_done(&opt.diffopt); From 8f2b72a93666afe63ab39b279bbd4088bd5463ca Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Mon, 6 Mar 2006 06:24:44 +0100 Subject: [PATCH 3/4] Add git-annotate(1) and git-blame(1) [jc: with entries in git.txt] Signed-off-by: Jonas Fonseca Signed-off-by: Junio C Hamano --- Documentation/git-annotate.txt | 44 ++++++++++++++++++++++++++++++++++ Documentation/git-blame.txt | 42 ++++++++++++++++++++++++++++++++ Documentation/git.txt | 6 +++++ Makefile | 1 - 4 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 Documentation/git-annotate.txt create mode 100644 Documentation/git-blame.txt diff --git a/Documentation/git-annotate.txt b/Documentation/git-annotate.txt new file mode 100644 index 0000000000..7baf73111b --- /dev/null +++ b/Documentation/git-annotate.txt @@ -0,0 +1,44 @@ +git-annotate(1) +=============== + +NAME +---- +git-annotate - Annotate file lines with commit info + +SYNOPSIS +-------- +git-annotate [options] file [revision] + +DESCRIPTION +----------- +Annotates each line in the given file with information from the commit +which introduced the line. Optionally annotate from a given revision. + +OPTIONS +------- +-l, --long:: + Show long rev (Defaults off). + +-t, --time:: + Show raw timestamp (Defaults off). + +-r, --rename:: + Follow renames (Defaults on). + +-S, --rev-file :: + Use revs from revs-file instead of calling git-rev-list. + +-h, --help:: + Show help message. + +SEE ALSO +-------- +gitlink:git-blame[1] + +AUTHOR +------ +Written by Ryan Anderson . + +GIT +--- +Part of the gitlink:git[7] suite diff --git a/Documentation/git-blame.txt b/Documentation/git-blame.txt new file mode 100644 index 0000000000..51898787e6 --- /dev/null +++ b/Documentation/git-blame.txt @@ -0,0 +1,42 @@ +git-blame(1) +============ + +NAME +---- +git-blame - Blame file lines on commits + +SYNOPSIS +-------- +git-blame file [options] file [revision] + +DESCRIPTION +----------- +Annotates each line in the given file with information from the commit +which introduced the line. Start annotation from the given revision. + +OPTIONS +------- +-c, --compability:: + Use the same output mode as git-annotate (Default: off). + +-l, --long:: + Show long rev (Defaults off). + +-S, --rev-file :: + Use revs from revs-file instead of calling git-rev-list. + +-h, --help:: + Show help message. + + +SEE ALSO +-------- +gitlink:git-annotate[1] + +AUTHOR +------ +Written by Fredrik Kuivinen . + +GIT +--- +Part of the gitlink:git[7] suite diff --git a/Documentation/git.txt b/Documentation/git.txt index 03d860b191..24ca55da68 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -399,6 +399,12 @@ gitlink:git-update-ref[1]:: Interrogators: +gitlink:git-annotate[1]:: + Annotate file lines with commit info. + +gitlink:git-blame[1]:: + Blame file lines on commits. + gitlink:git-check-ref-format[1]:: Make sure ref name is well formed. diff --git a/Makefile b/Makefile index 8371f7f522..8aed3af016 100644 --- a/Makefile +++ b/Makefile @@ -671,7 +671,6 @@ check-docs:: @for v in $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk; \ do \ case "$$v" in \ - git-annotate | git-blame | \ git-merge-octopus | git-merge-ours | git-merge-recursive | \ git-merge-resolve | git-merge-stupid | \ git-ssh-pull | git-ssh-push ) continue ;; \ From 4baff50551545e2b6825973ec37bcaf03edb95fe Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 18 Apr 2006 13:15:18 -0700 Subject: [PATCH 4/4] GIT 1.3.0 Signed-off-by: Junio C Hamano --- GIT-VERSION-GEN | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index e88fe5ae7c..7fcefcd7c4 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.3-rc4.GIT +DEF_VER=v1.3.GIT # First try git-describe, then see if there is a version file # (included in release tarballs), then default