Merge branch 'maint'
* maint: add -p: warn if only binary changes present git-archive: work in bare repos git-svn: change dashed git-config to git config
This commit is contained in:
commit
304d058370
@ -336,5 +336,7 @@ int write_archive(int argc, const char **argv, const char *prefix,
|
|||||||
parse_treeish_arg(argv, &args, prefix);
|
parse_treeish_arg(argv, &args, prefix);
|
||||||
parse_pathspec_arg(argv + 1, &args);
|
parse_pathspec_arg(argv + 1, &args);
|
||||||
|
|
||||||
|
git_config(git_default_config, NULL);
|
||||||
|
|
||||||
return ar->write_archive(&args);
|
return ar->write_archive(&args);
|
||||||
}
|
}
|
||||||
|
@ -111,8 +111,6 @@ int cmd_archive(int argc, const char **argv, const char *prefix)
|
|||||||
{
|
{
|
||||||
const char *remote = NULL;
|
const char *remote = NULL;
|
||||||
|
|
||||||
git_config(git_default_config, NULL);
|
|
||||||
|
|
||||||
remote = extract_remote_arg(&argc, argv);
|
remote = extract_remote_arg(&argc, argv);
|
||||||
if (remote)
|
if (remote)
|
||||||
return run_remote_archiver(remote, argc, argv);
|
return run_remote_archiver(remote, argc, argv);
|
||||||
|
@ -811,11 +811,16 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub patch_update_cmd {
|
sub patch_update_cmd {
|
||||||
my @mods = grep { !($_->{BINARY}) } list_modified('file-only');
|
my @all_mods = list_modified('file-only');
|
||||||
|
my @mods = grep { !($_->{BINARY}) } @all_mods;
|
||||||
my @them;
|
my @them;
|
||||||
|
|
||||||
if (!@mods) {
|
if (!@mods) {
|
||||||
|
if (@all_mods) {
|
||||||
|
print STDERR "Only binary files changed.\n";
|
||||||
|
} else {
|
||||||
print STDERR "No changes.\n";
|
print STDERR "No changes.\n";
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if ($patch_mode) {
|
if ($patch_mode) {
|
||||||
|
@ -1191,7 +1191,7 @@ sub read_repo_config {
|
|||||||
my $v = $opts->{$o};
|
my $v = $opts->{$o};
|
||||||
my ($key) = ($o =~ /^([a-zA-Z\-]+)/);
|
my ($key) = ($o =~ /^([a-zA-Z\-]+)/);
|
||||||
$key =~ s/-//g;
|
$key =~ s/-//g;
|
||||||
my $arg = 'git-config';
|
my $arg = 'git config';
|
||||||
$arg .= ' --int' if ($o =~ /[:=]i$/);
|
$arg .= ' --int' if ($o =~ /[:=]i$/);
|
||||||
$arg .= ' --bool' if ($o !~ /[:=][sfi]$/);
|
$arg .= ' --bool' if ($o !~ /[:=][sfi]$/);
|
||||||
if (ref $v eq 'ARRAY') {
|
if (ref $v eq 'ARRAY') {
|
||||||
|
@ -57,6 +57,11 @@ test_expect_success \
|
|||||||
git update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \
|
git update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \
|
||||||
git commit-tree $treeid </dev/null)'
|
git commit-tree $treeid </dev/null)'
|
||||||
|
|
||||||
|
test_expect_success \
|
||||||
|
'create bare clone' \
|
||||||
|
'git clone --bare . bare.git &&
|
||||||
|
cp .gitattributes bare.git/info/attributes'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
'remove ignored file' \
|
'remove ignored file' \
|
||||||
'rm a/ignored'
|
'rm a/ignored'
|
||||||
@ -73,6 +78,14 @@ test_expect_success \
|
|||||||
'git archive vs. git tar-tree' \
|
'git archive vs. git tar-tree' \
|
||||||
'diff b.tar b2.tar'
|
'diff b.tar b2.tar'
|
||||||
|
|
||||||
|
test_expect_success \
|
||||||
|
'git archive in a bare repo' \
|
||||||
|
'(cd bare.git && git archive HEAD) >b3.tar'
|
||||||
|
|
||||||
|
test_expect_success \
|
||||||
|
'git archive vs. the same in a bare repo' \
|
||||||
|
'test_cmp b.tar b3.tar'
|
||||||
|
|
||||||
test_expect_success \
|
test_expect_success \
|
||||||
'validate file modification time' \
|
'validate file modification time' \
|
||||||
'mkdir extract &&
|
'mkdir extract &&
|
||||||
@ -151,6 +164,14 @@ test_expect_success \
|
|||||||
'git archive --format=zip' \
|
'git archive --format=zip' \
|
||||||
'git archive --format=zip HEAD >d.zip'
|
'git archive --format=zip HEAD >d.zip'
|
||||||
|
|
||||||
|
test_expect_success \
|
||||||
|
'git archive --format=zip in a bare repo' \
|
||||||
|
'(cd bare.git && git archive --format=zip HEAD) >d1.zip'
|
||||||
|
|
||||||
|
test_expect_success \
|
||||||
|
'git archive --format=zip vs. the same in a bare repo' \
|
||||||
|
'test_cmp d.zip d1.zip'
|
||||||
|
|
||||||
$UNZIP -v >/dev/null 2>&1
|
$UNZIP -v >/dev/null 2>&1
|
||||||
if [ $? -eq 127 ]; then
|
if [ $? -eq 127 ]; then
|
||||||
echo "Skipping ZIP tests, because unzip was not found"
|
echo "Skipping ZIP tests, because unzip was not found"
|
||||||
|
Loading…
Reference in New Issue
Block a user