aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-10-26 16:21:08 -0700
committerJunio C Hamano <gitster@pobox.com>2008-10-26 16:21:08 -0700
commit304d058370a9a797c38ec739c6d39fa45d9ed8e5 (patch)
tree36488ea65db3ef57e6be9cb87c89283362fbc878
parentb8492539f9c078162ee3ae4987ceaa7e7f510c9b (diff)
parent9fe7a643fcc56ca1c17afec5d5f8adca10cabdd1 (diff)
downloadgit-304d058370a9a797c38ec739c6d39fa45d9ed8e5.tar.gz
git-304d058370a9a797c38ec739c6d39fa45d9ed8e5.tar.xz
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
-rw-r--r--archive.c2
-rw-r--r--builtin-archive.c2
-rwxr-xr-xgit-add--interactive.perl9
-rwxr-xr-xgit-svn.perl2
-rwxr-xr-xt/t5000-tar-tree.sh21
5 files changed, 31 insertions, 5 deletions
diff --git a/archive.c b/archive.c
index 849eed553..9ac455d88 100644
--- a/archive.c
+++ b/archive.c
@@ -336,5 +336,7 @@ int write_archive(int argc, const char **argv, const char *prefix,
parse_treeish_arg(argv, &args, prefix);
parse_pathspec_arg(argv + 1, &args);
+ git_config(git_default_config, NULL);
+
return ar->write_archive(&args);
}
diff --git a/builtin-archive.c b/builtin-archive.c
index 432ce2acc..5ceec433f 100644
--- a/builtin-archive.c
+++ b/builtin-archive.c
@@ -111,8 +111,6 @@ int cmd_archive(int argc, const char **argv, const char *prefix)
{
const char *remote = NULL;
- git_config(git_default_config, NULL);
-
remote = extract_remote_arg(&argc, argv);
if (remote)
return run_remote_archiver(remote, argc, argv);
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index da768ee7a..b0223c341 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -811,11 +811,16 @@ EOF
}
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;
if (!@mods) {
- print STDERR "No changes.\n";
+ if (@all_mods) {
+ print STDERR "Only binary files changed.\n";
+ } else {
+ print STDERR "No changes.\n";
+ }
return 0;
}
if ($patch_mode) {
diff --git a/git-svn.perl b/git-svn.perl
index ef6d773df..f90ddac90 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1191,7 +1191,7 @@ sub read_repo_config {
my $v = $opts->{$o};
my ($key) = ($o =~ /^([a-zA-Z\-]+)/);
$key =~ s/-//g;
- my $arg = 'git-config';
+ my $arg = 'git config';
$arg .= ' --int' if ($o =~ /[:=]i$/);
$arg .= ' --bool' if ($o !~ /[:=][sfi]$/);
if (ref $v eq 'ARRAY') {
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index e395ff4e3..0f27d7304 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -58,6 +58,11 @@ test_expect_success \
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 \
'remove ignored file' \
'rm a/ignored'
@@ -74,6 +79,14 @@ test_expect_success \
'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 \
'validate file modification time' \
'mkdir extract &&
"$TAR" xf b.tar -C extract a/a &&
@@ -151,6 +164,14 @@ test_expect_success \
'git archive --format=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
if [ $? -eq 127 ]; then
echo "Skipping ZIP tests, because unzip was not found"