mirror of
https://github.com/git/git.git
synced 2026-04-03 21:40:11 +02:00
Merge branch 'master' of git://repo.or.cz/alt-git
This commit is contained in:
19
Documentation/RelNotes-1.6.5.2.txt
Normal file
19
Documentation/RelNotes-1.6.5.2.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
GIT v1.6.5.2 Release Notes
|
||||
==========================
|
||||
|
||||
Fixes since v1.6.5.1
|
||||
--------------------
|
||||
|
||||
* Installation of templates triggered a bug in busybox when using tar
|
||||
implementation from it.
|
||||
|
||||
* "git add -i" incorrectly ignored paths that are already in the index
|
||||
if they matched .gitignore patterns.
|
||||
|
||||
* "git describe --always" should have produced some output even there
|
||||
were no tags in the repository, but it didn't.
|
||||
|
||||
* "git ls-files" when showing tracked files incorrectly paid attention
|
||||
to the exclude patterns.
|
||||
|
||||
Other minor documentation updates are included.
|
||||
@@ -1,6 +1,14 @@
|
||||
GIT v1.6.6 Release Notes
|
||||
========================
|
||||
|
||||
In this release, "git fsck" defaults to "git fsck --full" and checks
|
||||
packfiles, and because of this it will take much longer to complete
|
||||
than before. If you prefer a quicker check only on loose objects (the
|
||||
old default), you can say "git fsck --no-full". This has been
|
||||
supported by 1.5.4 and newer versions of git, so it is safe to write
|
||||
it in your script even if you use slightly older git on some of your
|
||||
machines.
|
||||
|
||||
In git 1.7.0, which is planned to be the release after 1.6.6, "git
|
||||
push" into a branch that is currently checked out will be refused by
|
||||
default.
|
||||
@@ -38,8 +46,28 @@ Updates since v1.6.5
|
||||
|
||||
(usability, bells and whistles)
|
||||
|
||||
* The object replace mechanism can be bypassed with --no-replace-objects
|
||||
global option given to the "git" program.
|
||||
|
||||
* "git fsck" by default checks the packfiles (i.e. "--full" is the
|
||||
default); you can turn it off with "git fsck --no-full".
|
||||
|
||||
* import-tars contributed fast-import frontend learned more types of
|
||||
compressed tarballs.
|
||||
|
||||
* "git instaweb" knows how to talk with mod_cgid to apache2.
|
||||
|
||||
* "git log --decorate" shows the location of HEAD as well.
|
||||
|
||||
* "git rebase -i" learned "reword" that acts like "edit" but immediately
|
||||
starts an editor to tweak the log message without returning control to
|
||||
the shell, which is done by "edit" to give an opportunity to tweak the
|
||||
contents.
|
||||
|
||||
* Author names shown in gitweb output are links to search commits by the
|
||||
author.
|
||||
|
||||
|
||||
(developers)
|
||||
|
||||
Fixes since v1.6.5
|
||||
@@ -58,3 +86,23 @@ release, unless otherwise noted.
|
||||
whitespace attribute). The 'trailing-space' whitespace error class has
|
||||
become a short-hand to cover both of these and there is no behaviour
|
||||
change for existing set-ups.
|
||||
|
||||
* "git cvsimport" did not work well when it is fed filenames from the
|
||||
command line and is not started at the top of the work tree. We should
|
||||
backport this by merging f6fdbb6 (cvsimport: fix relative argument
|
||||
filenames, 2009-10-19).
|
||||
|
||||
* The way gitweb escapes its CGI parameters were broken especially when
|
||||
the parameter was a UTF-8 string. We may want to backport this to
|
||||
1.6.5.X series by merging 452e225 (gitweb: fix esc_param, 2009-10-13).
|
||||
|
||||
* gitweb used to show 'patch' link for merge commits but the output from
|
||||
it is not usable to feed "git am" with. We may want to backport this
|
||||
to 1.6.5.X series by merging 1655c98 (gitweb: Do not show 'patch' link
|
||||
for merge commits, 2009-10-09).
|
||||
|
||||
---
|
||||
exec >/var/tmp/1
|
||||
echo O=$(git describe master)
|
||||
O=v1.6.5.2-73-g9b12444
|
||||
git shortlog --no-merges $O..master --not maint
|
||||
|
||||
@@ -1324,6 +1324,11 @@ rebase.stat::
|
||||
Whether to show a diffstat of what changed upstream since the last
|
||||
rebase. False by default.
|
||||
|
||||
receive.autogc::
|
||||
By default, git-receive-pack will run "git-gc --auto" after
|
||||
receiving data from git-push and updating refs. You can stop
|
||||
it by setting this variable to false.
|
||||
|
||||
receive.fsckObjects::
|
||||
If it is set to true, git-receive-pack will check all received
|
||||
objects. It will abort in the case of a malformed object or a
|
||||
@@ -1359,6 +1364,10 @@ receive.denyNonFastForwards::
|
||||
even if that push is forced. This configuration variable is
|
||||
set when initializing a shared repository.
|
||||
|
||||
receive.updateserverinfo::
|
||||
If set to true, git-receive-pack will run git-update-server-info
|
||||
after receiving data from git-push and updating refs.
|
||||
|
||||
remote.<name>.url::
|
||||
The URL of a remote repository. See linkgit:git-fetch[1] or
|
||||
linkgit:git-push[1].
|
||||
|
||||
@@ -39,7 +39,7 @@ OPTIONS
|
||||
--local::
|
||||
-l::
|
||||
When the repository to clone from is on a local machine,
|
||||
this flag bypasses normal "git aware" transport
|
||||
this flag bypasses the normal "git aware" transport
|
||||
mechanism and clones the repository by making a copy of
|
||||
HEAD and everything under objects and refs directories.
|
||||
The files under `.git/objects/` directory are hardlinked
|
||||
@@ -60,7 +60,7 @@ OPTIONS
|
||||
-s::
|
||||
When the repository to clone is on the local machine,
|
||||
instead of using hard links, automatically setup
|
||||
.git/objects/info/alternates to share the objects
|
||||
`.git/objects/info/alternates` to share the objects
|
||||
with the source repository. The resulting repository
|
||||
starts out without any object of its own.
|
||||
+
|
||||
@@ -69,7 +69,7 @@ it unless you understand what it does. If you clone your
|
||||
repository using this option and then delete branches (or use any
|
||||
other git command that makes any existing commit unreferenced) in the
|
||||
source repository, some objects may become unreferenced (or dangling).
|
||||
These objects may be removed by normal git operations (such as 'git-commit')
|
||||
These objects may be removed by normal git operations (such as `git commit`)
|
||||
which automatically call `git gc --auto`. (See linkgit:git-gc[1].)
|
||||
If these objects are removed and were referenced by the cloned repository,
|
||||
then the cloned repository will become corrupt.
|
||||
@@ -86,13 +86,13 @@ objects from the source repository into a pack in the cloned repository.
|
||||
|
||||
--reference <repository>::
|
||||
If the reference repository is on the local machine,
|
||||
automatically setup .git/objects/info/alternates to
|
||||
automatically setup `.git/objects/info/alternates` to
|
||||
obtain objects from the reference repository. Using
|
||||
an already existing repository as an alternate will
|
||||
require fewer objects to be copied from the repository
|
||||
being cloned, reducing network and local storage costs.
|
||||
+
|
||||
*NOTE*: see NOTE to --shared option.
|
||||
*NOTE*: see the NOTE for the `--shared` option.
|
||||
|
||||
--quiet::
|
||||
-q::
|
||||
@@ -101,7 +101,7 @@ objects from the source repository into a pack in the cloned repository.
|
||||
|
||||
--verbose::
|
||||
-v::
|
||||
Display the progressbar, even in case the standard output is not
|
||||
Display the progress bar, even in case the standard output is not
|
||||
a terminal.
|
||||
|
||||
--no-checkout::
|
||||
@@ -121,17 +121,17 @@ objects from the source repository into a pack in the cloned repository.
|
||||
configuration variables are created.
|
||||
|
||||
--mirror::
|
||||
Set up a mirror of the remote repository. This implies --bare.
|
||||
Set up a mirror of the remote repository. This implies `--bare`.
|
||||
|
||||
--origin <name>::
|
||||
-o <name>::
|
||||
Instead of using the remote name 'origin' to keep track
|
||||
of the upstream repository, use <name>.
|
||||
Instead of using the remote name `origin` to keep track
|
||||
of the upstream repository, use `<name>`.
|
||||
|
||||
--branch <name>::
|
||||
-b <name>::
|
||||
Instead of pointing the newly created HEAD to the branch pointed
|
||||
to by the cloned repository's HEAD, point to <name> branch
|
||||
to by the cloned repository's HEAD, point to `<name>` branch
|
||||
instead. In a non-bare repository, this is the branch that will
|
||||
be checked out.
|
||||
|
||||
@@ -158,7 +158,7 @@ objects from the source repository into a pack in the cloned repository.
|
||||
--recursive::
|
||||
After the clone is created, initialize all submodules within,
|
||||
using their default settings. This is equivalent to running
|
||||
'git submodule update --init --recursive' immediately after
|
||||
`git submodule update --init --recursive` immediately after
|
||||
the clone is finished. This option is ignored if the cloned
|
||||
repository does not have a worktree/checkout (i.e. if any of
|
||||
`--no-checkout`/`-n`, `--bare`, or `--mirror` is given)
|
||||
@@ -171,8 +171,8 @@ objects from the source repository into a pack in the cloned repository.
|
||||
<directory>::
|
||||
The name of a new directory to clone into. The "humanish"
|
||||
part of the source repository is used if no directory is
|
||||
explicitly given ("repo" for "/path/to/repo.git" and "foo"
|
||||
for "host.xz:foo/.git"). Cloning into an existing directory
|
||||
explicitly given (`repo` for `/path/to/repo.git` and `foo`
|
||||
for `host.xz:foo/.git`). Cloning into an existing directory
|
||||
is only allowed if the directory is empty.
|
||||
|
||||
:git-clone: 1
|
||||
|
||||
@@ -10,7 +10,7 @@ SYNOPSIS
|
||||
--------
|
||||
[verse]
|
||||
'git fsck' [--tags] [--root] [--unreachable] [--cache] [--no-reflogs]
|
||||
[--full] [--strict] [--verbose] [--lost-found] [<object>*]
|
||||
[--[no-]full] [--strict] [--verbose] [--lost-found] [<object>*]
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
@@ -52,7 +52,8 @@ index file, all SHA1 references in .git/refs/*, and all reflogs (unless
|
||||
or $GIT_DIR/objects/info/alternates,
|
||||
and in packed git archives found in $GIT_DIR/objects/pack
|
||||
and corresponding pack subdirectories in alternate
|
||||
object pools.
|
||||
object pools. This is now default; you can turn it off
|
||||
with --no-full.
|
||||
|
||||
--strict::
|
||||
Enable more strict checking, namely to catch a file mode
|
||||
|
||||
@@ -43,9 +43,10 @@ unreleased) version of git, that is available from 'master'
|
||||
branch of the `git.git` repository.
|
||||
Documentation for older releases are available here:
|
||||
|
||||
* link:v1.6.5/git.html[documentation for release 1.6.5]
|
||||
* link:v1.6.5.2/git.html[documentation for release 1.6.5.2]
|
||||
|
||||
* release notes for
|
||||
link:RelNotes-1.6.5.2.txt[1.6.5.2],
|
||||
link:RelNotes-1.6.5.1.txt[1.6.5.1],
|
||||
link:RelNotes-1.6.5.txt[1.6.5].
|
||||
|
||||
|
||||
@@ -351,7 +351,7 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
|
||||
}
|
||||
|
||||
for_each_ref(get_name, NULL);
|
||||
if (!found_names)
|
||||
if (!found_names && !always)
|
||||
die("No names found, cannot describe anything.");
|
||||
|
||||
if (argc == 0) {
|
||||
|
||||
@@ -19,7 +19,7 @@ static int show_root;
|
||||
static int show_tags;
|
||||
static int show_unreachable;
|
||||
static int include_reflogs = 1;
|
||||
static int check_full;
|
||||
static int check_full = 1;
|
||||
static int check_strict;
|
||||
static int keep_cache_objects;
|
||||
static unsigned char head_sha1[20];
|
||||
|
||||
11
builtin-gc.c
11
builtin-gc.c
@@ -216,10 +216,13 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
|
||||
*/
|
||||
if (!need_to_gc())
|
||||
return 0;
|
||||
fprintf(stderr, "Auto packing your repository for optimum "
|
||||
"performance. You may also\n"
|
||||
"run \"git gc\" manually. See "
|
||||
"\"git help gc\" for more information.\n");
|
||||
fprintf(stderr,
|
||||
"Auto packing the repository for optimum performance.%s\n",
|
||||
quiet
|
||||
? ""
|
||||
: (" You may also\n"
|
||||
"run \"git gc\" manually. See "
|
||||
"\"git help gc\" for more information."));
|
||||
} else
|
||||
append_option(argv_repack,
|
||||
prune_expire && !strcmp(prune_expire, "now")
|
||||
|
||||
@@ -28,6 +28,8 @@ static int transfer_unpack_limit = -1;
|
||||
static int unpack_limit = 100;
|
||||
static int report_status;
|
||||
static int prefer_ofs_delta = 1;
|
||||
static int auto_update_server_info;
|
||||
static int auto_gc = 1;
|
||||
static const char *head_name;
|
||||
static char *capabilities_to_send;
|
||||
|
||||
@@ -88,6 +90,16 @@ static int receive_pack_config(const char *var, const char *value, void *cb)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (strcmp(var, "receive.updateserverinfo") == 0) {
|
||||
auto_update_server_info = git_config_bool(var, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (strcmp(var, "receive.autogc") == 0) {
|
||||
auto_gc = git_config_bool(var, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return git_default_config(var, value, cb);
|
||||
}
|
||||
|
||||
@@ -672,6 +684,14 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix)
|
||||
report(unpack_status);
|
||||
run_receive_hook(post_receive_hook);
|
||||
run_update_post_hook(commands);
|
||||
if (auto_gc) {
|
||||
const char *argv_gc_auto[] = {
|
||||
"gc", "--auto", "--quiet", NULL,
|
||||
};
|
||||
run_command_v_opt(argv_gc_auto, RUN_GIT_CMD);
|
||||
}
|
||||
if (auto_update_server_info)
|
||||
update_server_info(0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ use Getopt::Long;
|
||||
|
||||
my $metaext = '';
|
||||
|
||||
die "usage: import-tars [--metainfo=extension] *.tar.{gz,bz2,Z}\n"
|
||||
die "usage: import-tars [--metainfo=extension] *.tar.{gz,bz2,lzma,xz,Z}\n"
|
||||
unless GetOptions('metainfo=s' => \$metaext) && @ARGV;
|
||||
|
||||
my $branch_name = 'import-tars';
|
||||
@@ -49,6 +49,9 @@ foreach my $tar_file (@ARGV)
|
||||
} elsif ($tar_name =~ s/\.tar\.Z$//) {
|
||||
open(I, '-|', 'uncompress', '-c', $tar_file)
|
||||
or die "Unable to uncompress -c $tar_file: $!\n";
|
||||
} elsif ($tar_name =~ s/\.(tar\.(lzma|xz)|(tlz|txz))$//) {
|
||||
open(I, '-|', 'xz', '-dc', $tar_file)
|
||||
or die "Unable to xz -dc $tar_file: $!\n";
|
||||
} elsif ($tar_name =~ s/\.tar$//) {
|
||||
open(I, $tar_file) or die "Unable to open $tar_file: $!\n";
|
||||
} else {
|
||||
|
||||
@@ -579,10 +579,21 @@ sub get_headref ($) {
|
||||
return $r;
|
||||
}
|
||||
|
||||
my $user_filename_prepend = '';
|
||||
sub munge_user_filename {
|
||||
my $name = shift;
|
||||
return File::Spec->file_name_is_absolute($name) ?
|
||||
$name :
|
||||
$user_filename_prepend . $name;
|
||||
}
|
||||
|
||||
-d $git_tree
|
||||
or mkdir($git_tree,0777)
|
||||
or die "Could not create $git_tree: $!";
|
||||
chdir($git_tree);
|
||||
if ($git_tree ne '.') {
|
||||
$user_filename_prepend = getwd() . '/';
|
||||
chdir($git_tree);
|
||||
}
|
||||
|
||||
my $last_branch = "";
|
||||
my $orig_branch = "";
|
||||
@@ -644,7 +655,7 @@ unless (-d $git_dir) {
|
||||
-f "$git_dir/cvs-authors" and
|
||||
read_author_info("$git_dir/cvs-authors");
|
||||
if ($opt_A) {
|
||||
read_author_info($opt_A);
|
||||
read_author_info(munge_user_filename($opt_A));
|
||||
write_author_info("$git_dir/cvs-authors");
|
||||
}
|
||||
|
||||
@@ -679,7 +690,7 @@ unless ($opt_P) {
|
||||
$? == 0 or die "git-cvsimport: fatal: cvsps reported error\n";
|
||||
close $cvspsfh;
|
||||
} else {
|
||||
$cvspsfile = $opt_P;
|
||||
$cvspsfile = munge_user_filename($opt_P);
|
||||
}
|
||||
|
||||
open(CVS, "<$cvspsfile") or die $!;
|
||||
|
||||
@@ -32,6 +32,10 @@ img.avatar {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
a.list img.avatar {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
div.page_header {
|
||||
height: 25px;
|
||||
padding: 8px;
|
||||
|
||||
@@ -1607,6 +1607,29 @@ sub git_get_avatar {
|
||||
}
|
||||
}
|
||||
|
||||
sub format_search_author {
|
||||
my ($author, $searchtype, $displaytext) = @_;
|
||||
my $have_search = gitweb_check_feature('search');
|
||||
|
||||
if ($have_search) {
|
||||
my $performed = "";
|
||||
if ($searchtype eq 'author') {
|
||||
$performed = "authored";
|
||||
} elsif ($searchtype eq 'committer') {
|
||||
$performed = "committed";
|
||||
}
|
||||
|
||||
return $cgi->a({-href => href(action=>"search", hash=>$hash,
|
||||
searchtext=>$author,
|
||||
searchtype=>$searchtype), class=>"list",
|
||||
title=>"Search for commits $performed by $author"},
|
||||
$displaytext);
|
||||
|
||||
} else {
|
||||
return $displaytext;
|
||||
}
|
||||
}
|
||||
|
||||
# format the author name of the given commit with the given tag
|
||||
# the author name is chopped and escaped according to the other
|
||||
# optional parameters (see chop_str).
|
||||
@@ -1615,8 +1638,10 @@ sub format_author_html {
|
||||
my $co = shift;
|
||||
my $author = chop_and_escape_str($co->{'author_name'}, @_);
|
||||
return "<$tag class=\"author\">" .
|
||||
git_get_avatar($co->{'author_email'}, -pad_after => 1) .
|
||||
$author . "</$tag>";
|
||||
format_search_author($co->{'author_name'}, "author",
|
||||
git_get_avatar($co->{'author_email'}, -pad_after => 1) .
|
||||
$author) .
|
||||
"</$tag>";
|
||||
}
|
||||
|
||||
# format git diff header line, i.e. "diff --(git|combined|cc) ..."
|
||||
@@ -3400,10 +3425,11 @@ sub git_print_authorship {
|
||||
my $co = shift;
|
||||
my %opts = @_;
|
||||
my $tag = $opts{-tag} || 'div';
|
||||
my $author = $co->{'author_name'};
|
||||
|
||||
my %ad = parse_date($co->{'author_epoch'}, $co->{'author_tz'});
|
||||
print "<$tag class=\"author_date\">" .
|
||||
esc_html($co->{'author_name'}) .
|
||||
format_search_author($author, "author", esc_html($author)) .
|
||||
" [$ad{'rfc2822'}";
|
||||
print_local_time(%ad) if ($opts{-localtime});
|
||||
print "]" . git_get_avatar($co->{'author_email'}, -pad_before => 1)
|
||||
@@ -3422,8 +3448,12 @@ sub git_print_authorship_rows {
|
||||
@people = ('author', 'committer') unless @people;
|
||||
foreach my $who (@people) {
|
||||
my %wd = parse_date($co->{"${who}_epoch"}, $co->{"${who}_tz"});
|
||||
print "<tr><td>$who</td><td>" . esc_html($co->{$who}) . "</td>" .
|
||||
"<td rowspan=\"2\">" .
|
||||
print "<tr><td>$who</td><td>" .
|
||||
format_search_author($co->{"${who}_name"}, $who,
|
||||
esc_html($co->{"${who}_name"})) . " " .
|
||||
format_search_author($co->{"${who}_email"}, $who,
|
||||
esc_html("<" . $co->{"${who}_email"} . ">")) .
|
||||
"</td><td rowspan=\"2\">" .
|
||||
git_get_avatar($co->{"${who}_email"}, -size => 'double') .
|
||||
"</td></tr>\n" .
|
||||
"<tr>" .
|
||||
|
||||
@@ -1357,8 +1357,6 @@ unsigned long get_size_from_delta(struct packed_git *p,
|
||||
in = use_pack(p, w_curs, curpos, &stream.avail_in);
|
||||
stream.next_in = in;
|
||||
st = git_inflate(&stream, Z_FINISH);
|
||||
if (st == Z_BUF_ERROR && (stream.avail_in || !stream.avail_out))
|
||||
break;
|
||||
curpos += stream.next_in - in;
|
||||
} while ((st == Z_OK || st == Z_BUF_ERROR) &&
|
||||
stream.total_out < sizeof(delta_head));
|
||||
@@ -1589,15 +1587,15 @@ static void *unpack_compressed_entry(struct packed_git *p,
|
||||
buffer[size] = 0;
|
||||
memset(&stream, 0, sizeof(stream));
|
||||
stream.next_out = buffer;
|
||||
stream.avail_out = size;
|
||||
stream.avail_out = size + 1;
|
||||
|
||||
git_inflate_init(&stream);
|
||||
do {
|
||||
in = use_pack(p, w_curs, curpos, &stream.avail_in);
|
||||
stream.next_in = in;
|
||||
st = git_inflate(&stream, Z_FINISH);
|
||||
if (st == Z_BUF_ERROR && (stream.avail_in || !stream.avail_out))
|
||||
break;
|
||||
if (!stream.avail_out)
|
||||
break; /* the payload is larger than it should be */
|
||||
curpos += stream.next_in - in;
|
||||
} while (st == Z_OK || st == Z_BUF_ERROR);
|
||||
git_inflate_end(&stream);
|
||||
|
||||
@@ -34,6 +34,8 @@ test_expect_success setup '
|
||||
echo one >file && git add file && git commit -m initial &&
|
||||
one=$(git rev-parse HEAD) &&
|
||||
|
||||
git describe --always HEAD &&
|
||||
|
||||
test_tick &&
|
||||
echo two >file && git add file && git commit -m second &&
|
||||
two=$(git rev-parse HEAD) &&
|
||||
|
||||
@@ -136,7 +136,7 @@ test_expect_success 'GIT_DIFFTOOL_PROMPT variable' '
|
||||
GIT_DIFFTOOL_PROMPT=true &&
|
||||
export GIT_DIFFTOOL_PROMPT &&
|
||||
|
||||
prompt=$(echo | git difftool --prompt branch | tail -1) &&
|
||||
prompt=$(echo | git difftool branch | tail -1) &&
|
||||
prompt_given "$prompt" &&
|
||||
|
||||
restore_test_defaults
|
||||
|
||||
@@ -50,4 +50,4 @@ clean:
|
||||
install: all
|
||||
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(template_instdir_SQ)'
|
||||
(cd blt && $(TAR) cf - .) | \
|
||||
(cd '$(DESTDIR_SQ)$(template_instdir_SQ)' && umask 022 && $(TAR) xfo -)
|
||||
(cd '$(DESTDIR_SQ)$(template_instdir_SQ)' && umask 022 && $(TAR) xof -)
|
||||
|
||||
Reference in New Issue
Block a user