зеркало из https://github.com/microsoft/git.git
git-svn: unlink index files that were globbed, too
commit 3157dd9e89
(git-svn: unlink
internal index files after operations) introduced unlinking
index files after fetching. However, this missed indices for
refs that were created by globbing branches and tags. This will
track all refs we ever touch during a fetch and unlink them at
exit time.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
7dfa16b9dc
Коммит
321b1842dc
|
@ -1283,8 +1283,11 @@ BEGIN {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
my %LOCKFILES;
|
my (%LOCKFILES, %INDEX_FILES);
|
||||||
END { unlink keys %LOCKFILES if %LOCKFILES }
|
END {
|
||||||
|
unlink keys %LOCKFILES if %LOCKFILES;
|
||||||
|
unlink keys %INDEX_FILES if %INDEX_FILES;
|
||||||
|
}
|
||||||
|
|
||||||
sub resolve_local_globs {
|
sub resolve_local_globs {
|
||||||
my ($url, $fetch, $glob_spec) = @_;
|
my ($url, $fetch, $glob_spec) = @_;
|
||||||
|
@ -1376,7 +1379,6 @@ sub fetch_all {
|
||||||
|
|
||||||
($base, $head) = parse_revision_argument($base, $head);
|
($base, $head) = parse_revision_argument($base, $head);
|
||||||
$ra->gs_fetch_loop_common($base, $head, \@gs, \@globs);
|
$ra->gs_fetch_loop_common($base, $head, \@gs, \@globs);
|
||||||
unlink $_->{index} foreach @gs;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub read_all_remotes {
|
sub read_all_remotes {
|
||||||
|
@ -3945,6 +3947,7 @@ sub gs_fetch_loop_common {
|
||||||
if ($log_entry) {
|
if ($log_entry) {
|
||||||
$gs->do_git_commit($log_entry);
|
$gs->do_git_commit($log_entry);
|
||||||
}
|
}
|
||||||
|
$INDEX_FILES{$gs->{index}} = 1;
|
||||||
}
|
}
|
||||||
foreach my $g (@$globs) {
|
foreach my $g (@$globs) {
|
||||||
my $k = "svn-remote.$g->{remote}." .
|
my $k = "svn-remote.$g->{remote}." .
|
||||||
|
|
Загрузка…
Ссылка в новой задаче