Merge branch 'rs/zip-text'
authorJunio C Hamano <gitster@pobox.com>
Tue, 17 Mar 2015 23:01:27 +0000 (16:01 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 Mar 2015 23:01:27 +0000 (16:01 -0700)
"git archive" can now be told to set the 'text' attribute in the
resulting zip archive.

* rs/zip-text:
archive-zip: mark text files in archives

1  2 
archive-zip.c
t/t5003-archive-zip.sh
diff --cc archive-zip.c
Simple merge
index c929db563326614e01962b3e322f087640fa19d9,fb8cdf68bc73192e49ff58760a7e0e7af931bd71..14744b2a4b1e646890176ec53970d36de6f8ec3b
@@@ -61,12 -104,18 +104,14 @@@ test_expect_success 
      'echo ignore me >a/ignored &&
       echo ignored export-ignore >.git/info/attributes'
  
 -test_expect_success \
 -    'add files to repository' \
 -    'find a -type f | xargs git update-index --add &&
 -     find a -type l | xargs git update-index --add &&
 -     treeid=`git write-tree` &&
 -     echo $treeid >treeid &&
 -     git update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \
 -     git commit-tree $treeid </dev/null)'
 +test_expect_success 'add files to repository' '
 +      git add a &&
 +      GIT_COMMITTER_DATE="2005-05-27 22:00" git commit -m initial
 +'
  
- test_expect_success 'setup export-subst' '
+ test_expect_success 'setup export-subst and diff attributes' '
+       echo "a/nodiff.* -diff" >>.git/info/attributes &&
+       echo "a/diff.* diff" >>.git/info/attributes &&
        echo "substfile?" export-subst >>.git/info/attributes &&
        git log --max-count=1 "--pretty=format:A${SUBSTFORMAT}O" HEAD \
                >a/substfile1