From: Junio C Hamano Date: Sun, 9 Mar 2008 04:07:49 +0000 (-0800) Subject: Merge branch 'maint' to sync with 1.5.4.4 X-Git-Tag: v1.5.5-rc0~50 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ad416ed433fdcf838916a84177fe9e810be19eff?hp=-c Merge branch 'maint' to sync with 1.5.4.4 * maint: GIT 1.5.4.4 ident.c: reword error message when the user name cannot be determined Fix dcommit, rebase when rewriteRoot is in use Really make the LF after reset in fast-import optional --- ad416ed433fdcf838916a84177fe9e810be19eff diff --combined Documentation/RelNotes-1.5.5.txt index b57fa1eb1a,0000000000..874dad9a4f mode 100644,000000..100644 --- a/Documentation/RelNotes-1.5.5.txt +++ b/Documentation/RelNotes-1.5.5.txt @@@ -1,177 -1,0 +1,173 @@@ +GIT v1.5.5 Release Notes +======================== + +Updates since v1.5.4 +-------------------- + +(subsystems) + + * Comes with git-gui 0.9.3 + +(performance) + + * On platforms with suboptimal qsort(3) implementation, there + is an option to use more reasonable substitute we ship with + our software. + + * New configuration variable "pack.packsizelimit" can be used + in place of command line option --max-pack-size. + + * "git fetch" over the native git protocol used to make a + connection to find out the set of current remote refs and + another to actually download the pack data. We now use only + one connection for these tasks. + + * "git commit" does not run lstat(2) more than necessary + anymore. + +(usability, bells and whistles) + + * You can be warned when core.autocrlf conversion is applied in + such a way that results in an irreversible conversion. + + * A catch-all "color.ui" configuration variable can be used to + enable coloring of all color-capable commands, instead of + individual ones such as "color.status" and "color.branch". + + * The commands refused to take absolute pathnames where they + require pathnames relative to the work tree or the current + subdirectory. They now can take absolute pathnames in such a + case as long as the pathnames do not refer outside of the + work tree. E.g. "git add $(pwd)/foo" now works. + + * Error messages used to be sent to stderr, only to get hidden, + when $PAGER was in use. They now are sent to stdout along + with the command output to be shown in the $PAGER. + + * A pattern "foo/" in .gitignore file now matches a directory + "foo". Pattern "foo" also matches as before. + + * bash completion's prompt helper function can talk about + operation in-progress (e.g. merge, rebase, etc.). + + * Configuration variables "url..insteadof = " can be + used to tell "git-fetch" and "git-push" to use different URL than what + is given from the command line. + + * "git push HEAD" and "git push +HEAD" works as + expected; they push the current branch (and only the current branch). + In addition, HEAD can be written as the value of "remote..push" + configuration variable. + + * "git add -i" behaves better even before you make an initial commit. + + * "git am" refused to run from a subdirectory without a good reason. + + * After "git apply --whitespace=fix" fixes whitespace errors in a patch, + a line before the fix can appear as a context or preimage line in a + later patch, causing the patch not to apply. The command now knows to + see through whitespace fixes done to context lines to successfully + apply such a patch series. + + * "git branch" (and "git checkout -b") to branch from a local branch can + optionally set "branch..merge" to mark the new branch to build on + the other local branch, when "branch.autosetupmerge" is set to + "always". By default, this does not happen when branching from a local + branch. + + * "git checkout" to switch to a branch that has "branch..merge" set + (i.e. marked to build on another branch) reports how much the branch + and the other branch diverged. + + * When "git checkout" has to update a lot of paths, it used to be silent + for 4 seconds before it showed any progress report. It is now a bit + more impatient and starts showing progress report early. + + * "git commit" learned a new hook "prepare-commit-msg" that can + inspect what is going to be committed and prepare the commit + log message template to be edited. + + * "git cvsimport" can now take more than one -M options. + + * "git describe" learned to limit the tags to be used for + naming with --match option. + + * "git describe --contains" now barfs when the named commit + cannot be described. + + * "git describe --exact-match" describes only commits that are tagged. + + * "git describe --long" describes a tagged commit as $tag-0-$sha1, + instead of just showing the exact tagname. + + * "git describe" warns when using a tag whose name and path contradict + with each other. + + * "git diff" learned "--relative" option to limit and output paths + relative to the current directory when working in a subdirectory. + + * "git diff" learned "--dirstat" option to show birds-eye-summary of + changes more concisely than "--diffstat". + + * "git format-patch" learned --cover-letter option to generate a cover + letter template. + + * "git gc" learned --quiet option. + + * "git grep" now knows "--name-only" is a synonym for the "-l" option. + + * "git help " now reports "'git ' is alias to ", + instead of saying "No manual entry for git-". + + * "git log --grep=" learned "--fixed-strings" option to look for + without treating it as a regular expression. + + * "git gui" learned an auto-spell checking. + + * "git send-email" learned to prompt for passwords + interactively. + + * "git send-email" learned an easier way to suppress CC + recipients. + + * When the configuration variable "pack.threads" is set to 0, "git + repack" auto detects the number of CPUs and uses that many threads. + + * Various "git cvsimport", "git cvsexportcommit", "git svn" and + "git p4" improvements. + +(internal) + + * Duplicated code between git-help and git-instaweb that + launches user's preferred browser has been refactored. + + * It is now easier to write test scripts that records known + breakages. + + * "git checkout" is rewritten in C. + + * Two conflict hunks that are separated by a very short span of common + lines are now coalesced into one larger hunk, to make the result easier + to read. + + * Run-command API's use of file descriptors is documented clearer and + is more consistent now. + + +Fixes since v1.5.4 +------------------ + +All of the fixes in v1.5.4 maintenance series are included in +this release, unless otherwise noted. + - * "git-daemon" did not send early errors to syslog. - + * "git-http-push" did not allow deletion of remote ref with the usual + "push :" syntax. + - * "git-log --merge" did not well work with --left-right option. - + * "git-rebase --abort" did not go back to the right location if + "git-reset" was run during the "git-rebase" session. + +--- +exec >/var/tmp/1 +O=v1.5.4.3-428-g6b48990 +echo O=`git describe refs/heads/master` +git shortlog --no-merges $O..refs/heads/master ^refs/heads/maint diff --combined Documentation/git.txt index 741ae0e4c8,17aee93ec5..3ed24d449a --- a/Documentation/git.txt +++ b/Documentation/git.txt @@@ -43,12 -43,9 +43,13 @@@ unreleased) version of git, that is ava branch of the `git.git` repository. Documentation for older releases are available here: - * link:v1.5.4.3/git.html[documentation for release 1.5.4.3] -* link:v1.5.4/git.html[documentation for release 1.5.4] ++* link:v1.5.4.4/git.html[documentation for release 1.5.4.4] * release notes for ++ link:RelNotes-1.5.4.4.txt[1.5.4.4], + link:RelNotes-1.5.4.3.txt[1.5.4.3], + link:RelNotes-1.5.4.2.txt[1.5.4.2], + link:RelNotes-1.5.4.1.txt[1.5.4.1], link:RelNotes-1.5.4.txt[1.5.4]. * link:v1.5.3.8/git.html[documentation for release 1.5.3.8] diff --combined fast-import.c index 7f197d5e36,32ec159915..655913ddb2 --- a/fast-import.c +++ b/fast-import.c @@@ -372,8 -372,6 +372,8 @@@ static void write_branch_report(FILE *r fputc('\n', rpt); } +static void dump_marks_helper(FILE *, uintmax_t, struct mark_set *); + static void write_crash_report(const char *err) { char *loc = git_path("fast_import_crash_%d", getpid()); @@@ -432,37 -430,12 +432,37 @@@ write_branch_report(rpt, b); } + if (first_tag) { + struct tag *tg; + fputc('\n', rpt); + fputs("Annotated Tags\n", rpt); + fputs("--------------\n", rpt); + for (tg = first_tag; tg; tg = tg->next_tag) { + fputs(sha1_to_hex(tg->sha1), rpt); + fputc(' ', rpt); + fputs(tg->name, rpt); + fputc('\n', rpt); + } + } + + fputc('\n', rpt); + fputs("Marks\n", rpt); + fputs("-----\n", rpt); + if (mark_file) + fprintf(rpt, " exported to %s\n", mark_file); + else + dump_marks_helper(rpt, 0, marks); + fputc('\n', rpt); fputs("-------------------\n", rpt); fputs("END OF CRASH REPORT\n", rpt); fclose(rpt); } +static void end_packfile(void); +static void unkeep_all_packs(void); +static void dump_marks(void); + static NORETURN void die_nicely(const char *err, va_list params) { static int zombie; @@@ -476,9 -449,6 +476,9 @@@ if (!zombie) { zombie = 1; write_crash_report(message); + end_packfile(); + unkeep_all_packs(); + dump_marks(); } exit(128); } @@@ -2291,7 -2261,8 +2291,8 @@@ static void cmd_reset_branch(void else b = new_branch(sp); read_next_command(); - if (!cmd_from(b) && command_buf.len > 0) + cmd_from(b); + if (command_buf.len > 0) unread_command_buf = 1; } @@@ -2377,7 -2348,6 +2378,7 @@@ int main(int argc, const char **argv { unsigned int i, show_stats = 1; + setup_git_directory(); git_config(git_pack_config); if (!pack_compression_seen && core_compression_seen) pack_compression_level = core_compression_level; diff --combined git-svn.perl index 9e2faf90aa,29f39c0831..1195569529 --- a/git-svn.perl +++ b/git-svn.perl @@@ -186,9 -186,6 +186,9 @@@ my %cmd = "Show info about the latest SVN revision on the current branch", { 'url' => \$_url, } ], + 'blame' => [ \&Git::SVN::Log::cmd_blame, + "Show what revision and author last modified each line of a file", + {} ], ); my $cmd; @@@ -1250,8 -1247,7 +1250,8 @@@ use File::Path qw/mkpath/ use File::Copy qw/copy/; use IPC::Open3; -my $_repack_nr; +my ($_gc_nr, $_gc_period); + # properties that we do not log: my %SKIP_PROP; BEGIN { @@@ -1412,10 -1408,9 +1412,10 @@@ sub read_all_remotes } sub init_vars { - $_repack = 1000 unless (defined $_repack && $_repack > 0); - $_repack_nr = $_repack; - $_repack_flags ||= '-d'; + $_gc_nr = $_gc_period = 1000; + if (defined $_repack || defined $_repack_flags) { + warn "Repack options are obsolete; they have no effect.\n"; + } } sub verify_remotes_sanity { @@@ -1540,9 -1535,14 +1540,14 @@@ sub find_by_url { # repos_root and, pat $remotes->{$repo_id}->{$_}); } my $p = $path; + my $rwr = rewrite_root({repo_id => $repo_id}); unless (defined $p) { $p = $full_url; - $p =~ s#^\Q$u\E(?:/|$)## or next; + my $z = $u; + if ($rwr) { + $z = $rwr; + } + $p =~ s#^\Q$z\E(?:/|$)## or next; } foreach my $f (keys %$fetch) { next if $f ne $p; @@@ -2101,10 -2101,6 +2106,10 @@@ sub restore_commit_header_env } } +sub gc { + command_noisy('gc', '--auto'); +}; + sub do_git_commit { my ($self, $log_entry) = @_; my $lr = $self->last_rev; @@@ -2158,9 -2154,12 +2163,9 @@@ 0, $self->svm_uuid); } print " = $commit ($self->{ref_id})\n"; - if ($_repack && (--$_repack_nr == 0)) { - $_repack_nr = $_repack; - # repack doesn't use any arguments with spaces in them, does it? - print "Running git repack $_repack_flags ...\n"; - command_noisy('repack', split(/\s+/, $_repack_flags)); - print "Done repacking\n"; + if (--$_gc_nr == 0) { + $_gc_nr = $_gc_period; + gc(); } return $commit; } @@@ -2232,12 -2231,7 +2237,12 @@@ sub find_parent_branch # just grow a tail if we're not unique enough :x $ref_id .= '-' while find_ref($ref_id); print STDERR "Initializing parent: $ref_id\n"; - $gs = Git::SVN->init($new_url, '', $ref_id, $ref_id, 1); + my ($u, $p) = ($new_url, ''); + if ($u =~ s#^\Q$url\E(/|$)##) { + $p = $u; + $u = $url; + } + $gs = Git::SVN->init($u, $p, $self->{repo_id}, $ref_id, 1); } my ($r0, $parent) = $gs->find_rev_before($r, 1); if (!defined $r0 || !defined $parent) { @@@ -3995,7 -3989,6 +4000,7 @@@ sub gs_fetch_loop_common $max += $inc; $max = $head if ($max > $head); } + Git::SVN::gc(); } sub match_globs { @@@ -4452,24 -4445,6 +4457,24 @@@ out print commit_log_separator unless $incremental || $oneline; } +sub cmd_blame { + my $path = shift; + + config_pager(); + run_pager(); + + my ($fh, $ctx) = command_output_pipe('blame', @_, $path); + while (my $line = <$fh>) { + if ($line =~ /^\^?([[:xdigit:]]+)\s/) { + my (undef, $rev, undef) = ::cmt_metadata($1); + $rev = sprintf('%-10s', $rev); + $line =~ s/^\^?[[:xdigit:]]+(\s)/$rev$1/; + } + print $line; + } + command_close_pipe($fh, $ctx); +} + package Git::SVN::Migration; # these version numbers do NOT correspond to actual version numbers # of git nor git-svn. They are just relative. diff --combined t/t9300-fast-import.sh index cceedbb2b7,142d42f3b3..c4f4465dc6 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@@ -165,9 -165,9 +165,9 @@@ from refs/heads/maste M 755 0000000000000000000000000000000000000001 zero1 INPUT_END -test_expect_failure \ - 'B: fail on invalid blob sha1' \ - 'git-fast-import input <input <input <expect <