git →
1:2.6.4-1 →
armhf → 2015-12-16 11:31:32
sbuild (Debian sbuild) 0.65.2 (24 Mar 2015) on testbuildd.raspbian.org
╔══════════════════════════════════════════════════════════════════════════════╗
║ git 1:2.6.4-1 (armhf) 16 Dec 2015 10:36 ║
╚══════════════════════════════════════════════════════════════════════════════╝
Package: git
Version: 1:2.6.4-1
Source Version: 1:2.6.4-1
Distribution: stretch-staging
Machine Architecture: armhf
Host Architecture: armhf
Build Architecture: armhf
I: NOTICE: Log filtering will replace 'build/git-swmT1A/git-2.6.4' with '«PKGBUILDDIR»'
I: NOTICE: Log filtering will replace 'build/git-swmT1A' with '«BUILDDIR»'
I: NOTICE: Log filtering will replace 'var/lib/schroot/mount/stretch-staging-armhf-sbuild-4888389c-7c2f-446b-8532-61efa9b2f323' with '«CHROOT»'
┌──────────────────────────────────────────────────────────────────────────────┐
│ Update chroot │
└──────────────────────────────────────────────────────────────────────────────┘
Get:1 http://172.17.0.1 stretch-staging InRelease [11.3 kB]
Get:2 http://172.17.0.1 stretch-staging/main Sources [8534 kB]
Get:3 http://172.17.0.1 stretch-staging/main armhf Packages [10.5 MB]
Ign http://172.17.0.1 stretch-staging/main Translation-en
Fetched 19.0 MB in 36s (527 kB/s)
Reading package lists...
┌──────────────────────────────────────────────────────────────────────────────┐
│ Fetch source files │
└──────────────────────────────────────────────────────────────────────────────┘
Check APT
─────────
Checking available source versions...
Download source files with APT
──────────────────────────────
Reading package lists...
Building dependency tree...
Reading state information...
NOTICE: 'git' packaging is maintained in the 'Git' version control system at:
https://repo.or.cz/r/git/debian.git/
Need to get 4319 kB of source archives.
Get:1 http://172.17.0.1/private/ stretch-staging/main git 1:2.6.4-1 (dsc) [2765 B]
Get:2 http://172.17.0.1/private/ stretch-staging/main git 1:2.6.4-1 (tar) [3821 kB]
Get:3 http://172.17.0.1/private/ stretch-staging/main git 1:2.6.4-1 (diff) [496 kB]
Fetched 4319 kB in 1s (2297 kB/s)
Download complete and in download only mode
Check architectures
───────────────────
Check dependencies
──────────────────
Merged Build-Depends: build-essential, fakeroot
Filtered Build-Depends: build-essential, fakeroot
dpkg-deb: building package 'sbuild-build-depends-core-dummy' in '/«BUILDDIR»/resolver-aymIDQ/apt_archive/sbuild-build-depends-core-dummy.deb'.
OK
Ign file: ./ InRelease
Get:1 file: ./ Release.gpg [299 B]
Get:2 file: ./ Release [2119 B]
Ign file: ./ Translation-en
Reading package lists...
Reading package lists...
┌──────────────────────────────────────────────────────────────────────────────┐
│ Install core build dependencies (apt-based resolver) │
└──────────────────────────────────────────────────────────────────────────────┘
Installing build dependencies
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
sbuild-build-depends-core-dummy
debconf: delaying package configuration, since apt-utils is not installed
0 upgraded, 1 newly installed, 0 to remove and 27 not upgraded.
Need to get 0 B/768 B of archives.
After this operation, 0 B of additional disk space will be used.
Selecting previously unselected package sbuild-build-depends-core-dummy.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 12030 files and directories currently installed.)
Preparing to unpack .../sbuild-build-depends-core-dummy.deb ...
Unpacking sbuild-build-depends-core-dummy (0.invalid.0) ...
Setting up sbuild-build-depends-core-dummy (0.invalid.0) ...
Merged Build-Depends: libc6-dev | libc-dev, gcc (>= 4:4.9.1), g++ (>= 4:4.9.1), make, dpkg-dev (>= 1.17.11), libz-dev, libpcre3-dev, gettext, libcurl4-gnutls-dev, libexpat1-dev, subversion, libsvn-perl, libyaml-perl, tcl, libhttp-date-perl | libtime-modules-perl, python, cvs, cvsps, libdbd-sqlite3-perl, unzip, libio-pty-perl, dpkg-dev (>= 1.16.2~)
Filtered Build-Depends: libc6-dev, gcc (>= 4:4.9.1), g++ (>= 4:4.9.1), make, dpkg-dev (>= 1.17.11), libz-dev, libpcre3-dev, gettext, libcurl4-gnutls-dev, libexpat1-dev, subversion, libsvn-perl, libyaml-perl, tcl, libhttp-date-perl, python, cvs, cvsps, libdbd-sqlite3-perl, unzip, libio-pty-perl, dpkg-dev (>= 1.16.2~)
dpkg-deb: building package 'sbuild-build-depends-git-dummy' in '/«BUILDDIR»/resolver-K_qzEK/apt_archive/sbuild-build-depends-git-dummy.deb'.
OK
Ign file: ./ InRelease
Get:1 file: ./ Release.gpg [299 B]
Get:2 file: ./ Release [2119 B]
Ign file: ./ Translation-en
Reading package lists...
Reading package lists...
┌──────────────────────────────────────────────────────────────────────────────┐
│ Install git build dependencies (apt-based resolver) │
└──────────────────────────────────────────────────────────────────────────────┘
Installing build dependencies
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
cvs cvsps gettext gettext-base libapr1 libaprutil1 libbsd0 libcroco3
libcurl3-gnutls libcurl4-gnutls-dev libdbd-sqlite3-perl libdbi-perl
libexpat1 libexpat1-dev libffi6 libglib2.0-0 libgnutls-deb0-28
libgssapi-krb5-2 libhogweed4 libhttp-date-perl libicu55 libidn11
libio-pty-perl libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0
libldap-2.4-2 libnettle6 libnghttp2-14 libp11-kit0 libpcre16-3 libpcre3
libpcre3-dev libpcre32-3 libpcrecpp0v5 libpython-stdlib libpython2.7-minimal
libpython2.7-stdlib librtmp1 libsasl2-2 libsasl2-modules-db libserf-1-1
libsqlite3-0 libssh2-1 libssl1.0.2 libsvn-perl libsvn1 libtasn1-6 libtcl8.6
libtimedate-perl libunistring0 libxml2 libyaml-perl mime-support python
python-minimal python2.7 python2.7-minimal subversion tcl tcl8.6 unzip
zlib1g-dev
Suggested packages:
mksh rcs gettext-doc autopoint libasprintf-dev libgettextpo-dev libcurl4-doc
libcurl3-dbg libgnutls28-dev libidn11-dev libkrb5-dev libldap2-dev
librtmp-dev libssh2-1-dev pkg-config libclone-perl libmldbm-perl
libnet-daemon-perl libsql-statement-perl gnutls-bin krb5-doc krb5-user
libyaml-shell-perl python-doc python-tk python2.7-doc binfmt-support
db5.3-util subversion-tools tcl-tclreadline zip
Recommended packages:
openssh-client curl wget lynx-cur ca-certificates libglib2.0-data
shared-mime-info xdg-user-dirs krb5-locales libsasl2-modules xml-core
libyaml-libyaml-perl libyaml-syck-perl file
The following NEW packages will be installed:
cvs cvsps gettext gettext-base libapr1 libaprutil1 libbsd0 libcroco3
libcurl3-gnutls libcurl4-gnutls-dev libdbd-sqlite3-perl libdbi-perl
libexpat1 libexpat1-dev libffi6 libglib2.0-0 libgnutls-deb0-28
libgssapi-krb5-2 libhogweed4 libhttp-date-perl libicu55 libidn11
libio-pty-perl libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0
libldap-2.4-2 libnettle6 libnghttp2-14 libp11-kit0 libpcre16-3 libpcre3-dev
libpcre32-3 libpcrecpp0v5 libpython-stdlib libpython2.7-minimal
libpython2.7-stdlib librtmp1 libsasl2-2 libsasl2-modules-db libserf-1-1
libsqlite3-0 libssh2-1 libssl1.0.2 libsvn-perl libsvn1 libtasn1-6 libtcl8.6
libtimedate-perl libunistring0 libxml2 libyaml-perl mime-support python
python-minimal python2.7 python2.7-minimal sbuild-build-depends-git-dummy
subversion tcl tcl8.6 unzip zlib1g-dev
The following packages will be upgraded:
libpcre3
1 upgraded, 64 newly installed, 0 to remove and 26 not upgraded.
Need to get 30.5 MB/30.5 MB of archives.
After this operation, 101 MB of additional disk space will be used.
Get:1 http://172.17.0.1/private/ stretch-staging/main libpcre3 armhf 2:8.35-8 [299 kB]
Get:2 http://172.17.0.1/private/ stretch-staging/main libpython2.7-minimal armhf 2.7.10-5+b1 [380 kB]
Get:3 http://172.17.0.1/private/ stretch-staging/main python2.7-minimal armhf 2.7.10-5+b1 [1092 kB]
Get:4 http://172.17.0.1/private/ stretch-staging/main python-minimal armhf 2.7.9-1 [40.1 kB]
Get:5 http://172.17.0.1/private/ stretch-staging/main mime-support all 3.59 [36.4 kB]
Get:6 http://172.17.0.1/private/ stretch-staging/main libexpat1 armhf 2.1.0-7 [59.8 kB]
Get:7 http://172.17.0.1/private/ stretch-staging/main libffi6 armhf 3.2.1-3 [18.5 kB]
Get:8 http://172.17.0.1/private/ stretch-staging/main libsqlite3-0 armhf 3.9.2-1 [404 kB]
Get:9 http://172.17.0.1/private/ stretch-staging/main libssl1.0.2 armhf 1.0.2d-3 [881 kB]
Get:10 http://172.17.0.1/private/ stretch-staging/main libpython2.7-stdlib armhf 2.7.10-5+b1 [1811 kB]
Get:11 http://172.17.0.1/private/ stretch-staging/main python2.7 armhf 2.7.10-5+b1 [265 kB]
Get:12 http://172.17.0.1/private/ stretch-staging/main libpython-stdlib armhf 2.7.9-1 [19.6 kB]
Get:13 http://172.17.0.1/private/ stretch-staging/main python armhf 2.7.9-1 [151 kB]
Get:14 http://172.17.0.1/private/ stretch-staging/main libbsd0 armhf 0.7.0-2 [63.7 kB]
Get:15 http://172.17.0.1/private/ stretch-staging/main libpcrecpp0v5 armhf 2:8.35-8 [141 kB]
Get:16 http://172.17.0.1/private/ stretch-staging/main libssh2-1 armhf 1.5.0-2 [122 kB]
Get:17 http://172.17.0.1/private/ stretch-staging/main libtcl8.6 armhf 8.6.4+dfsg-2 [866 kB]
Get:18 http://172.17.0.1/private/ stretch-staging/main libunistring0 armhf 0.9.3-5.2 [253 kB]
Get:19 http://172.17.0.1/private/ stretch-staging/main gettext-base armhf 0.19.6-1 [119 kB]
Get:20 http://172.17.0.1/private/ stretch-staging/main libnettle6 armhf 3.1.1-4 [200 kB]
Get:21 http://172.17.0.1/private/ stretch-staging/main libhogweed4 armhf 3.1.1-4 [126 kB]
Get:22 http://172.17.0.1/private/ stretch-staging/main libp11-kit0 armhf 0.23.1-3 [94.2 kB]
Get:23 http://172.17.0.1/private/ stretch-staging/main libtasn1-6 armhf 4.7-2 [44.3 kB]
Get:24 http://172.17.0.1/private/ stretch-staging/main libgnutls-deb0-28 armhf 3.3.18-1 [645 kB]
Get:25 http://172.17.0.1/private/ stretch-staging/main libkeyutils1 armhf 1.5.9-8 [11.5 kB]
Get:26 http://172.17.0.1/private/ stretch-staging/main libkrb5support0 armhf 1.13.2+dfsg-4+b1 [56.5 kB]
Get:27 http://172.17.0.1/private/ stretch-staging/main libk5crypto3 armhf 1.13.2+dfsg-4+b1 [110 kB]
Get:28 http://172.17.0.1/private/ stretch-staging/main libkrb5-3 armhf 1.13.2+dfsg-4+b1 [261 kB]
Get:29 http://172.17.0.1/private/ stretch-staging/main libgssapi-krb5-2 armhf 1.13.2+dfsg-4+b1 [129 kB]
Get:30 http://172.17.0.1/private/ stretch-staging/main libidn11 armhf 1.32-3 [110 kB]
Get:31 http://172.17.0.1/private/ stretch-staging/main libsasl2-modules-db armhf 2.1.26.dfsg1-14+b1 [65.8 kB]
Get:32 http://172.17.0.1/private/ stretch-staging/main libsasl2-2 armhf 2.1.26.dfsg1-14+b1 [97.1 kB]
Get:33 http://172.17.0.1/private/ stretch-staging/main libldap-2.4-2 armhf 2.4.42+dfsg-2+rpi1 [197 kB]
Get:34 http://172.17.0.1/private/ stretch-staging/main libicu55 armhf 55.1-6 [7379 kB]
Get:35 http://172.17.0.1/private/ stretch-staging/main libxml2 armhf 2.9.2+zdfsg1-4 [797 kB]
Get:36 http://172.17.0.1/private/ stretch-staging/main cvs armhf 2:1.12.13+real-15 [2569 kB]
Get:37 http://172.17.0.1/private/ stretch-staging/main cvsps armhf 2.1-7 [45.1 kB]
Get:38 http://172.17.0.1/private/ stretch-staging/main libglib2.0-0 armhf 2.46.2-1 [2482 kB]
Get:39 http://172.17.0.1/private/ stretch-staging/main libcroco3 armhf 0.6.9-1 [129 kB]
Get:40 http://172.17.0.1/private/ stretch-staging/main gettext armhf 0.19.6-1 [1393 kB]
Get:41 http://172.17.0.1/private/ stretch-staging/main libapr1 armhf 1.5.2-3 [80.0 kB]
Get:42 http://172.17.0.1/private/ stretch-staging/main libaprutil1 armhf 1.5.4-1+b1 [75.6 kB]
Get:43 http://172.17.0.1/private/ stretch-staging/main libnghttp2-14 armhf 1.5.0-1 [70.1 kB]
Get:44 http://172.17.0.1/private/ stretch-staging/main librtmp1 armhf 2.4+20150115.gita107cef-1+b1 [54.5 kB]
Get:45 http://172.17.0.1/private/ stretch-staging/main libcurl3-gnutls armhf 7.45.0-1+b1 [240 kB]
Get:46 http://172.17.0.1/private/ stretch-staging/main libcurl4-gnutls-dev armhf 7.45.0-1+b1 [324 kB]
Get:47 http://172.17.0.1/private/ stretch-staging/main libdbi-perl armhf 1.634-1 [813 kB]
Get:48 http://172.17.0.1/private/ stretch-staging/main libdbd-sqlite3-perl armhf 1.46-1 [150 kB]
Get:49 http://172.17.0.1/private/ stretch-staging/main libexpat1-dev armhf 2.1.0-7 [114 kB]
Get:50 http://172.17.0.1/private/ stretch-staging/main libtimedate-perl all 2.3000-2 [42.2 kB]
Get:51 http://172.17.0.1/private/ stretch-staging/main libhttp-date-perl all 6.02-1 [10.7 kB]
Get:52 http://172.17.0.1/private/ stretch-staging/main libio-pty-perl armhf 1:1.08-1+b2 [35.0 kB]
Get:53 http://172.17.0.1/private/ stretch-staging/main libpcre16-3 armhf 2:8.35-8 [220 kB]
Get:54 http://172.17.0.1/private/ stretch-staging/main libpcre32-3 armhf 2:8.35-8 [214 kB]
Get:55 http://172.17.0.1/private/ stretch-staging/main libpcre3-dev armhf 2:8.35-8 [546 kB]
Get:56 http://172.17.0.1/private/ stretch-staging/main libserf-1-1 armhf 1.3.8-1+b1 [44.9 kB]
Get:57 http://172.17.0.1/private/ stretch-staging/main libsvn1 armhf 1.9.2-3 [1114 kB]
Get:58 http://172.17.0.1/private/ stretch-staging/main libsvn-perl armhf 1.9.2-3 [893 kB]
Get:59 http://172.17.0.1/private/ stretch-staging/main libyaml-perl all 1.15-1 [69.7 kB]
Get:60 http://172.17.0.1/private/ stretch-staging/main subversion armhf 1.9.2-3 [968 kB]
Get:61 http://172.17.0.1/private/ stretch-staging/main tcl8.6 armhf 8.6.4+dfsg-2 [122 kB]
Get:62 http://172.17.0.1/private/ stretch-staging/main tcl armhf 8.6.0+9 [5502 B]
Get:63 http://172.17.0.1/private/ stretch-staging/main unzip armhf 6.0-20 [142 kB]
Get:64 http://172.17.0.1/private/ stretch-staging/main zlib1g-dev armhf 1:1.2.8.dfsg-2+b1 [197 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 30.5 MB in 16s (1835 kB/s)
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 12030 files and directories currently installed.)
Preparing to unpack .../libpcre3_2%3a8.35-8_armhf.deb ...
Unpacking libpcre3:armhf (2:8.35-8) over (2:8.35-7.4) ...
Processing triggers for libc-bin (2.19-22) ...
Setting up libpcre3:armhf (2:8.35-8) ...
Processing triggers for libc-bin (2.19-22) ...
Selecting previously unselected package libpython2.7-minimal:armhf.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 12030 files and directories currently installed.)
Preparing to unpack .../libpython2.7-minimal_2.7.10-5+b1_armhf.deb ...
Unpacking libpython2.7-minimal:armhf (2.7.10-5+b1) ...
Selecting previously unselected package python2.7-minimal.
Preparing to unpack .../python2.7-minimal_2.7.10-5+b1_armhf.deb ...
Unpacking python2.7-minimal (2.7.10-5+b1) ...
Selecting previously unselected package python-minimal.
Preparing to unpack .../python-minimal_2.7.9-1_armhf.deb ...
Unpacking python-minimal (2.7.9-1) ...
Selecting previously unselected package mime-support.
Preparing to unpack .../mime-support_3.59_all.deb ...
Unpacking mime-support (3.59) ...
Selecting previously unselected package libexpat1:armhf.
Preparing to unpack .../libexpat1_2.1.0-7_armhf.deb ...
Unpacking libexpat1:armhf (2.1.0-7) ...
Selecting previously unselected package libffi6:armhf.
Preparing to unpack .../libffi6_3.2.1-3_armhf.deb ...
Unpacking libffi6:armhf (3.2.1-3) ...
Selecting previously unselected package libsqlite3-0:armhf.
Preparing to unpack .../libsqlite3-0_3.9.2-1_armhf.deb ...
Unpacking libsqlite3-0:armhf (3.9.2-1) ...
Selecting previously unselected package libssl1.0.2:armhf.
Preparing to unpack .../libssl1.0.2_1.0.2d-3_armhf.deb ...
Unpacking libssl1.0.2:armhf (1.0.2d-3) ...
Selecting previously unselected package libpython2.7-stdlib:armhf.
Preparing to unpack .../libpython2.7-stdlib_2.7.10-5+b1_armhf.deb ...
Unpacking libpython2.7-stdlib:armhf (2.7.10-5+b1) ...
Selecting previously unselected package python2.7.
Preparing to unpack .../python2.7_2.7.10-5+b1_armhf.deb ...
Unpacking python2.7 (2.7.10-5+b1) ...
Selecting previously unselected package libpython-stdlib:armhf.
Preparing to unpack .../libpython-stdlib_2.7.9-1_armhf.deb ...
Unpacking libpython-stdlib:armhf (2.7.9-1) ...
Processing triggers for libc-bin (2.19-22) ...
Setting up libpython2.7-minimal:armhf (2.7.10-5+b1) ...
Setting up python2.7-minimal (2.7.10-5+b1) ...
Setting up python-minimal (2.7.9-1) ...
Selecting previously unselected package python.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 12850 files and directories currently installed.)
Preparing to unpack .../python_2.7.9-1_armhf.deb ...
Unpacking python (2.7.9-1) ...
Selecting previously unselected package libbsd0:armhf.
Preparing to unpack .../libbsd0_0.7.0-2_armhf.deb ...
Unpacking libbsd0:armhf (0.7.0-2) ...
Selecting previously unselected package libpcrecpp0v5:armhf.
Preparing to unpack .../libpcrecpp0v5_2%3a8.35-8_armhf.deb ...
Unpacking libpcrecpp0v5:armhf (2:8.35-8) ...
Selecting previously unselected package libssh2-1:armhf.
Preparing to unpack .../libssh2-1_1.5.0-2_armhf.deb ...
Unpacking libssh2-1:armhf (1.5.0-2) ...
Selecting previously unselected package libtcl8.6:armhf.
Preparing to unpack .../libtcl8.6_8.6.4+dfsg-2_armhf.deb ...
Unpacking libtcl8.6:armhf (8.6.4+dfsg-2) ...
Selecting previously unselected package libunistring0:armhf.
Preparing to unpack .../libunistring0_0.9.3-5.2_armhf.deb ...
Unpacking libunistring0:armhf (0.9.3-5.2) ...
Selecting previously unselected package gettext-base.
Preparing to unpack .../gettext-base_0.19.6-1_armhf.deb ...
Unpacking gettext-base (0.19.6-1) ...
Selecting previously unselected package libnettle6:armhf.
Preparing to unpack .../libnettle6_3.1.1-4_armhf.deb ...
Unpacking libnettle6:armhf (3.1.1-4) ...
Selecting previously unselected package libhogweed4:armhf.
Preparing to unpack .../libhogweed4_3.1.1-4_armhf.deb ...
Unpacking libhogweed4:armhf (3.1.1-4) ...
Selecting previously unselected package libp11-kit0:armhf.
Preparing to unpack .../libp11-kit0_0.23.1-3_armhf.deb ...
Unpacking libp11-kit0:armhf (0.23.1-3) ...
Selecting previously unselected package libtasn1-6:armhf.
Preparing to unpack .../libtasn1-6_4.7-2_armhf.deb ...
Unpacking libtasn1-6:armhf (4.7-2) ...
Selecting previously unselected package libgnutls-deb0-28:armhf.
Preparing to unpack .../libgnutls-deb0-28_3.3.18-1_armhf.deb ...
Unpacking libgnutls-deb0-28:armhf (3.3.18-1) ...
Selecting previously unselected package libkeyutils1:armhf.
Preparing to unpack .../libkeyutils1_1.5.9-8_armhf.deb ...
Unpacking libkeyutils1:armhf (1.5.9-8) ...
Selecting previously unselected package libkrb5support0:armhf.
Preparing to unpack .../libkrb5support0_1.13.2+dfsg-4+b1_armhf.deb ...
Unpacking libkrb5support0:armhf (1.13.2+dfsg-4+b1) ...
Selecting previously unselected package libk5crypto3:armhf.
Preparing to unpack .../libk5crypto3_1.13.2+dfsg-4+b1_armhf.deb ...
Unpacking libk5crypto3:armhf (1.13.2+dfsg-4+b1) ...
Selecting previously unselected package libkrb5-3:armhf.
Preparing to unpack .../libkrb5-3_1.13.2+dfsg-4+b1_armhf.deb ...
Unpacking libkrb5-3:armhf (1.13.2+dfsg-4+b1) ...
Selecting previously unselected package libgssapi-krb5-2:armhf.
Preparing to unpack .../libgssapi-krb5-2_1.13.2+dfsg-4+b1_armhf.deb ...
Unpacking libgssapi-krb5-2:armhf (1.13.2+dfsg-4+b1) ...
Selecting previously unselected package libidn11:armhf.
Preparing to unpack .../libidn11_1.32-3_armhf.deb ...
Unpacking libidn11:armhf (1.32-3) ...
Selecting previously unselected package libsasl2-modules-db:armhf.
Preparing to unpack .../libsasl2-modules-db_2.1.26.dfsg1-14+b1_armhf.deb ...
Unpacking libsasl2-modules-db:armhf (2.1.26.dfsg1-14+b1) ...
Selecting previously unselected package libsasl2-2:armhf.
Preparing to unpack .../libsasl2-2_2.1.26.dfsg1-14+b1_armhf.deb ...
Unpacking libsasl2-2:armhf (2.1.26.dfsg1-14+b1) ...
Selecting previously unselected package libldap-2.4-2:armhf.
Preparing to unpack .../libldap-2.4-2_2.4.42+dfsg-2+rpi1_armhf.deb ...
Unpacking libldap-2.4-2:armhf (2.4.42+dfsg-2+rpi1) ...
Selecting previously unselected package libicu55:armhf.
Preparing to unpack .../libicu55_55.1-6_armhf.deb ...
Unpacking libicu55:armhf (55.1-6) ...
Selecting previously unselected package libxml2:armhf.
Preparing to unpack .../libxml2_2.9.2+zdfsg1-4_armhf.deb ...
Unpacking libxml2:armhf (2.9.2+zdfsg1-4) ...
Selecting previously unselected package cvs.
Preparing to unpack .../cvs_2%3a1.12.13+real-15_armhf.deb ...
Unpacking cvs (2:1.12.13+real-15) ...
Selecting previously unselected package cvsps.
Preparing to unpack .../archives/cvsps_2.1-7_armhf.deb ...
Unpacking cvsps (2.1-7) ...
Selecting previously unselected package libglib2.0-0:armhf.
Preparing to unpack .../libglib2.0-0_2.46.2-1_armhf.deb ...
Unpacking libglib2.0-0:armhf (2.46.2-1) ...
Selecting previously unselected package libcroco3:armhf.
Preparing to unpack .../libcroco3_0.6.9-1_armhf.deb ...
Unpacking libcroco3:armhf (0.6.9-1) ...
Selecting previously unselected package gettext.
Preparing to unpack .../gettext_0.19.6-1_armhf.deb ...
Unpacking gettext (0.19.6-1) ...
Selecting previously unselected package libapr1:armhf.
Preparing to unpack .../libapr1_1.5.2-3_armhf.deb ...
Unpacking libapr1:armhf (1.5.2-3) ...
Selecting previously unselected package libaprutil1:armhf.
Preparing to unpack .../libaprutil1_1.5.4-1+b1_armhf.deb ...
Unpacking libaprutil1:armhf (1.5.4-1+b1) ...
Selecting previously unselected package libnghttp2-14:armhf.
Preparing to unpack .../libnghttp2-14_1.5.0-1_armhf.deb ...
Unpacking libnghttp2-14:armhf (1.5.0-1) ...
Selecting previously unselected package librtmp1:armhf.
Preparing to unpack .../librtmp1_2.4+20150115.gita107cef-1+b1_armhf.deb ...
Unpacking librtmp1:armhf (2.4+20150115.gita107cef-1+b1) ...
Selecting previously unselected package libcurl3-gnutls:armhf.
Preparing to unpack .../libcurl3-gnutls_7.45.0-1+b1_armhf.deb ...
Unpacking libcurl3-gnutls:armhf (7.45.0-1+b1) ...
Selecting previously unselected package libcurl4-gnutls-dev:armhf.
Preparing to unpack .../libcurl4-gnutls-dev_7.45.0-1+b1_armhf.deb ...
Unpacking libcurl4-gnutls-dev:armhf (7.45.0-1+b1) ...
Selecting previously unselected package libdbi-perl.
Preparing to unpack .../libdbi-perl_1.634-1_armhf.deb ...
Unpacking libdbi-perl (1.634-1) ...
Selecting previously unselected package libdbd-sqlite3-perl.
Preparing to unpack .../libdbd-sqlite3-perl_1.46-1_armhf.deb ...
Unpacking libdbd-sqlite3-perl (1.46-1) ...
Selecting previously unselected package libexpat1-dev:armhf.
Preparing to unpack .../libexpat1-dev_2.1.0-7_armhf.deb ...
Unpacking libexpat1-dev:armhf (2.1.0-7) ...
Selecting previously unselected package libtimedate-perl.
Preparing to unpack .../libtimedate-perl_2.3000-2_all.deb ...
Unpacking libtimedate-perl (2.3000-2) ...
Selecting previously unselected package libhttp-date-perl.
Preparing to unpack .../libhttp-date-perl_6.02-1_all.deb ...
Unpacking libhttp-date-perl (6.02-1) ...
Selecting previously unselected package libio-pty-perl.
Preparing to unpack .../libio-pty-perl_1%3a1.08-1+b2_armhf.deb ...
Unpacking libio-pty-perl (1:1.08-1+b2) ...
Selecting previously unselected package libpcre16-3:armhf.
Preparing to unpack .../libpcre16-3_2%3a8.35-8_armhf.deb ...
Unpacking libpcre16-3:armhf (2:8.35-8) ...
Selecting previously unselected package libpcre32-3:armhf.
Preparing to unpack .../libpcre32-3_2%3a8.35-8_armhf.deb ...
Unpacking libpcre32-3:armhf (2:8.35-8) ...
Selecting previously unselected package libpcre3-dev:armhf.
Preparing to unpack .../libpcre3-dev_2%3a8.35-8_armhf.deb ...
Unpacking libpcre3-dev:armhf (2:8.35-8) ...
Selecting previously unselected package libserf-1-1:armhf.
Preparing to unpack .../libserf-1-1_1.3.8-1+b1_armhf.deb ...
Unpacking libserf-1-1:armhf (1.3.8-1+b1) ...
Selecting previously unselected package libsvn1:armhf.
Preparing to unpack .../libsvn1_1.9.2-3_armhf.deb ...
Unpacking libsvn1:armhf (1.9.2-3) ...
Selecting previously unselected package libsvn-perl.
Preparing to unpack .../libsvn-perl_1.9.2-3_armhf.deb ...
Unpacking libsvn-perl (1.9.2-3) ...
Selecting previously unselected package libyaml-perl.
Preparing to unpack .../libyaml-perl_1.15-1_all.deb ...
Unpacking libyaml-perl (1.15-1) ...
Selecting previously unselected package subversion.
Preparing to unpack .../subversion_1.9.2-3_armhf.deb ...
Unpacking subversion (1.9.2-3) ...
Selecting previously unselected package tcl8.6.
Preparing to unpack .../tcl8.6_8.6.4+dfsg-2_armhf.deb ...
Unpacking tcl8.6 (8.6.4+dfsg-2) ...
Selecting previously unselected package tcl.
Preparing to unpack .../archives/tcl_8.6.0+9_armhf.deb ...
Unpacking tcl (8.6.0+9) ...
Selecting previously unselected package unzip.
Preparing to unpack .../unzip_6.0-20_armhf.deb ...
Unpacking unzip (6.0-20) ...
Selecting previously unselected package zlib1g-dev:armhf.
Preparing to unpack .../zlib1g-dev_1%3a1.2.8.dfsg-2+b1_armhf.deb ...
Unpacking zlib1g-dev:armhf (1:1.2.8.dfsg-2+b1) ...
Selecting previously unselected package sbuild-build-depends-git-dummy.
Preparing to unpack .../sbuild-build-depends-git-dummy.deb ...
Unpacking sbuild-build-depends-git-dummy (0.invalid.0) ...
Processing triggers for libc-bin (2.19-22) ...
Setting up mime-support (3.59) ...
Setting up libexpat1:armhf (2.1.0-7) ...
Setting up libffi6:armhf (3.2.1-3) ...
Setting up libsqlite3-0:armhf (3.9.2-1) ...
Setting up libssl1.0.2:armhf (1.0.2d-3) ...
Setting up libpython2.7-stdlib:armhf (2.7.10-5+b1) ...
Setting up python2.7 (2.7.10-5+b1) ...
Setting up libpython-stdlib:armhf (2.7.9-1) ...
Setting up python (2.7.9-1) ...
Setting up libbsd0:armhf (0.7.0-2) ...
Setting up libpcrecpp0v5:armhf (2:8.35-8) ...
Setting up libssh2-1:armhf (1.5.0-2) ...
Setting up libtcl8.6:armhf (8.6.4+dfsg-2) ...
Setting up libunistring0:armhf (0.9.3-5.2) ...
Setting up gettext-base (0.19.6-1) ...
Setting up libnettle6:armhf (3.1.1-4) ...
Setting up libhogweed4:armhf (3.1.1-4) ...
Setting up libp11-kit0:armhf (0.23.1-3) ...
Setting up libtasn1-6:armhf (4.7-2) ...
Setting up libgnutls-deb0-28:armhf (3.3.18-1) ...
Setting up libkeyutils1:armhf (1.5.9-8) ...
Setting up libkrb5support0:armhf (1.13.2+dfsg-4+b1) ...
Setting up libk5crypto3:armhf (1.13.2+dfsg-4+b1) ...
Setting up libkrb5-3:armhf (1.13.2+dfsg-4+b1) ...
Setting up libgssapi-krb5-2:armhf (1.13.2+dfsg-4+b1) ...
Setting up libidn11:armhf (1.32-3) ...
Setting up libsasl2-modules-db:armhf (2.1.26.dfsg1-14+b1) ...
Setting up libsasl2-2:armhf (2.1.26.dfsg1-14+b1) ...
Setting up libldap-2.4-2:armhf (2.4.42+dfsg-2+rpi1) ...
Setting up libicu55:armhf (55.1-6) ...
Setting up libxml2:armhf (2.9.2+zdfsg1-4) ...
Setting up cvs (2:1.12.13+real-15) ...
Allowing use of questionable username.
Adding group `_cvsadmin' (GID 114) ...
Done.
Setting up cvsps (2.1-7) ...
Setting up libglib2.0-0:armhf (2.46.2-1) ...
No schema files found: doing nothing.
Setting up libcroco3:armhf (0.6.9-1) ...
Setting up gettext (0.19.6-1) ...
Setting up libapr1:armhf (1.5.2-3) ...
Setting up libaprutil1:armhf (1.5.4-1+b1) ...
Setting up libnghttp2-14:armhf (1.5.0-1) ...
Setting up librtmp1:armhf (2.4+20150115.gita107cef-1+b1) ...
Setting up libcurl3-gnutls:armhf (7.45.0-1+b1) ...
Setting up libcurl4-gnutls-dev:armhf (7.45.0-1+b1) ...
Setting up libdbi-perl (1.634-1) ...
Setting up libdbd-sqlite3-perl (1.46-1) ...
Setting up libexpat1-dev:armhf (2.1.0-7) ...
Setting up libtimedate-perl (2.3000-2) ...
Setting up libhttp-date-perl (6.02-1) ...
Setting up libio-pty-perl (1:1.08-1+b2) ...
Setting up libpcre16-3:armhf (2:8.35-8) ...
Setting up libpcre32-3:armhf (2:8.35-8) ...
Setting up libpcre3-dev:armhf (2:8.35-8) ...
Setting up libserf-1-1:armhf (1.3.8-1+b1) ...
Setting up libsvn1:armhf (1.9.2-3) ...
Setting up libsvn-perl (1.9.2-3) ...
Setting up libyaml-perl (1.15-1) ...
Setting up subversion (1.9.2-3) ...
Setting up tcl8.6 (8.6.4+dfsg-2) ...
Setting up tcl (8.6.0+9) ...
Setting up unzip (6.0-20) ...
Setting up zlib1g-dev:armhf (1:1.2.8.dfsg-2+b1) ...
Setting up sbuild-build-depends-git-dummy (0.invalid.0) ...
Processing triggers for libc-bin (2.19-22) ...
┌──────────────────────────────────────────────────────────────────────────────┐
│ Build environment │
└──────────────────────────────────────────────────────────────────────────────┘
Kernel: Linux 3.19.0-trunk-armmp armhf (armv7l)
Toolchain package versions: binutils_2.25.1-7 dpkg-dev_1.18.3 g++-5_5.2.1-23+rpi1 gcc-5_5.2.1-23+rpi1 libc6-dev_2.19-22 libstdc++-5-dev_5.2.1-23+rpi1 libstdc++6_5.2.1-23+rpi1 linux-libc-dev_3.18.5-1~exp1+rpi19+stretch
Package versions: adduser_3.113+nmu3 apt_1.0.10.2 base-files_9.4+rpi1 base-passwd_3.5.38 bash_4.3-14 binutils_2.25.1-7 bsdutils_1:2.27.1-1 build-essential_11.7 bzip2_1.0.6-8 coreutils_8.23-4 cpio_2.11+dfsg-4.1 cpp_4:5.2.1-4+rpi2 cpp-5_5.2.1-23+rpi1 cvs_2:1.12.13+real-15 cvsps_2.1-7 dash_0.5.7-4 debconf_1.5.58 debconf-i18n_1.5.58 debfoster_2.7-2 debianutils_4.5.1 diffutils_1:3.3-2 dmsetup_2:1.02.110-1+rpi1 dpkg_1.18.3 dpkg-dev_1.18.3 e2fslibs_1.42.13-1 e2fsprogs_1.42.13-1 fakeroot_1.20.2-1 findutils_4.4.2-10 g++_4:5.2.1-4+rpi2 g++-5_5.2.1-23+rpi1 gcc_4:5.2.1-4+rpi2 gcc-4.6-base_4.6.4-5+rpi1 gcc-4.7-base_4.7.3-11+rpi1 gcc-4.8-base_4.8.5-1 gcc-4.9-base_4.9.3-5 gcc-5_5.2.1-23+rpi1 gcc-5-base_5.2.1-23+rpi1 gettext_0.19.6-1 gettext-base_0.19.6-1 gnupg_1.4.19-6 gpgv_1.4.19-6 grep_2.22-1 gzip_1.6-4 hostname_3.16 init_1.24 init-system-helpers_1.24 initramfs-tools_0.120 initscripts_2.88dsf-59.2 insserv_1.14.0-5 klibc-utils_2.0.4-2+rpi1 kmod_21-1 libacl1_2.2.52-2 libapparmor1_2.10-2+b2 libapr1_1.5.2-3 libaprutil1_1.5.4-1+b1 libapt-pkg4.16_1.0.10.2 libasan2_5.2.1-23+rpi1 libatomic1_5.2.1-23+rpi1 libattr1_1:2.4.47-2 libaudit-common_1:2.4.4-4 libaudit1_1:2.4.4-4 libblkid1_2.27.1-1 libbsd0_0.7.0-2 libbz2-1.0_1.0.6-8 libc-bin_2.19-22 libc-dev-bin_2.19-22 libc6_2.19-22 libc6-dev_2.19-22 libcap2_1:2.24-12 libcap2-bin_1:2.24-12 libcc1-0_5.2.1-23+rpi1 libcomerr2_1.42.13-1 libcroco3_0.6.9-1 libcryptsetup4_2:1.6.6-5 libcurl3-gnutls_7.45.0-1+b1 libcurl4-gnutls-dev_7.45.0-1+b1 libdb5.3_5.3.28-11 libdbd-sqlite3-perl_1.46-1 libdbi-perl_1.634-1 libdbus-1-3_1.10.4-1 libdebconfclient0_0.197 libdevmapper1.02.1_2:1.02.110-1+rpi1 libdpkg-perl_1.18.3 libdrm2_2.4.65-3 libexpat1_2.1.0-7 libexpat1-dev_2.1.0-7 libfakeroot_1.20.2-1 libfdisk1_2.27.1-1 libffi6_3.2.1-3 libgc1c2_1:7.4.2-7 libgcc-5-dev_5.2.1-23+rpi1 libgcc1_1:5.2.1-23+rpi1 libgcrypt20_1.6.4-3 libgdbm3_1.8.3-13.1 libglib2.0-0_2.46.2-1 libgmp10_2:6.1.0+dfsg-2 libgnutls-deb0-28_3.3.18-1 libgomp1_5.2.1-23+rpi1 libgpg-error0_1.20-1 libgssapi-krb5-2_1.13.2+dfsg-4+b1 libhogweed4_3.1.1-4 libhttp-date-perl_6.02-1 libicu55_55.1-6 libidn11_1.32-3 libio-pty-perl_1:1.08-1+b2 libisl13_0.14-2 libk5crypto3_1.13.2+dfsg-4+b1 libkeyutils1_1.5.9-8 libklibc_2.0.4-2+rpi1 libkmod2_21-1 libkrb5-3_1.13.2+dfsg-4+b1 libkrb5support0_1.13.2+dfsg-4+b1 libldap-2.4-2_2.4.42+dfsg-2+rpi1 liblocale-gettext-perl_1.07-1 liblzma5_5.1.1alpha+20120614-2.1 libmount1_2.27.1-1 libmpc3_1.0.3-1 libmpfr4_3.1.3-1 libncurses5_6.0+20151024-2 libncursesw5_6.0+20151024-2 libnettle6_3.1.1-4 libnghttp2-14_1.5.0-1 libnih-dbus1_1.0.3-4.3 libnih1_1.0.3-4.3 libp11-kit0_0.23.1-3 libpam-modules_1.1.8-3.1 libpam-modules-bin_1.1.8-3.1 libpam-runtime_1.1.8-3.1 libpam0g_1.1.8-3.1 libpcre16-3_2:8.35-8 libpcre3_2:8.35-8 libpcre3-dev_2:8.35-8 libpcre32-3_2:8.35-8 libpcrecpp0v5_2:8.35-8 libpng12-0_1.2.54-1 libprocps4_2:3.3.10-2 libpython-stdlib_2.7.9-1 libpython2.7-minimal_2.7.10-5+b1 libpython2.7-stdlib_2.7.10-5+b1 libreadline6_6.3-8+b3 librtmp1_2.4+20150115.gita107cef-1+b1 libsasl2-2_2.1.26.dfsg1-14+b1 libsasl2-modules-db_2.1.26.dfsg1-14+b1 libseccomp2_2.2.3-2 libselinux1_2.4-3 libsemanage-common_2.4-3 libsemanage1_2.4-3 libsepol1_2.4-2 libserf-1-1_1.3.8-1+b1 libsmartcols1_2.27.1-1 libsqlite3-0_3.9.2-1 libss2_1.42.13-1 libssh2-1_1.5.0-2 libssl1.0.2_1.0.2d-3 libstdc++-5-dev_5.2.1-23+rpi1 libstdc++6_5.2.1-23+rpi1 libsvn-perl_1.9.2-3 libsvn1_1.9.2-3 libsystemd0_228-2 libtasn1-6_4.7-2 libtcl8.6_8.6.4+dfsg-2 libtext-charwidth-perl_0.04-7+b4 libtext-iconv-perl_1.7-5+b5 libtext-wrapi18n-perl_0.06-7.1 libtimedate-perl_2.3000-2 libtinfo5_6.0+20151024-2 libubsan0_5.2.1-23+rpi1 libudev1_228-2 libunistring0_0.9.3-5.2 libusb-0.1-4_2:0.1.12-27 libustr-1.0-1_1.0.4-5 libuuid1_2.27.1-1 libxml2_2.9.2+zdfsg1-4 libyaml-perl_1.15-1 linux-libc-dev_3.18.5-1~exp1+rpi19+stretch login_1:4.2-3.1 lsb-base_4.1+Debian13+rpi1+nmu1 make_4.0-8.2 makedev_2.3.1-93 mawk_1.3.3-17 mime-support_3.59 mount_2.27.1-1 multiarch-support_2.19-22 nano_2.4.2-1 ncurses-base_6.0+20151024-2 ncurses-bin_6.0+20151024-2 passwd_1:4.2-3.1 patch_2.7.5-1 perl_5.20.2-6 perl-base_5.20.2-6 perl-modules_5.20.2-6 procps_2:3.3.10-2 python_2.7.9-1 python-minimal_2.7.9-1 python2.7_2.7.10-5+b1 python2.7-minimal_2.7.10-5+b1 raspbian-archive-keyring_20120528.2 readline-common_6.3-8 sbuild-build-depends-core-dummy_0.invalid.0 sbuild-build-depends-git-dummy_0.invalid.0 sed_4.2.2-6.1 sensible-utils_0.0.9 startpar_0.59-3 subversion_1.9.2-3 systemd_228-2 systemd-sysv_228-2 sysv-rc_2.88dsf-59.2 sysvinit-utils_2.88dsf-59.2 tar_1.28-2.1 tcl_8.6.0+9 tcl8.6_8.6.4+dfsg-2 tzdata_2015g-1 udev_228-2 unzip_6.0-20 util-linux_2.27.1-1 xz-utils_5.1.1alpha+20120614-2.1 zlib1g_1:1.2.8.dfsg-2+b1 zlib1g-dev_1:1.2.8.dfsg-2+b1
┌──────────────────────────────────────────────────────────────────────────────┐
│ Build │
└──────────────────────────────────────────────────────────────────────────────┘
Unpack source
─────────────
gpgv: keyblock resource `/sbuild-nonexistent/.gnupg/trustedkeys.gpg': file open error
gpgv: Signature made Fri Dec 11 00:50:38 2015 UTC using RSA key ID B333FA25
gpgv: Can't check signature: public key not found
dpkg-source: warning: failed to verify signature on ./git_2.6.4-1.dsc
dpkg-source: info: extracting git in git-2.6.4
dpkg-source: info: unpacking git_2.6.4.orig.tar.xz
dpkg-source: info: unpacking git_2.6.4-1.debian.tar.xz
Check disc space
────────────────
Sufficient free space for build
User Environment
────────────────
DEB_BUILD_OPTIONS=parallel=4
HOME=/sbuild-nonexistent
LOGNAME=buildd
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
SCHROOT_ALIAS_NAME=stretch-staging-armhf-sbuild
SCHROOT_CHROOT_NAME=stretch-staging-armhf-sbuild
SCHROOT_COMMAND=env
SCHROOT_GID=111
SCHROOT_GROUP=buildd
SCHROOT_SESSION_ID=stretch-staging-armhf-sbuild-4888389c-7c2f-446b-8532-61efa9b2f323
SCHROOT_UID=106
SCHROOT_USER=buildd
SHELL=/bin/sh
TERM=linux
USER=buildd
dpkg-buildpackage
─────────────────
dpkg-buildpackage: source package git
dpkg-buildpackage: source version 1:2.6.4-1
dpkg-buildpackage: source distribution unstable
dpkg-source --before-build git-2.6.4
dpkg-buildpackage: host architecture armhf
fakeroot debian/rules clean
/usr/bin/make clean NO_OPENSSL=1 prefix=/usr gitexecdir=/usr/lib/git-core libexecdir=/usr/lib/git-core mandir=/usr/share/man htmldir=/usr/share/doc/git/html INSTALLDIRS=vendor USE_SRV_RR=1 USE_LIBPCRE=1 SANE_TOOL_PATH= INSTALL=install TAR=tar NO_CROSS_DIRECTORY_HARDLINKS=1 NO_INSTALL_HARDLINKS=1 DEFAULT_PAGER=pager DEFAULT_EDITOR=editor CC='gcc' CFLAGS='-Wall -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' LDFLAGS='-Wl,-z,relro'
make[1]: Entering directory '/«PKGBUILDDIR»'
GIT_VERSION = 2.6.4
rm -f /«PKGBUILDDIR»/./*.gcda /«PKGBUILDDIR»/block-sha1/*.gcda /«PKGBUILDDIR»/builtin/*.gcda /«PKGBUILDDIR»/compat/*.gcda /«PKGBUILDDIR»/ewah/*.gcda /«PKGBUILDDIR»/vcs-svn/*.gcda /«PKGBUILDDIR»/xdiff/*.gcda
rm -f ./*.gcov block-sha1/*.gcov builtin/*.gcov compat/*.gcov ewah/*.gcov vcs-svn/*.gcov xdiff/*.gcov
rm -f /«PKGBUILDDIR»/./*.gcno /«PKGBUILDDIR»/block-sha1/*.gcno /«PKGBUILDDIR»/builtin/*.gcno /«PKGBUILDDIR»/compat/*.gcno /«PKGBUILDDIR»/ewah/*.gcno /«PKGBUILDDIR»/vcs-svn/*.gcno /«PKGBUILDDIR»/xdiff/*.gcno
rm -f ./*.gcda block-sha1/*.gcda builtin/*.gcda compat/*.gcda ewah/*.gcda vcs-svn/*.gcda xdiff/*.gcda
rm -f coverage-untested-functions
rm -f -r cover_db/
rm -f -r cover_db_html/
rm -f ./*.gcno block-sha1/*.gcno builtin/*.gcno compat/*.gcno ewah/*.gcno vcs-svn/*.gcno xdiff/*.gcno
rm -f *.o *.res block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o
rm -f xdiff/*.o vcs-svn/*.o ewah/*.o builtin/*.o
rm -f libgit.a xdiff/lib.a vcs-svn/lib.a
rm -f git-credential-store git-daemon git-fast-import git-http-backend git-imap-send git-sh-i18n--envsubst git-shell git-show-index git-upload-pack git-remote-testsvn git-http-fetch git-http-push git-credential-cache git-credential-cache--daemon git-remote-http git-remote-https git-remote-ftp git-remote-ftps git-bisect git-difftool--helper git-filter-branch git-merge-octopus git-merge-one-file git-merge-resolve git-mergetool git-quiltimport git-rebase git-request-pull git-stash git-submodule git-web--browse git-add--interactive git-difftool git-archimport git-cvsexportcommit git-cvsimport git-cvsserver git-relink git-send-email git-svn git-p4 git-instaweb git-mergetool--lib git-parse-remote git-rebase--am git-rebase--interactive git-rebase--merge git-sh-setup git-sh-i18n git-add git-am git-annotate git-apply git-archive git-bisect--helper git-blame git-branch git-bundle git-cat-file git-check-attr git-check-ignore git-check-mailmap git-check-ref-format git-checkout-index git-checkout git-clean git-clone git-column git-commit-tree git-commit git-config git-count-objects git-credential git-describe git-diff-files git-diff-index git-diff-tree git-diff git-fast-export git-fetch-pack git-fetch git-fmt-merge-msg git-for-each-ref git-fsck git-gc git-get-tar-commit-id git-grep git-hash-object git-help git-index-pack git-init-db git-interpret-trailers git-log git-ls-files git-ls-remote git-ls-tree git-mailinfo git-mailsplit git-merge git-merge-base git-merge-file git-merge-index git-merge-ours git-merge-recursive git-merge-tree git-mktag git-mktree git-mv git-name-rev git-notes git-pack-objects git-pack-redundant git-pack-refs git-patch-id git-prune-packed git-prune git-pull git-push git-read-tree git-receive-pack git-reflog git-remote git-remote-ext git-remote-fd git-repack git-replace git-rerere git-reset git-rev-list git-rev-parse git-revert git-rm git-send-pack git-shortlog git-show-branch git-show-ref git-stripspace git-symbolic-ref git-tag git-unpack-file git-unpack-objects git-update-index git-update-ref git-update-server-info git-upload-archive git-var git-verify-commit git-verify-pack git-verify-tag git-worktree git-write-tree git-cherry git-cherry-pick git-format-patch git-fsck-objects git-init git-merge-subtree git-show git-stage git-status git-whatchanged git
rm -f test-chmtime test-ctype test-config test-date test-delta test-dump-cache-tree test-dump-split-index test-dump-untracked-cache test-genrandom test-hashmap test-index-version test-line-buffer test-match-trees test-mergesort test-mktemp test-parse-options test-path-utils test-prio-queue test-read-cache test-regex test-revision-walking test-run-command test-scrap-cache-tree test-sha1 test-sha1-array test-sigchain test-string-list test-submodule-config test-subprocess test-svn-fe test-urlmatch-normalization test-wildmatch git-remote-testgit
rm -f -r bin-wrappers ./.depend block-sha1/.depend builtin/.depend compat/.depend ewah/.depend vcs-svn/.depend xdiff/.depend
rm -f -r po/build/
rm -f *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope*
rm -f -r git-2.6.4 .doc-tmp-dir
rm -f git-2.6.4.tar.gz git-core_2.6.4-*.tar.gz
rm -f git-htmldocs-2.6.4.tar.gz git-manpages-2.6.4.tar.gz
/usr/bin/make -C Documentation/ clean
make[2]: Entering directory '/«PKGBUILDDIR»/Documentation'
GEN mergetools-list.made
GEN cmd-list.made
GEN doc.dep
make[3]: Entering directory '/«PKGBUILDDIR»'
make[3]: 'GIT-VERSION-FILE' is up to date.
make[3]: Leaving directory '/«PKGBUILDDIR»'
make[3]: Entering directory '/«PKGBUILDDIR»'
make[3]: 'GIT-VERSION-FILE' is up to date.
make[3]: Leaving directory '/«PKGBUILDDIR»'
rm -f *.xml *.xml+ *.html *.html+ *.1 *.5 *.7
rm -f *.texi *.texi+ *.texi++ git.info gitman.info
rm -f *.pdf
rm -f howto-index.txt howto/*.html doc.dep
rm -f technical/*.html technical/api-index.txt
rm -f cmds-ancillaryinterrogators.txt cmds-ancillarymanipulators.txt cmds-mainporcelain.txt cmds-plumbinginterrogators.txt cmds-plumbingmanipulators.txt cmds-synchingrepositories.txt cmds-synchelpers.txt cmds-purehelpers.txt cmds-foreignscminterface.txt mergetools-diff.txt mergetools-merge.txt *.made
rm -f manpage-base-url.xsl
make[2]: Leaving directory '/«PKGBUILDDIR»/Documentation'
/usr/bin/make -C gitweb clean
make[2]: Entering directory '/«PKGBUILDDIR»/gitweb'
make[3]: Entering directory '/«PKGBUILDDIR»'
make[3]: 'GIT-VERSION-FILE' is up to date.
make[3]: Leaving directory '/«PKGBUILDDIR»'
rm -f gitweb.cgi static/gitweb.js \
static/gitweb.min.js static/gitweb.min.css \
GITWEB-BUILD-OPTIONS
make[2]: Leaving directory '/«PKGBUILDDIR»/gitweb'
/usr/bin/make -C perl clean
make[2]: Entering directory '/«PKGBUILDDIR»/perl'
rm -f ppport.h
rm -f perl.mak
rm -f perl.mak.old
rm -f PM.stamp
make[2]: Leaving directory '/«PKGBUILDDIR»/perl'
/usr/bin/make -C templates/ clean
make[2]: Entering directory '/«PKGBUILDDIR»/templates'
rm -f -r blt boilerplates.made
make[2]: Leaving directory '/«PKGBUILDDIR»/templates'
/usr/bin/make -C t/ clean
make[2]: Entering directory '/«PKGBUILDDIR»/t'
rm -f -r 'trash directory'.* 'test-results'
rm -f -r valgrind/bin
rm -f .prove
make[2]: Leaving directory '/«PKGBUILDDIR»/t'
/usr/bin/make -C gitk-git clean
make[2]: Entering directory '/«PKGBUILDDIR»/gitk-git'
rm -f gitk-wish po/*.msg GIT-TCLTK-VARS
make[2]: Leaving directory '/«PKGBUILDDIR»/gitk-git'
/usr/bin/make -C git-gui clean
make[2]: Entering directory '/«PKGBUILDDIR»/git-gui'
GITGUI_VERSION = 0.19.0.18.g4498b
rm -rf git-gui lib/tclIndex po/*.msg
rm -rf GIT-VERSION-FILE GIT-GUI-VARS
make[2]: Leaving directory '/«PKGBUILDDIR»/git-gui'
rm -f GIT-VERSION-FILE GIT-CFLAGS GIT-LDFLAGS GIT-BUILD-OPTIONS
rm -f GIT-USER-AGENT GIT-PREFIX
rm -f GIT-SCRIPT-DEFINES GIT-PERL-DEFINES GIT-PYTHON-VARS
make[1]: Leaving directory '/«PKGBUILDDIR»'
! test -e patch-stamp || \
{ \
set -e; \
/usr/bin/make -Ccontrib/mw-to-git clean NO_OPENSSL=1 prefix=/usr gitexecdir=/usr/lib/git-core libexecdir=/usr/lib/git-core mandir=/usr/share/man htmldir=/usr/share/doc/git/html INSTALLDIRS=vendor USE_SRV_RR=1 USE_LIBPCRE=1 SANE_TOOL_PATH= INSTALL=install TAR=tar NO_CROSS_DIRECTORY_HARDLINKS=1 NO_INSTALL_HARDLINKS=1 DEFAULT_PAGER=pager DEFAULT_EDITOR=editor CC='gcc' CFLAGS='-Wall -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' LDFLAGS='-Wl,-z,relro'; \
for i in `ls -1r debian/diff/*.diff debian/diff/*.patch \
2>/dev/null || :`; do \
patch -p1 -NR -r- <$i || test $? = 1 || exit 1; \
done; \
}
rm -rf '/«PKGBUILDDIR»/tmp'
rm -f patch-stamp build-arch-stamp build-indep-stamp
set -e; \
for i in '' -doc -arch -cvs -svn -mediawiki -daemon-run -daemon-sysvinit -email -gui k web -all -el -man -core; do \
rm -rf '/«PKGBUILDDIR»/debian/git'$i; \
done
rm -f debian/files debian/substvars
rm -f git-subtree
debian/rules build-arch
for i in `ls -1 debian/diff/*.diff debian/diff/*.patch \
2>/dev/null || :`; do \
patch -p1 -N -r- <$i || test $? = 1 || exit 1; \
done
patching file templates/hooks--pre-rebase.sample
patching file Makefile
patching file connect.c
patching file connect.h
patching file tcp.c
patching file tcp.h
patching file daemon.c
patching file daemon.c
patching file tcp.c
patching file tcp.h
patching file Makefile
patching file dns-ipv4.c
patching file dns-ipv4.h
patching file dns-ipv6.c
patching file dns-ipv6.h
patching file tcp.c
patching file Makefile
patching file srv.c
patching file srv.h
patching file tcp.c
patching file srv.c
touch patch-stamp
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/5/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Raspbian 5.2.1-23+rpi1' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 5.2.1 20151028 (Raspbian 5.2.1-23+rpi1)
DESTDIR='/«PKGBUILDDIR»/debian/git' /usr/bin/make all NO_OPENSSL=1 prefix=/usr gitexecdir=/usr/lib/git-core libexecdir=/usr/lib/git-core mandir=/usr/share/man htmldir=/usr/share/doc/git/html INSTALLDIRS=vendor USE_SRV_RR=1 USE_LIBPCRE=1 SANE_TOOL_PATH= INSTALL=install TAR=tar NO_CROSS_DIRECTORY_HARDLINKS=1 NO_INSTALL_HARDLINKS=1 DEFAULT_PAGER=pager DEFAULT_EDITOR=editor CC='gcc' CFLAGS='-Wall -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' LDFLAGS='-Wl,-z,relro'
make[1]: Entering directory '/«PKGBUILDDIR»'
GIT_VERSION = 2.6.4
* new build flags
* new link flags
* new prefix flags
GEN common-cmds.h
CC hex.o
CC ident.o
CC kwset.o
CC levenshtein.o
CC line-log.o
CC line-range.o
CC list-objects.o
CC ll-merge.o
CC lockfile.o
CC log-tree.o
CC mailmap.o
CC match-trees.o
CC merge.o
CC merge-blobs.o
CC merge-recursive.o
CC mergesort.o
CC name-hash.o
CC notes.o
CC notes-cache.o
CC notes-merge.o
CC notes-utils.o
CC object.o
CC pack-bitmap.o
CC pack-bitmap-write.o
CC pack-check.o
CC pack-objects.o
CC pack-revindex.o
CC pack-write.o
CC pager.o
CC parse-options.o
CC parse-options-cb.o
CC patch-delta.o
CC patch-ids.o
CC path.o
CC pathspec.o
CC pkt-line.o
CC preload-index.o
CC pretty.o
CC prio-queue.o
CC progress.o
CC prompt.o
CC quote.o
CC reachable.o
CC read-cache.o
CC reflog-walk.o
CC refs.o
CC ref-filter.o
CC remote.o
CC replace_object.o
CC rerere.o
CC resolve-undo.o
CC revision.o
CC run-command.o
CC send-pack.o
CC sequencer.o
CC server-info.o
CC setup.o
CC sha1-array.o
CC sha1-lookup.o
CC sha1_file.o
CC sha1_name.o
CC shallow.o
CC sideband.o
CC sigchain.o
CC split-index.o
CC strbuf.o
CC streaming.o
CC string-list.o
CC submodule.o
CC submodule-config.o
CC symlinks.o
CC tag.o
CC tcp.o
CC tempfile.o
CC trace.o
CC trailer.o
CC transport.o
CC transport-helper.o
CC tree-diff.o
CC tree.o
CC tree-walk.o
CC unpack-trees.o
CC url.o
CC urlmatch.o
CC usage.o
CC userdiff.o
CC utf8.o
CC varint.o
CC versioncmp.o
CC walker.o
CC wildmatch.o
CC wrapper.o
CC write_or_die.o
CC ws.o
CC wt-status.o
CC xdiff-interface.o
CC zlib.o
CC srv.o
CC dns-ipv6.o
CC unix-socket.o
CC block-sha1/sha1.o
CC thread-utils.o
CC compat/strlcpy.o
CC xdiff/xdiffi.o
CC xdiff/xprepare.o
CC xdiff/xutils.o
CC xdiff/xemit.o
CC xdiff/xmerge.o
CC xdiff/xpatience.o
CC xdiff/xhistogram.o
CC daemon.o
CC fast-import.o
CC http-backend.o
CC imap-send.o
CC http.o
CC sh-i18n--envsubst.o
CC shell.o
CC show-index.o
CC upload-pack.o
CC remote-testsvn.o
CC vcs-svn/line_buffer.o
CC vcs-svn/sliding_window.o
CC vcs-svn/repo_tree.o
CC vcs-svn/fast_export.o
CC vcs-svn/svndiff.o
CC vcs-svn/svndump.o
CC http-walker.o
CC http-fetch.o
CC http-push.o
CC credential-cache.o
CC credential-cache--daemon.o
CC remote-curl.o
* new script parameters
* new perl-specific parameters
* new Python interpreter location
GEN git-instaweb
GEN git-mergetool--lib
GEN git-parse-remote
GEN git-rebase--am
GEN git-rebase--interactive
GEN git-rebase--merge
GEN git-sh-setup
GEN git-sh-i18n
CC git.o
CC builtin/add.o
CC builtin/am.o
CC builtin/annotate.o
CC builtin/apply.o
CC builtin/archive.o
CC builtin/bisect--helper.o
CC builtin/blame.o
CC builtin/branch.o
CC builtin/bundle.o
CC builtin/cat-file.o
CC builtin/check-attr.o
CC builtin/check-ignore.o
CC builtin/check-mailmap.o
CC builtin/check-ref-format.o
CC builtin/checkout-index.o
CC builtin/checkout.o
CC builtin/clean.o
CC builtin/clone.o
CC builtin/column.o
CC builtin/commit-tree.o
CC builtin/commit.o
CC builtin/config.o
CC builtin/count-objects.o
CC builtin/credential.o
CC builtin/describe.o
CC builtin/diff-files.o
CC builtin/diff-index.o
CC builtin/diff-tree.o
CC builtin/diff.o
CC builtin/fast-export.o
CC builtin/fetch-pack.o
CC builtin/fetch.o
CC builtin/fmt-merge-msg.o
CC builtin/for-each-ref.o
CC builtin/fsck.o
CC builtin/gc.o
CC builtin/get-tar-commit-id.o
CC builtin/grep.o
CC builtin/hash-object.o
CC builtin/help.o
CC builtin/index-pack.o
CC builtin/init-db.o
CC builtin/interpret-trailers.o
CC builtin/log.o
CC builtin/ls-files.o
CC builtin/ls-remote.o
CC builtin/ls-tree.o
CC builtin/mailinfo.o
CC builtin/mailsplit.o
CC builtin/merge.o
CC builtin/merge-base.o
CC builtin/merge-file.o
CC builtin/merge-index.o
CC builtin/merge-ours.o
CC builtin/merge-recursive.o
CC builtin/merge-tree.o
CC builtin/mktag.o
CC builtin/mktree.o
CC builtin/mv.o
CC builtin/name-rev.o
CC builtin/notes.o
CC builtin/pack-objects.o
CC builtin/pack-redundant.o
CC builtin/pack-refs.o
CC builtin/patch-id.o
CC builtin/prune-packed.o
CC builtin/prune.o
CC builtin/pull.o
CC builtin/push.o
CC builtin/read-tree.o
CC builtin/receive-pack.o
CC builtin/reflog.o
CC builtin/remote.o
CC builtin/remote-ext.o
CC builtin/remote-fd.o
CC builtin/repack.o
CC builtin/replace.o
CC builtin/rerere.o
CC builtin/reset.o
CC builtin/rev-list.o
CC builtin/rev-parse.o
CC builtin/revert.o
CC builtin/rm.o
CC builtin/send-pack.o
CC builtin/shortlog.o
CC builtin/show-branch.o
CC builtin/show-ref.o
CC builtin/stripspace.o
CC builtin/symbolic-ref.o
CC builtin/tag.o
CC builtin/unpack-file.o
CC builtin/unpack-objects.o
CC builtin/update-index.o
CC builtin/update-ref.o
CC builtin/update-server-info.o
CC builtin/upload-archive.o
CC builtin/var.o
CC builtin/verify-commit.o
CC builtin/verify-pack.o
CC builtin/verify-tag.o
CC builtin/worktree.o
CC builtin/write-tree.o
MSGFMT po/build/locale/pt_PT/LC_MESSAGES/git.mo
306 translated messages, 687 untranslated messages.
MSGFMT po/build/locale/de/LC_MESSAGES/git.mo
2440 translated messages.
MSGFMT po/build/locale/vi/LC_MESSAGES/git.mo
MSGFMT po/build/locale/is/LC_MESSAGES/git.mo
14 translated messages.
MSGFMT po/build/locale/ca/LC_MESSAGES/git.mo
MSGFMT po/build/locale/sv/LC_MESSAGES/git.mo
2440 translated messages.
MSGFMT po/build/locale/fr/LC_MESSAGES/git.mo
2440 translated messages.
MSGFMT po/build/locale/it/LC_MESSAGES/git.mo
2441 translated messages.
MSGFMT po/build/locale/bg/LC_MESSAGES/git.mo
716 translated messages, 350 untranslated messages.
MSGFMT po/build/locale/ru/LC_MESSAGES/git.mo
2440 translated messages.
MSGFMT po/build/locale/zh_CN/LC_MESSAGES/git.mo
2359 translated messages.
CC test-chmtime.o
2440 translated messages.
CC test-ctype.o
2440 translated messages.
CC test-config.o
CC test-date.o
CC test-delta.o
CC test-dump-cache-tree.o
CC test-dump-split-index.o
CC test-dump-untracked-cache.o
CC test-genrandom.o
CC test-hashmap.o
CC test-index-version.o
CC test-line-buffer.o
CC test-match-trees.o
CC test-mergesort.o
CC test-mktemp.o
CC test-parse-options.o
CC test-path-utils.o
CC test-prio-queue.o
CC test-read-cache.o
CC test-regex.o
CC test-revision-walking.o
CC test-run-command.o
CC test-scrap-cache-tree.o
CC test-sha1.o
CC test-sha1-array.o
CC test-sigchain.o
CC test-string-list.o
CC test-submodule-config.o
CC test-subprocess.o
CC test-svn-fe.o
CC test-urlmatch-normalization.o
CC test-wildmatch.o
GEN bin-wrappers/git
GEN bin-wrappers/git-upload-pack
GEN bin-wrappers/git-receive-pack
GEN bin-wrappers/git-upload-archive
GEN bin-wrappers/git-shell
GEN bin-wrappers/git-cvsserver
GEN bin-wrappers/test-chmtime
GEN bin-wrappers/test-ctype
GEN bin-wrappers/test-config
GEN bin-wrappers/test-date
GEN bin-wrappers/test-delta
GEN bin-wrappers/test-dump-cache-tree
GEN bin-wrappers/test-dump-split-index
GEN bin-wrappers/test-dump-untracked-cache
GEN bin-wrappers/test-genrandom
GEN bin-wrappers/test-hashmap
GEN bin-wrappers/test-index-version
GEN bin-wrappers/test-line-buffer
GEN bin-wrappers/test-match-trees
GEN bin-wrappers/test-mergesort
GEN bin-wrappers/test-mktemp
GEN bin-wrappers/test-parse-options
GEN bin-wrappers/test-path-utils
GEN bin-wrappers/test-prio-queue
GEN bin-wrappers/test-read-cache
GEN bin-wrappers/test-regex
GEN bin-wrappers/test-revision-walking
GEN bin-wrappers/test-run-command
GEN bin-wrappers/test-scrap-cache-tree
GEN bin-wrappers/test-sha1
GEN bin-wrappers/test-sha1-array
GEN bin-wrappers/test-sigchain
GEN bin-wrappers/test-string-list
GEN bin-wrappers/test-submodule-config
GEN bin-wrappers/test-subprocess
GEN bin-wrappers/test-svn-fe
GEN bin-wrappers/test-urlmatch-normalization
GEN bin-wrappers/test-wildmatch
GEN git-remote-testgit
CC credential-store.o
CC abspath.o
CC advice.o
CC alias.o
CC alloc.o
CC archive.o
CC archive-tar.o
CC archive-zip.o
CC argv-array.o
CC attr.o
CC base85.o
CC bisect.o
CC blob.o
CC branch.o
CC bulk-checkin.o
CC bundle.o
CC cache-tree.o
CC color.o
CC column.o
CC combine-diff.o
CC commit.o
CC compat/obstack.o
CC compat/terminal.o
CC config.o
CC connect.o
CC connected.o
CC convert.o
CC copy.o
CC credential.o
CC csum-file.o
CC ctype.o
CC date.o
CC decorate.o
CC diffcore-break.o
CC diffcore-delta.o
CC diffcore-order.o
CC diffcore-pickaxe.o
CC diffcore-rename.o
CC diff-delta.o
CC diff-lib.o
CC diff-no-index.o
CC diff.o
CC dir.o
CC editor.o
CC entry.o
CC environment.o
CC ewah/bitmap.o
CC ewah/ewah_bitmap.o
CC ewah/ewah_io.o
CC ewah/ewah_rlw.o
CC exec_cmd.o
CC fetch-pack.o
CC fsck.o
CC gettext.o
CC gpg-interface.o
CC graph.o
CC grep.o
CC hashmap.o
CC help.o
CC version.o
AR xdiff/lib.a
AR vcs-svn/lib.a
GEN git-bisect
GEN git-difftool--helper
GEN git-filter-branch
GEN git-merge-octopus
GEN git-merge-one-file
GEN git-merge-resolve
GEN git-mergetool
GEN git-quiltimport
GEN git-rebase
GEN git-request-pull
GEN git-stash
GEN git-submodule
GEN git-web--browse
make[2]: Entering directory '/«PKGBUILDDIR»/perl'
/usr/bin/perl Makefile.PL PREFIX='/usr' INSTALL_BASE='' --localedir='/usr/share/locale'
GEN git-p4
Generating a Unix-style perl.mak
Writing perl.mak for Git
Writing MYMETA.yml and MYMETA.json
make[2]: Leaving directory '/«PKGBUILDDIR»/perl'
GEN git-add--interactive
GEN git-difftool
GEN git-archimport
GEN git-cvsexportcommit
GEN git-cvsimport
GEN git-cvsserver
GEN git-relink
GEN git-send-email
GEN git-svn
AR libgit.a
LINK git-credential-store
LINK git-daemon
LINK git-fast-import
LINK git-http-backend
LINK git-imap-send
LINK git-sh-i18n--envsubst
LINK git-shell
LINK git-show-index
LINK git-upload-pack
LINK git-remote-testsvn
LINK git-http-fetch
LINK git-http-push
LINK git-credential-cache
LINK git-credential-cache--daemon
LINK git-remote-http
LINK git
LINK test-chmtime
LINK test-ctype
LINK test-config
LINK test-date
LINK test-delta
LINK test-dump-cache-tree
LINK test-dump-split-index
LINK test-dump-untracked-cache
LINK test-genrandom
LINK test-hashmap
LINK test-index-version
LINK test-line-buffer
LINK test-match-trees
LINK test-mergesort
LINK test-mktemp
LINK test-parse-options
LINK test-path-utils
LINK test-prio-queue
LINK test-read-cache
LINK test-regex
LINK test-revision-walking
LINK test-run-command
LINK test-scrap-cache-tree
LINK test-sha1
LINK test-sha1-array
LINK test-sigchain
LINK test-string-list
LINK test-submodule-config
LINK test-subprocess
LINK test-svn-fe
LINK test-urlmatch-normalization
LINK test-wildmatch
LN/CP git-remote-https
LN/CP git-remote-ftp
LN/CP git-remote-ftps
BUILTIN git-add
BUILTIN git-am
BUILTIN git-annotate
BUILTIN git-apply
BUILTIN git-archive
BUILTIN git-bisect--helper
BUILTIN git-blame
BUILTIN git-branch
BUILTIN git-bundle
BUILTIN git-cat-file
BUILTIN git-check-attr
BUILTIN git-check-ignore
BUILTIN git-check-mailmap
BUILTIN git-check-ref-format
BUILTIN git-checkout-index
BUILTIN git-checkout
BUILTIN git-clean
BUILTIN git-clone
BUILTIN git-column
BUILTIN git-commit-tree
BUILTIN git-commit
BUILTIN git-config
BUILTIN git-count-objects
BUILTIN git-credential
BUILTIN git-describe
BUILTIN git-diff-files
BUILTIN git-diff-index
BUILTIN git-diff-tree
BUILTIN git-diff
BUILTIN git-fast-export
BUILTIN git-fetch-pack
BUILTIN git-fetch
BUILTIN git-fmt-merge-msg
BUILTIN git-for-each-ref
BUILTIN git-fsck
BUILTIN git-gc
BUILTIN git-get-tar-commit-id
BUILTIN git-grep
BUILTIN git-hash-object
BUILTIN git-help
BUILTIN git-index-pack
BUILTIN git-init-db
BUILTIN git-interpret-trailers
BUILTIN git-log
BUILTIN git-ls-files
BUILTIN git-ls-remote
BUILTIN git-ls-tree
BUILTIN git-mailinfo
BUILTIN git-merge
BUILTIN git-mailsplit
BUILTIN git-merge-base
BUILTIN git-merge-file
BUILTIN git-merge-index
BUILTIN git-merge-ours
BUILTIN git-merge-recursive
BUILTIN git-merge-tree
BUILTIN git-mktag
BUILTIN git-mktree
BUILTIN git-mv
BUILTIN git-notes
BUILTIN git-name-rev
BUILTIN git-pack-objects
BUILTIN git-pack-redundant
BUILTIN git-pack-refs
BUILTIN git-patch-id
BUILTIN git-prune-packed
BUILTIN git-prune
BUILTIN git-pull
BUILTIN git-push
BUILTIN git-read-tree
BUILTIN git-receive-pack
BUILTIN git-reflog
BUILTIN git-remote
BUILTIN git-remote-ext
BUILTIN git-remote-fd
BUILTIN git-repack
BUILTIN git-replace
BUILTIN git-rerere
BUILTIN git-reset
BUILTIN git-rev-list
BUILTIN git-rev-parse
BUILTIN git-revert
BUILTIN git-rm
BUILTIN git-send-pack
BUILTIN git-shortlog
BUILTIN git-show-branch
BUILTIN git-show-ref
BUILTIN git-stripspace
BUILTIN git-symbolic-ref
BUILTIN git-tag
BUILTIN git-unpack-file
BUILTIN git-unpack-objects
BUILTIN git-update-index
BUILTIN git-update-ref
BUILTIN git-update-server-info
BUILTIN git-upload-archive
BUILTIN git-var
BUILTIN git-verify-commit
BUILTIN git-verify-pack
BUILTIN git-verify-tag
BUILTIN git-worktree
BUILTIN git-write-tree
BUILTIN git-cherry
BUILTIN git-cherry-pick
BUILTIN git-format-patch
BUILTIN git-fsck-objects
BUILTIN git-init
BUILTIN git-show
BUILTIN git-merge-subtree
BUILTIN git-stage
BUILTIN git-status
BUILTIN git-whatchanged
make[2]: Entering directory '/«PKGBUILDDIR»/git-gui'
GITGUI_VERSION = 0.19.0.18.g4498b
* new locations or Tcl/Tk interpreter
MSGFMT po/de.msg MSGFMT po/vi.msg MSGFMT po/hu.msg MSGFMT po/nb.msg 474 translated, 39 untranslated.
520 translated.
MSGFMT po/sv.msg 543 translated.
MSGFMT po/fr.msg MSGFMT po/it.msg 514 translated.
MSGFMT po/ja.msg 547 translated.
520 translated.
MSGFMT po/pt_br.msg MSGFMT po/bg.msg 519 translated, 1 untranslated.
MSGFMT po/ru.msg 520 translated.
MSGFMT po/zh_cn.msg 520 translated.
366 translated, 7 fuzzy, 17 untranslated.
MSGFMT po/el.msg GEN git-gui
547 translated.
INDEX lib/
516 translated, 4 untranslated.
381 translated, 4 fuzzy, 6 untranslated.
make[2]: Leaving directory '/«PKGBUILDDIR»/git-gui'
make[2]: Entering directory '/«PKGBUILDDIR»/gitk-git'
Generating catalog po/de.msg
* new Tcl/Tk interpreter location
msgfmt --statistics --tcl po/de.po -l de -d po/
Generating catalog po/vi.msg
msgfmt --statistics --tcl po/vi.po -l vi -d po/
Generating catalog po/ca.msg
msgfmt --statistics --tcl po/ca.po -l ca -d po/
Generating catalog po/hu.msg
msgfmt --statistics --tcl po/hu.po -l hu -d po/
278 translated messages, 17 fuzzy translations, 12 untranslated messages.
300 translated messages, 3 fuzzy translations, 4 untranslated messages.
Generating catalog po/es.msg
msgfmt --statistics --tcl po/es.po -l es -d po/
277 translated messages, 18 fuzzy translations, 12 untranslated messages.
Generating catalog po/sv.msg
302 translated messages, 2 fuzzy translations, 3 untranslated messages.
msgfmt --statistics --tcl po/sv.po -l sv -d po/
Generating catalog po/fr.msg
msgfmt --statistics --tcl po/fr.po -l fr -d po/
Generating catalog po/it.msg
msgfmt --statistics --tcl po/it.po -l it -d po/
184 translated messages, 46 fuzzy translations, 77 untranslated messages.
303 translated messages, 2 fuzzy translations, 2 untranslated messages.
Generating catalog po/ja.msg
msgfmt --statistics --tcl po/ja.po -l ja -d po/
Generating catalog po/pt_br.msg
msgfmt --statistics --tcl po/pt_br.po -l pt_br -d po/
263 translated messages, 27 fuzzy translations, 17 untranslated messages.
274 translated messages, 17 fuzzy translations, 16 untranslated messages.
Generating catalog po/bg.msg
msgfmt --statistics --tcl po/bg.po -l bg -d po/
Generating catalog po/ru.msg
msgfmt --statistics --tcl po/ru.po -l ru -d po/
279 translated messages, 16 fuzzy translations, 12 untranslated messages.
271 translated messages, 20 fuzzy translations, 16 untranslated messages.
GEN gitk-wish
226 translated messages, 34 fuzzy translations, 47 untranslated messages.
307 translated messages.
make[2]: Leaving directory '/«PKGBUILDDIR»/gitk-git'
make[2]: Entering directory '/«PKGBUILDDIR»/perl'
make[3]: Entering directory '/«PKGBUILDDIR»/perl'
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/SVN/Prompt.pm >blib/lib/Git/SVN/Prompt.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/SVN.pm >blib/lib/Git/SVN.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/SVN/Migration.pm >blib/lib/Git/SVN/Migration.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <private-Error.pm >blib/lib/Error.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/I18N.pm >blib/lib/Git/I18N.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/SVN/Log.pm >blib/lib/Git/SVN/Log.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/SVN/Fetcher.pm >blib/lib/Git/SVN/Fetcher.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/SVN/Memoize/YAML.pm >blib/lib/Git/SVN/Memoize/YAML.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/SVN/GlobSpec.pm >blib/lib/Git/SVN/GlobSpec.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/IndexInfo.pm >blib/lib/Git/IndexInfo.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/SVN/Ra.pm >blib/lib/Git/SVN/Ra.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/SVN/Utils.pm >blib/lib/Git/SVN/Utils.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git.pm >blib/lib/Git.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/SVN/Editor.pm >blib/lib/Git/SVN/Editor.pm
Manifying blib/man3/Git.3pm
Manifying blib/man3/Git::I18N.3pm
Manifying blib/man3/Git::SVN::Editor.3pm
Manifying blib/man3/Git::SVN::Fetcher.3pm
Manifying blib/man3/Git::SVN::Memoize::YAML.3pm
Manifying blib/man3/Git::SVN::Prompt.3pm
Manifying blib/man3/Git::SVN::Ra.3pm
Manifying blib/man3/Git::SVN::Utils.3pm
Manifying blib/man3/private-Error.3pm
make[3]: Leaving directory '/«PKGBUILDDIR»/perl'
make[2]: Leaving directory '/«PKGBUILDDIR»/perl'
make[2]: Entering directory '/«PKGBUILDDIR»/templates'
make[2]: Leaving directory '/«PKGBUILDDIR»/templates'
make[1]: Leaving directory '/«PKGBUILDDIR»'
DESTDIR='/«PKGBUILDDIR»/debian/git' /usr/bin/make -C contrib/subtree all NO_OPENSSL=1 prefix=/usr gitexecdir=/usr/lib/git-core libexecdir=/usr/lib/git-core mandir=/usr/share/man htmldir=/usr/share/doc/git/html INSTALLDIRS=vendor USE_SRV_RR=1 USE_LIBPCRE=1 SANE_TOOL_PATH= INSTALL=install TAR=tar NO_CROSS_DIRECTORY_HARDLINKS=1 NO_INSTALL_HARDLINKS=1 DEFAULT_PAGER=pager DEFAULT_EDITOR=editor CC='gcc' CFLAGS='-Wall -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' LDFLAGS='-Wl,-z,relro'
make[1]: Entering directory '/«PKGBUILDDIR»/contrib/subtree'
/usr/bin/make -C ../../ GIT-VERSION-FILE
make[2]: Entering directory '/«PKGBUILDDIR»'
make[2]: 'GIT-VERSION-FILE' is up to date.
make[2]: Leaving directory '/«PKGBUILDDIR»'
sed -e '1s|#!.*/sh|#!/bin/sh|' git-subtree.sh >git-subtree
chmod +x git-subtree
make[1]: Leaving directory '/«PKGBUILDDIR»/contrib/subtree'
ln -s contrib/subtree/git-subtree
test -z 'test' || \
DESTDIR='/«PKGBUILDDIR»/debian/git' /usr/bin/make test NO_OPENSSL=1 prefix=/usr gitexecdir=/usr/lib/git-core libexecdir=/usr/lib/git-core mandir=/usr/share/man htmldir=/usr/share/doc/git/html INSTALLDIRS=vendor USE_SRV_RR=1 USE_LIBPCRE=1 SANE_TOOL_PATH= INSTALL=install TAR=tar NO_CROSS_DIRECTORY_HARDLINKS=1 NO_INSTALL_HARDLINKS=1 DEFAULT_PAGER=pager DEFAULT_EDITOR=editor CC='gcc' CFLAGS='-Wall -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' LDFLAGS='-Wl,-z,relro' || \
GIT_TEST_OPTS=--verbose DESTDIR='/«PKGBUILDDIR»/debian/git' /usr/bin/make test NO_OPENSSL=1 prefix=/usr gitexecdir=/usr/lib/git-core libexecdir=/usr/lib/git-core mandir=/usr/share/man htmldir=/usr/share/doc/git/html INSTALLDIRS=vendor USE_SRV_RR=1 USE_LIBPCRE=1 SANE_TOOL_PATH= INSTALL=install TAR=tar NO_CROSS_DIRECTORY_HARDLINKS=1 NO_INSTALL_HARDLINKS=1 DEFAULT_PAGER=pager DEFAULT_EDITOR=editor CC='gcc' CFLAGS='-Wall -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' LDFLAGS='-Wl,-z,relro'
make[1]: Entering directory '/«PKGBUILDDIR»'
make[2]: Entering directory '/«PKGBUILDDIR»/perl'
/usr/bin/perl Makefile.PL PREFIX='/usr' INSTALL_BASE='' --localedir='/usr/share/locale'
Generating a Unix-style perl.mak
Writing perl.mak for Git
Writing MYMETA.yml and MYMETA.json
make[2]: Leaving directory '/«PKGBUILDDIR»/perl'
GEN git-add--interactive
GEN git-difftool
GEN git-archimport
GEN git-cvsexportcommit
GEN git-cvsimport
GEN git-cvsserver
GEN git-relink
GEN git-send-email
GEN git-svn
make[2]: Entering directory '/«PKGBUILDDIR»/git-gui'
make[2]: Leaving directory '/«PKGBUILDDIR»/git-gui'
make[2]: Entering directory '/«PKGBUILDDIR»/gitk-git'
make[2]: Leaving directory '/«PKGBUILDDIR»/gitk-git'
make[2]: Entering directory '/«PKGBUILDDIR»/perl'
make[3]: Entering directory '/«PKGBUILDDIR»/perl'
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/I18N.pm >blib/lib/Git/I18N.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/SVN.pm >blib/lib/Git/SVN.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/SVN/GlobSpec.pm >blib/lib/Git/SVN/GlobSpec.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/SVN/Editor.pm >blib/lib/Git/SVN/Editor.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/SVN/Fetcher.pm >blib/lib/Git/SVN/Fetcher.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/SVN/Migration.pm >blib/lib/Git/SVN/Migration.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/SVN/Log.pm >blib/lib/Git/SVN/Log.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/IndexInfo.pm >blib/lib/Git/IndexInfo.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git.pm >blib/lib/Git.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/SVN/Ra.pm >blib/lib/Git/SVN/Ra.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <private-Error.pm >blib/lib/Error.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/SVN/Prompt.pm >blib/lib/Git/SVN/Prompt.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/SVN/Memoize/YAML.pm >blib/lib/Git/SVN/Memoize/YAML.pm
/usr/bin/perl -pe "s<\Q++LOCALEDIR++\E></usr/share/locale>" <Git/SVN/Utils.pm >blib/lib/Git/SVN/Utils.pm
make[3]: Leaving directory '/«PKGBUILDDIR»/perl'
make[2]: Leaving directory '/«PKGBUILDDIR»/perl'
make[2]: Entering directory '/«PKGBUILDDIR»/templates'
make[2]: Leaving directory '/«PKGBUILDDIR»/templates'
/usr/bin/make -C t/ all
make[2]: Entering directory '/«PKGBUILDDIR»/t'
rm -f -r 'test-results'
/usr/bin/make aggregate-results-and-cleanup
make[3]: Entering directory '/«PKGBUILDDIR»/t'
*** t0000-basic.sh ***
*** t0001-init.sh ***
*** t0002-gitfile.sh ***
*** t0003-attributes.sh ***
ok 1 - initial setup
ok 1 - .git/objects should be empty after git init in an empty repo
ok 1 - setup
ok 2 - .git/objects should have 3 subdirectories
ok 3 - success is reported like this
ok 2 - bad setup: invalid .git file format
ok 1 - plain
ok 3 - bad setup: invalid .git file path
ok 4 - final setup + check rev-parse --git-dir
ok 5 - check hash-object
ok 6 - check cat-file
ok 2 - plain nested in bare
ok 2 - command line checks
ok 7 - check update-index
ok 8 - check write-tree
ok 3 - plain through aliased command, outside any git repo
ok 4 - pretend we have a fully passing test suite
ok 9 - check commit-tree
ok 10 - check rev-list
ok 4 - plain nested through aliased command
ok 11 - setup_git_dir twice in subdir
ok 5 - plain nested in bare through aliased command
ok 5 - pretend we have a partially passing test suite
ok 6 - plain with GIT_WORK_TREE
ok 3 - attribute test
ok 7 - plain bare
ok 8 - plain bare with GIT_WORK_TREE
ok 12 - enter_repo non-strict mode
ok 9 - GIT_DIR bare
ok 6 - pretend we have a known breakage
ok 10 - init --bare
ok 13 - enter_repo linked checkout
ok 11 - GIT_DIR non-bare
ok 14 - enter_repo strict mode
# passed all 14 test(s)
1..14
ok 12 - GIT_DIR & GIT_WORK_TREE (1)
*** t0004-unwritable.sh ***
ok 4 - attribute matching is case sensitive when core.ignorecase=0
ok 13 - GIT_DIR & GIT_WORK_TREE (2)
ok 7 - pretend we have fixed a known breakage
ok 14 - reinit
ok 15 - init with --template
ok 16 - init with --template (blank)
ok 1 - setup
ok 8 - pretend we have fixed one of two known breakages (run in sub test-lib)
ok 17 - init with init.templatedir set
ok 2 - write-tree should notice unwritable repository
ok 3 - commit should notice unwritable repository
ok 5 - attribute matching is case insensitive when core.ignorecase=1
ok 4 - update-index should notice unwritable repository
ok 6 # skip additional case insensitivity tests (missing CASE_INSENSITIVE_FS)
ok 5 - add should notice unwritable repository
# passed all 5 test(s)
1..5
ok 18 - init --bare/--shared overrides system/global config
*** t0005-signals.sh ***
ok 9 - pretend we have a pass, fail, and known breakage
ok 7 - unnormalized paths
ok 19 - init honors global core.sharedRepository
ok 20 - init rejects insanely long --template
ok 21 - init creates a new directory
ok 1 - sigchain works
ok 22 - init creates a new bare directory
ok 2 - signals are propagated using shell convention
ok 23 - init recreates a directory
ok 3 - create blob
ok 10 - pretend we have a mix of all possible results
ok 24 - init recreates a new bare directory
ok 8 - relative paths
ok 4 - a constipated git dies with SIGPIPE
ok 25 - init creates a new deep directory
ok 5 - a constipated git dies with SIGPIPE even if parent ignores it
ok 9 - prefixes are not confused with leading directories
# passed all 5 test(s)
1..5
*** t0006-date.sh ***
ok 26 - init creates a new deep directory (umask vs. shared)
ok 27 - init notices EEXIST (1)
ok 11 - test --verbose
ok 10 - core.attributesfile
ok 28 - init notices EEXIST (2)
ok 11 - attribute test: read paths from stdin
ok 1 - relative date (5 seconds ago)
ok 2 - relative date (5 minutes ago)
ok 3 - relative date (5 hours ago)
ok 29 - init notices EPERM
ok 4 - relative date (5 days ago)
ok 12 - attribute test: --all option
ok 5 - relative date (3 weeks ago)
ok 30 - init creates a new bare directory with global --bare
ok 6 - relative date (5 months ago)
ok 7 - relative date (1 year, 2 months ago)
ok 8 - relative date (1 year, 9 months ago)
ok 31 - init prefers command line to GIT_DIR
ok 12 - test --verbose-only
ok 13 - attribute test: --cached option
ok 9 - relative date (20 years ago)
ok 10 - relative date (12 months ago)
ok 11 - relative date (2 years ago)
ok 14 - root subdir attribute test
ok 32 - init with separate gitdir
ok 12 - parse date (2008)
ok 33 - re-init on .git file
ok 15 - negative patterns
ok 13 - parse date (2008-02)
ok 16 - patterns starting with exclamation
ok 14 - parse date (2008-02-14)
ok 34 - re-init to update git link
ok 15 - parse date (2008-02-14 20:30:45)
ok 16 - parse date (2008-02-14 20:30:45 -0500)
ok 17 - parse date (2008-02-14 20:30:45 -0015)
ok 17 - "**" test
ok 18 - parse date (2008-02-14 20:30:45 -5)
ok 13 - GIT_SKIP_TESTS
ok 19 - parse date (2008-02-14 20:30:45 -5:)
ok 35 - re-init to move gitdir
ok 20 - parse date (2008-02-14 20:30:45 -05)
ok 21 - parse date (2008-02-14 20:30:45 -:30)
ok 22 - parse date (2008-02-14 20:30:45 -05:00)
ok 23 - parse date (2008-02-14 20:30:45 TZ=EST5)
ok 18 - "**" with no slashes test
ok 24 - parse approxidate (now)
ok 36 - re-init to move gitdir symlink
ok 25 - parse approxidate (5 seconds ago)
# passed all 36 test(s)
1..36
ok 26 - parse approxidate (5.seconds.ago)
ok 27 - parse approxidate (10.minutes.ago)
ok 19 - using --git-dir and --work-tree
ok 28 - parse approxidate (yesterday)
ok 29 - parse approxidate (3.days.ago)
ok 14 - GIT_SKIP_TESTS several tests
ok 30 - parse approxidate (3.weeks.ago)
ok 20 - setup bare
ok 31 - parse approxidate (3.months.ago)
ok 32 - parse approxidate (2.years.3.months.ago)
ok 33 - parse approxidate (6am yesterday)
ok 34 - parse approxidate (6pm yesterday)
ok 35 - parse approxidate (3:00)
ok 36 - parse approxidate (15:00)
ok 21 - bare repository: check that .gitattribute is ignored
*** t0007-git-var.sh ***
ok 37 - parse approxidate (noon today)
ok 38 - parse approxidate (noon yesterday)
ok 22 - bare repository: check that --cached honors index
ok 15 - GIT_SKIP_TESTS sh pattern
ok 39 - parse approxidate (last tuesday)
ok 40 - parse approxidate (July 5th)
ok 41 - parse approxidate (06/05/2009)
ok 42 - parse approxidate (06.05.2009)
ok 43 - parse approxidate (Jun 6, 5AM)
ok 1 - get GIT_AUTHOR_IDENT
ok 44 - parse approxidate (5AM Jun 6)
ok 2 - get GIT_COMMITTER_IDENT
ok 23 - bare repository: test info/attributes
ok 45 - parse approxidate (6AM, June 7, 2009)
# passed all 23 test(s)
1..23
ok 46 - parse approxidate (2008-12-01)
ok 3 # skip requested identites are strict (missing !AUTOIDENT)
ok 47 - parse approxidate (2009-12-01)
# passed all 47 test(s)
1..47
ok 4 - git var -l lists variables
*** t0008-ignores.sh ***
ok 5 - git var -l lists config
*** t0009-prio-queue.sh ***
ok 6 - listing and asking for variables are exclusive
# passed all 6 test(s)
1..6
*** t0010-racy-git.sh ***
ok 16 - --run basic
ok 1 - basic ordering
ok 2 - mixed put and get
ok 3 - notice empty queue
ok 1 - Racy GIT trial #0 part A
# passed all 3 test(s)
1..3
*** t0011-hashmap.sh ***
ok 1 - setup
ok 2 - . corner-case
ok 3 - . corner-case with -q
ok 17 - --run with a range
ok 4 - . corner-case with --quiet
ok 1 - hash functions
ok 5 - . corner-case with -v
ok 2 - put
ok 3 - put (case insensitive)
ok 6 - . corner-case with -v -n
ok 4 - replace
ok 7 - . corner-case with -v --non-matching
ok 5 - replace (case insensitive)
ok 6 - get
ok 8 - . corner-case with --verbose
ok 7 - get (case insensitive)
ok 9 - . corner-case with --verbose -n
ok 8 - add
ok 9 - add (case insensitive)
ok 10 - . corner-case with --verbose --non-matching
ok 10 - remove
ok 11 - remove (case insensitive)
ok 12 - iterate
ok 11 - empty command line
ok 13 - iterate (case insensitive)
ok 18 - --run with two ranges
ok 12 - empty command line with -q
ok 14 - grow / shrink
ok 13 - empty command line with --quiet
ok 15 - string interning
# passed all 15 test(s)
1..15
ok 14 - empty command line with -v
*** t0020-crlf.sh ***
ok 15 - empty command line with -v -n
ok 16 - empty command line with -v --non-matching
ok 17 - empty command line with --verbose
ok 18 - empty command line with --verbose -n
ok 19 - empty command line with --verbose --non-matching
ok 19 - --run with a left open range
ok 20 - --stdin with empty STDIN
ok 2 - Racy GIT trial #0 part B
ok 21 - --stdin with empty STDIN with -q
ok 3 - Racy GIT trial #1 part A
ok 22 - --stdin with empty STDIN with --quiet
ok 1 - setup
ok 23 - --stdin with empty STDIN with -v
ok 2 - safecrlf: autocrlf=input, all CRLF
ok 24 - --stdin with empty STDIN with -v -n
ok 25 - --stdin with empty STDIN with -v --non-matching
ok 3 - safecrlf: autocrlf=input, mixed LF/CRLF
ok 20 - --run with a right open range
ok 26 - --stdin with empty STDIN with --verbose
ok 4 - safecrlf: autocrlf=true, all LF
ok 27 - --stdin with empty STDIN with --verbose -n
ok 28 - --stdin with empty STDIN with --verbose --non-matching
ok 5 - safecrlf: autocrlf=true mixed LF/CRLF
ok 29 - -q with multiple args
ok 30 - --quiet with multiple args
ok 31 - -q -v
ok 6 - safecrlf: print warning only once
ok 32 - --quiet -v
ok 21 - --run with basic negation
ok 7 - safecrlf: git diff demotes safecrlf=true to warn
ok 33 - -q --verbose
ok 34 - --quiet --verbose
ok 8 - switch off autocrlf, safecrlf, reset HEAD
ok 35 - --quiet with multiple args
ok 36 - erroneous use of --
ok 9 - update with autocrlf=input
ok 37 - erroneous use of -- with -q
ok 38 - erroneous use of -- with --quiet
ok 22 - --run with two negations
ok 39 - erroneous use of -- with -v
ok 10 - update with autocrlf=true
ok 40 - erroneous use of -- with -v -n
ok 41 - erroneous use of -- with -v --non-matching
ok 42 - erroneous use of -- with --verbose
ok 4 - Racy GIT trial #1 part B
ok 43 - erroneous use of -- with --verbose -n
ok 11 - checkout with autocrlf=true
ok 5 - Racy GIT trial #2 part A
ok 44 - erroneous use of -- with --verbose --non-matching
ok 45 - --stdin with superfluous arg
ok 23 - --run a range and negation
ok 12 - checkout with autocrlf=input
ok 46 - --stdin with superfluous arg with -q
ok 47 - --stdin with superfluous arg with --quiet
ok 13 - apply patch (autocrlf=input)
ok 48 - --stdin with superfluous arg with -v
ok 49 - --stdin with superfluous arg with -v -n
ok 14 - apply patch --cached (autocrlf=input)
ok 50 - --stdin with superfluous arg with -v --non-matching
ok 51 - --stdin with superfluous arg with --verbose
ok 52 - --stdin with superfluous arg with --verbose -n
ok 15 - apply patch --index (autocrlf=input)
ok 24 - --run range negation
ok 53 - --stdin with superfluous arg with --verbose --non-matching
ok 16 - apply patch (autocrlf=true)
ok 54 - --stdin -z with superfluous arg
ok 55 - --stdin -z with superfluous arg with -q
ok 17 - apply patch --cached (autocrlf=true)
ok 56 - --stdin -z with superfluous arg with --quiet
ok 57 - --stdin -z with superfluous arg with -v
ok 18 - apply patch --index (autocrlf=true)
ok 58 - --stdin -z with superfluous arg with -v -n
ok 59 - --stdin -z with superfluous arg with -v --non-matching
ok 19 - .gitattributes says two is binary
ok 60 - --stdin -z with superfluous arg with --verbose
ok 6 - Racy GIT trial #2 part B
ok 20 - .gitattributes says two is input
ok 61 - --stdin -z with superfluous arg with --verbose -n
ok 25 - --run include, exclude and include
ok 7 - Racy GIT trial #3 part A
ok 21 - .gitattributes says two and three are text
ok 62 - --stdin -z with superfluous arg with --verbose --non-matching
ok 63 - -z without --stdin
ok 22 - in-tree .gitattributes (1)
ok 64 - -z without --stdin with -q
ok 65 - -z without --stdin with --quiet
ok 23 - in-tree .gitattributes (2)
ok 66 - -z without --stdin with -v
ok 67 - -z without --stdin with -v -n
ok 68 - -z without --stdin with -v --non-matching
ok 24 - in-tree .gitattributes (3)
ok 69 - -z without --stdin with --verbose
ok 70 - -z without --stdin with --verbose -n
ok 26 - --run include, exclude and include, comma separated
ok 25 - in-tree .gitattributes (4)
ok 71 - -z without --stdin with --verbose --non-matching
ok 72 - -z without --stdin and superfluous arg
ok 73 - -z without --stdin and superfluous arg with -q
ok 74 - -z without --stdin and superfluous arg with --quiet
ok 75 - -z without --stdin and superfluous arg with -v
ok 26 - checkout with existing .gitattributes
ok 76 - -z without --stdin and superfluous arg with -v -n
ok 77 - -z without --stdin and superfluous arg with -v --non-matching
ok 27 - --run exclude and include
ok 78 - -z without --stdin and superfluous arg with --verbose
ok 79 - -z without --stdin and superfluous arg with --verbose -n
ok 27 - checkout when deleting .gitattributes
ok 28 - invalid .gitattributes (must not crash)
ok 80 - -z without --stdin and superfluous arg with --verbose --non-matching
ok 81 - needs work tree
ok 8 - Racy GIT trial #3 part B
ok 82 - needs work tree with -q
ok 9 - Racy GIT trial #4 part A
ok 29 - setting up for new autocrlf tests
ok 83 - needs work tree with --quiet
ok 30 - report no change after setting autocrlf
ok 84 - needs work tree with -v
ok 28 - --run empty selectors
ok 31 - files are clean after checkout
ok 32 - LF only file gets CRLF with autocrlf
ok 85 - needs work tree with -v -n
ok 33 - Mixed file is still mixed with autocrlf
ok 34 - CRLF only file has CRLF with autocrlf
ok 86 - needs work tree with -v --non-matching
ok 87 - needs work tree with --verbose
ok 88 - needs work tree with --verbose -n
ok 35 - New CRLF file gets LF in repo
# passed all 35 test(s)
1..35
ok 29 - --run invalid range start
ok 89 - needs work tree with --verbose --non-matching
*** t0021-conversion.sh ***
ok 90 - non-existent file at top-level not ignored
ok 91 - non-existent file at top-level not ignored with -q
ok 92 - non-existent file at top-level not ignored with --quiet
ok 93 - non-existent file at top-level not ignored with -v
ok 94 - non-existent file at top-level not ignored with -v -n
ok 30 - --run invalid range end
ok 95 - non-existent file at top-level not ignored with -v --non-matching
ok 96 - non-existent file at top-level not ignored with --verbose
ok 97 - non-existent file at top-level not ignored with --verbose -n
ok 1 - setup
ok 98 - non-existent file at top-level not ignored with --verbose --non-matching
ok 2 - check
ok 99 - non-existent file at top-level not ignored with --no-index
ok 31 - --run invalid selector
ok 32 - test runs if prerequisite is satisfied
ok 33 # skip unmet prerequisite causes test to be skipped (missing DONTHAVEIT)
ok 34 - test runs if prerequisites are satisfied
ok 100 - non-existent file at top-level not ignored with --no-index -q
ok 35 # skip unmet prerequisites causes test to be skipped (missing DONTHAVEIT of HAVEIT,DONTHAVEIT)
ok 36 # skip unmet prerequisites causes test to be skipped (missing DONTHAVEIT of DONTHAVEIT,HAVEIT)
ok 37 - test runs if lazy prereq is satisfied
ok 101 - non-existent file at top-level not ignored with --no-index --quiet
ok 38 # skip missing lazy prereqs skip tests (missing !LAZY_TRUE)
ok 39 - negative lazy prereqs checked
ok 102 - non-existent file at top-level not ignored with --no-index -v
ok 40 # skip missing negative lazy prereqs will skip (missing LAZY_FALSE)
ok 41 - tests clean up after themselves
ok 103 - non-existent file at top-level not ignored with --no-index -v -n
ok 3 - expanded_in_repo
ok 104 - non-existent file at top-level not ignored with --no-index -v --non-matching
ok 105 - non-existent file at top-level not ignored with --no-index --verbose
ok 10 - Racy GIT trial #4 part B
# passed all 10 test(s)
1..10
ok 106 - non-existent file at top-level not ignored with --no-index --verbose -n
*** t0022-crlf-rename.sh ***
ok 107 - non-existent file at top-level not ignored with --no-index --verbose --non-matching
ok 108 - non-existent file at top-level ignored
ok 42 - tests clean up even on failures
ok 43 - git update-index without --add should fail adding
ok 44 - git update-index with --add should succeed
ok 109 - non-existent file at top-level ignored with -q
ok 45 - writing tree out with git write-tree
ok 46 - validate object ID of a known tree
ok 4 - filter shell-escaped filenames
ok 47 - git update-index without --remove should fail removing
ok 110 - non-existent file at top-level ignored with --quiet
ok 48 - git update-index with --remove should be able to remove
ok 49 - git write-tree should be able to write an empty tree
ok 50 - validate object ID of a known tree
ok 111 - non-existent file at top-level ignored with -v
ok 1 - setup
ok 112 - non-existent file at top-level ignored with -v -n
ok 2 - diff -M
ok 113 - non-existent file at top-level ignored with -v --non-matching
# passed all 2 test(s)
1..2
ok 5 - required filter should filter data
ok 114 - non-existent file at top-level ignored with --verbose
*** t0023-crlf-am.sh ***
ok 115 - non-existent file at top-level ignored with --verbose -n
ok 51 - adding various types of objects with git update-index --add
ok 116 - non-existent file at top-level ignored with --verbose --non-matching
ok 52 - showing stage with git ls-files --stage
ok 53 - validate git ls-files output for a known tree
ok 6 - required filter smudge failure
ok 54 - writing tree out with git write-tree
ok 55 - validate object ID for a known tree
ok 117 - non-existent file at top-level ignored with --no-index
ok 56 - showing tree with git ls-tree
ok 57 - git ls-tree output for a known tree
ok 58 - showing tree with git ls-tree -r
ok 118 - non-existent file at top-level ignored with --no-index -q
ok 7 - required filter clean failure
ok 59 - git ls-tree -r output for a known tree
ok 1 - setup
ok 60 - showing tree with git ls-tree -r -t
ok 119 - non-existent file at top-level ignored with --no-index --quiet
ok 61 - git ls-tree -r output for a known tree
ok 62 - writing partial tree out with git write-tree --prefix
ok 63 - validate object ID for a known tree
ok 120 - non-existent file at top-level ignored with --no-index -v
ok 64 - writing partial tree out with git write-tree --prefix
ok 65 - validate object ID for a known tree
ok 121 - non-existent file at top-level ignored with --no-index -v -n
ok 66 - put invalid objects into the index
ok 2 - am
# passed all 2 test(s)
1..2
ok 67 - writing this tree without --missing-ok
ok 122 - non-existent file at top-level ignored with --no-index -v --non-matching
ok 68 - writing this tree with --missing-ok
*** t0024-crlf-archive.sh ***
ok 123 - non-existent file at top-level ignored with --no-index --verbose
ok 69 - git read-tree followed by write-tree should be idempotent
ok 124 - non-existent file at top-level ignored with --no-index --verbose -n
ok 70 - validate git diff-files output for a know cache/work tree state
ok 125 - non-existent file at top-level ignored with --no-index --verbose --non-matching
ok 71 - git update-index --refresh should succeed
ok 72 - no diff after checkout and git update-index --refresh
ok 126 - existing untracked file at top-level not ignored
ok 73 - git commit-tree records the correct tree in a commit
ok 127 - existing untracked file at top-level not ignored with -q
ok 1 - setup
ok 128 - existing untracked file at top-level not ignored with --quiet
ok 74 - git commit-tree records the correct parent in a commit
ok 2 - tar archive
ok 129 - existing untracked file at top-level not ignored with -v
ok 75 - git commit-tree omits duplicated parent in a commit
ok 130 - existing untracked file at top-level not ignored with -v -n
ok 3 - zip archive
ok 131 - existing untracked file at top-level not ignored with -v --non-matching
# passed all 3 test(s)
1..3
ok 76 - update-index D/F conflict
ok 132 - existing untracked file at top-level not ignored with --verbose
*** t0025-crlf-auto.sh ***
ok 133 - existing untracked file at top-level not ignored with --verbose -n
ok 77 - very long name in the index handled sanely
# passed all 77 test(s)
1..77
ok 134 - existing untracked file at top-level not ignored with --verbose --non-matching
ok 135 - existing untracked file at top-level not ignored with --no-index
ok 136 - existing untracked file at top-level not ignored with --no-index -q
ok 137 - existing untracked file at top-level not ignored with --no-index --quiet
ok 138 - existing untracked file at top-level not ignored with --no-index -v
ok 139 - existing untracked file at top-level not ignored with --no-index -v -n
ok 1 - setup
*** t0026-eol-config.sh ***
ok 140 - existing untracked file at top-level not ignored with --no-index -v --non-matching
ok 141 - existing untracked file at top-level not ignored with --no-index --verbose
ok 142 - existing untracked file at top-level not ignored with --no-index --verbose -n
ok 2 - default settings cause no changes
ok 143 - existing untracked file at top-level not ignored with --no-index --verbose --non-matching
not ok 3 - crlf=true causes a CRLF file to be normalized
#
#
# # Backwards compatibility check
# rm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&
# echo "CRLFonly crlf" > .gitattributes &&
# git read-tree --reset -u HEAD &&
#
# # Note, "normalized" means that git will normalize it if added
# has_cr CRLFonly &&
# CRLFonlydiff=$(git diff CRLFonly) &&
# test -n "$CRLFonlydiff"
#
ok 144 - existing tracked file at top-level not ignored
ok 145 - existing tracked file at top-level not ignored with -q
ok 4 - text=true causes a CRLF file to be normalized
ok 1 - setup
ok 146 - existing tracked file at top-level not ignored with --quiet
ok 147 - existing tracked file at top-level not ignored with -v
ok 5 - eol=crlf gives a normalized file CRLFs with autocrlf=false
ok 148 - existing tracked file at top-level not ignored with -v -n
ok 149 - existing tracked file at top-level not ignored with -v --non-matching
ok 2 - eol=lf puts LFs in normalized file
ok 6 - eol=crlf gives a normalized file CRLFs with autocrlf=input
ok 150 - existing tracked file at top-level not ignored with --verbose
ok 151 - existing tracked file at top-level not ignored with --verbose -n
ok 7 - eol=lf gives a normalized file LFs with autocrlf=true
ok 3 - eol=crlf puts CRLFs in normalized file
ok 152 - existing tracked file at top-level not ignored with --verbose --non-matching
ok 153 - existing tracked file at top-level shown as ignored with --no-index
ok 8 - autocrlf=true does not normalize CRLF files
ok 4 - autocrlf=true overrides eol=lf
ok 154 - existing tracked file at top-level shown as ignored with --no-index -q
ok 155 - existing tracked file at top-level shown as ignored with --no-index --quiet
ok 156 - existing tracked file at top-level shown as ignored with --no-index -v
ok 9 - text=auto, autocrlf=true _does_ normalize CRLF files
ok 5 - autocrlf=true overrides unset eol
ok 6 # skip eol native is crlf (missing NATIVE_CRLF)
ok 157 - existing tracked file at top-level shown as ignored with --no-index -v -n
# passed all 6 test(s)
1..6
ok 158 - existing tracked file at top-level shown as ignored with --no-index -v --non-matching
ok 10 - text=auto, autocrlf=true does not normalize binary files
*** t0027-auto-crlf.sh ***
ok 159 - existing tracked file at top-level shown as ignored with --no-index --verbose
ok 11 - eol=crlf _does_ normalize binary files
# failed 1 among 11 test(s)
1..11
make[3]: *** [t0025-crlf-auto.sh] Error 1
make[3]: *** Waiting for unfinished jobs....
Makefile:44: recipe for target 't0025-crlf-auto.sh' failed
ok 160 - existing tracked file at top-level shown as ignored with --no-index --verbose -n
ok 161 - existing tracked file at top-level shown as ignored with --no-index --verbose --non-matching
1..0 # SKIP EXPENSIVE not set
ok 162 - existing untracked file at top-level ignored
ok 8 - filtering large input to small output should use little memory
ok 163 - existing untracked file at top-level ignored with -q
ok 164 - existing untracked file at top-level ignored with --quiet
ok 165 - existing untracked file at top-level ignored with -v
ok 9 - filter that does not read is fine
ok 10 # skip filter large file (missing EXPENSIVE)
ok 166 - existing untracked file at top-level ignored with -v -n
ok 167 - existing untracked file at top-level ignored with -v --non-matching
ok 168 - existing untracked file at top-level ignored with --verbose
ok 11 - filter: clean empty file
ok 169 - existing untracked file at top-level ignored with --verbose -n
ok 170 - existing untracked file at top-level ignored with --verbose --non-matching
ok 12 - filter: smudge empty file
# passed all 12 test(s)
1..12
ok 171 - existing untracked file at top-level ignored with --no-index
ok 172 - existing untracked file at top-level ignored with --no-index -q
ok 173 - existing untracked file at top-level ignored with --no-index --quiet
ok 174 - existing untracked file at top-level ignored with --no-index -v
ok 175 - existing untracked file at top-level ignored with --no-index -v -n
ok 176 - existing untracked file at top-level ignored with --no-index -v --non-matching
ok 177 - existing untracked file at top-level ignored with --no-index --verbose
ok 178 - existing untracked file at top-level ignored with --no-index --verbose -n
ok 179 - existing untracked file at top-level ignored with --no-index --verbose --non-matching
ok 180 - mix of file types at top-level
ok 181 - mix of file types at top-level with -v
ok 182 - mix of file types at top-level with -v -n
ok 183 - mix of file types at top-level with -v --non-matching
ok 184 - mix of file types at top-level with --verbose
ok 185 - mix of file types at top-level with --verbose -n
ok 186 - mix of file types at top-level with --verbose --non-matching
ok 187 - mix of file types at top-level with --no-index
ok 188 - mix of file types at top-level with --no-index -v
ok 189 - mix of file types at top-level with --no-index -v -n
ok 190 - mix of file types at top-level with --no-index -v --non-matching
ok 191 - mix of file types at top-level with --no-index --verbose
ok 192 - mix of file types at top-level with --no-index --verbose -n
ok 193 - mix of file types at top-level with --no-index --verbose --non-matching
ok 194 - non-existent file in subdir a/ not ignored
ok 195 - non-existent file in subdir a/ not ignored with -q
ok 196 - non-existent file in subdir a/ not ignored with --quiet
ok 197 - non-existent file in subdir a/ not ignored with -v
ok 198 - non-existent file in subdir a/ not ignored with -v -n
ok 199 - non-existent file in subdir a/ not ignored with -v --non-matching
ok 200 - non-existent file in subdir a/ not ignored with --verbose
ok 201 - non-existent file in subdir a/ not ignored with --verbose -n
ok 202 - non-existent file in subdir a/ not ignored with --verbose --non-matching
ok 203 - non-existent file in subdir a/ not ignored with --no-index
ok 204 - non-existent file in subdir a/ not ignored with --no-index -q
ok 205 - non-existent file in subdir a/ not ignored with --no-index --quiet
ok 206 - non-existent file in subdir a/ not ignored with --no-index -v
ok 207 - non-existent file in subdir a/ not ignored with --no-index -v -n
ok 208 - non-existent file in subdir a/ not ignored with --no-index -v --non-matching
ok 209 - non-existent file in subdir a/ not ignored with --no-index --verbose
ok 210 - non-existent file in subdir a/ not ignored with --no-index --verbose -n
ok 211 - non-existent file in subdir a/ not ignored with --no-index --verbose --non-matching
ok 212 - non-existent file in subdir a/ ignored
ok 213 - non-existent file in subdir a/ ignored with -q
ok 214 - non-existent file in subdir a/ ignored with --quiet
ok 215 - non-existent file in subdir a/ ignored with -v
ok 216 - non-existent file in subdir a/ ignored with -v -n
ok 217 - non-existent file in subdir a/ ignored with -v --non-matching
ok 218 - non-existent file in subdir a/ ignored with --verbose
ok 219 - non-existent file in subdir a/ ignored with --verbose -n
ok 220 - non-existent file in subdir a/ ignored with --verbose --non-matching
ok 221 - non-existent file in subdir a/ ignored with --no-index
ok 222 - non-existent file in subdir a/ ignored with --no-index -q
ok 223 - non-existent file in subdir a/ ignored with --no-index --quiet
ok 224 - non-existent file in subdir a/ ignored with --no-index -v
ok 225 - non-existent file in subdir a/ ignored with --no-index -v -n
ok 226 - non-existent file in subdir a/ ignored with --no-index -v --non-matching
ok 227 - non-existent file in subdir a/ ignored with --no-index --verbose
ok 228 - non-existent file in subdir a/ ignored with --no-index --verbose -n
ok 229 - non-existent file in subdir a/ ignored with --no-index --verbose --non-matching
ok 230 - existing untracked file in subdir a/ not ignored
ok 231 - existing untracked file in subdir a/ not ignored with -q
ok 232 - existing untracked file in subdir a/ not ignored with --quiet
ok 233 - existing untracked file in subdir a/ not ignored with -v
ok 234 - existing untracked file in subdir a/ not ignored with -v -n
ok 235 - existing untracked file in subdir a/ not ignored with -v --non-matching
ok 236 - existing untracked file in subdir a/ not ignored with --verbose
ok 237 - existing untracked file in subdir a/ not ignored with --verbose -n
ok 238 - existing untracked file in subdir a/ not ignored with --verbose --non-matching
ok 239 - existing untracked file in subdir a/ not ignored with --no-index
ok 240 - existing untracked file in subdir a/ not ignored with --no-index -q
ok 241 - existing untracked file in subdir a/ not ignored with --no-index --quiet
ok 242 - existing untracked file in subdir a/ not ignored with --no-index -v
ok 243 - existing untracked file in subdir a/ not ignored with --no-index -v -n
ok 244 - existing untracked file in subdir a/ not ignored with --no-index -v --non-matching
ok 245 - existing untracked file in subdir a/ not ignored with --no-index --verbose
ok 246 - existing untracked file in subdir a/ not ignored with --no-index --verbose -n
ok 247 - existing untracked file in subdir a/ not ignored with --no-index --verbose --non-matching
ok 248 - existing tracked file in subdir a/ not ignored
ok 249 - existing tracked file in subdir a/ not ignored with -q
ok 250 - existing tracked file in subdir a/ not ignored with --quiet
ok 251 - existing tracked file in subdir a/ not ignored with -v
ok 252 - existing tracked file in subdir a/ not ignored with -v -n
ok 253 - existing tracked file in subdir a/ not ignored with -v --non-matching
ok 254 - existing tracked file in subdir a/ not ignored with --verbose
ok 255 - existing tracked file in subdir a/ not ignored with --verbose -n
ok 256 - existing tracked file in subdir a/ not ignored with --verbose --non-matching
ok 257 - existing tracked file in subdir a/ shown as ignored with --no-index
ok 258 - existing tracked file in subdir a/ shown as ignored with --no-index -q
ok 259 - existing tracked file in subdir a/ shown as ignored with --no-index --quiet
ok 260 - existing tracked file in subdir a/ shown as ignored with --no-index -v
ok 261 - existing tracked file in subdir a/ shown as ignored with --no-index -v -n
ok 262 - existing tracked file in subdir a/ shown as ignored with --no-index -v --non-matching
ok 263 - existing tracked file in subdir a/ shown as ignored with --no-index --verbose
ok 264 - existing tracked file in subdir a/ shown as ignored with --no-index --verbose -n
ok 265 - existing tracked file in subdir a/ shown as ignored with --no-index --verbose --non-matching
ok 266 - existing untracked file in subdir a/ ignored
ok 267 - existing untracked file in subdir a/ ignored with -q
ok 268 - existing untracked file in subdir a/ ignored with --quiet
ok 269 - existing untracked file in subdir a/ ignored with -v
ok 270 - existing untracked file in subdir a/ ignored with -v -n
ok 271 - existing untracked file in subdir a/ ignored with -v --non-matching
ok 272 - existing untracked file in subdir a/ ignored with --verbose
ok 273 - existing untracked file in subdir a/ ignored with --verbose -n
ok 274 - existing untracked file in subdir a/ ignored with --verbose --non-matching
ok 275 - existing untracked file in subdir a/ ignored with --no-index
ok 276 - existing untracked file in subdir a/ ignored with --no-index -q
ok 277 - existing untracked file in subdir a/ ignored with --no-index --quiet
ok 278 - existing untracked file in subdir a/ ignored with --no-index -v
ok 279 - existing untracked file in subdir a/ ignored with --no-index -v -n
ok 280 - existing untracked file in subdir a/ ignored with --no-index -v --non-matching
ok 281 - existing untracked file in subdir a/ ignored with --no-index --verbose
ok 282 - existing untracked file in subdir a/ ignored with --no-index --verbose -n
ok 283 - existing untracked file in subdir a/ ignored with --no-index --verbose --non-matching
ok 284 - mix of file types in subdir a/
ok 285 - mix of file types in subdir a/ with -v
ok 286 - mix of file types in subdir a/ with -v -n
ok 287 - mix of file types in subdir a/ with -v --non-matching
ok 288 - mix of file types in subdir a/ with --verbose
ok 289 - mix of file types in subdir a/ with --verbose -n
ok 290 - mix of file types in subdir a/ with --verbose --non-matching
ok 291 - mix of file types in subdir a/ with --no-index
ok 292 - mix of file types in subdir a/ with --no-index -v
ok 293 - mix of file types in subdir a/ with --no-index -v -n
ok 294 - mix of file types in subdir a/ with --no-index -v --non-matching
ok 295 - mix of file types in subdir a/ with --no-index --verbose
ok 296 - mix of file types in subdir a/ with --no-index --verbose -n
ok 297 - mix of file types in subdir a/ with --no-index --verbose --non-matching
ok 298 - sub-directory local ignore
ok 299 - sub-directory local ignore with --verbose
ok 300 - local ignore inside a sub-directory
ok 301 - local ignore inside a sub-directory with --verbose
ok 302 - nested include
ok 303 - nested include with -q
ok 304 - nested include with --quiet
ok 305 - nested include with -v
ok 306 - nested include with -v -n
ok 307 - nested include with -v --non-matching
ok 308 - nested include with --verbose
ok 309 - nested include with --verbose -n
ok 310 - nested include with --verbose --non-matching
ok 311 - ignored sub-directory
ok 312 - ignored sub-directory with -q
ok 313 - ignored sub-directory with --quiet
ok 314 - ignored sub-directory with -v
ok 315 - ignored sub-directory with -v -n
ok 316 - ignored sub-directory with -v --non-matching
ok 317 - ignored sub-directory with --verbose
ok 318 - ignored sub-directory with --verbose -n
ok 319 - ignored sub-directory with --verbose --non-matching
ok 320 - multiple files inside ignored sub-directory
ok 321 - multiple files inside ignored sub-directory with -v
ok 322 - cd to ignored sub-directory
ok 323 - cd to ignored sub-directory with -v
ok 324 - symlink
ok 325 - symlink with -q
ok 326 - symlink with --quiet
ok 327 - symlink with -v
ok 328 - symlink with -v -n
ok 329 - symlink with -v --non-matching
ok 330 - symlink with --verbose
ok 331 - symlink with --verbose -n
ok 332 - symlink with --verbose --non-matching
ok 333 - beyond a symlink
ok 334 - beyond a symlink with -q
ok 335 - beyond a symlink with --quiet
ok 336 - beyond a symlink with -v
ok 337 - beyond a symlink with -v -n
ok 338 - beyond a symlink with -v --non-matching
ok 339 - beyond a symlink with --verbose
ok 340 - beyond a symlink with --verbose -n
ok 341 - beyond a symlink with --verbose --non-matching
ok 342 - beyond a symlink from subdirectory
ok 343 - beyond a symlink from subdirectory with -q
ok 344 - beyond a symlink from subdirectory with --quiet
ok 345 - beyond a symlink from subdirectory with -v
ok 346 - beyond a symlink from subdirectory with -v -n
ok 347 - beyond a symlink from subdirectory with -v --non-matching
ok 348 - beyond a symlink from subdirectory with --verbose
ok 349 - beyond a symlink from subdirectory with --verbose -n
ok 350 - beyond a symlink from subdirectory with --verbose --non-matching
ok 351 - submodule
ok 352 - submodule with -q
ok 353 - submodule with --quiet
ok 354 - submodule with -v
ok 355 - submodule with -v -n
ok 356 - submodule with -v --non-matching
ok 357 - submodule with --verbose
ok 358 - submodule with --verbose -n
ok 359 - submodule with --verbose --non-matching
ok 360 - submodule from subdirectory
ok 361 - submodule from subdirectory with -q
ok 362 - submodule from subdirectory with --quiet
ok 363 - submodule from subdirectory with -v
ok 364 - submodule from subdirectory with -v -n
ok 365 - submodule from subdirectory with -v --non-matching
ok 366 - submodule from subdirectory with --verbose
ok 367 - submodule from subdirectory with --verbose -n
ok 368 - submodule from subdirectory with --verbose --non-matching
ok 369 - global ignore not yet enabled
ok 370 - global ignore
ok 371 - global ignore with -v
ok 372 - --stdin
ok 373 - --stdin -q
ok 374 - --stdin -v
ok 375 - --stdin -z
ok 376 - --stdin -z -q
ok 377 - --stdin -z -v
ok 378 - -z --stdin
ok 379 - -z --stdin -q
ok 380 - -z --stdin -v
ok 381 - --stdin from subdirectory
ok 382 - --stdin from subdirectory with -v
ok 383 - --stdin from subdirectory with -v -n
ok 384 - --stdin -z from subdirectory
ok 385 - --stdin -z from subdirectory with -v
ok 386 - -z --stdin from subdirectory
ok 387 - -z --stdin from subdirectory with -v
ok 388 - streaming support for --stdin
ok 389 - trailing whitespace is ignored
ok 390 - quoting allows trailing whitespace
ok 391 - correct handling of backslashes
ok 392 - info/exclude trumps core.excludesfile
# passed all 392 test(s)
1..392
make[3]: Leaving directory '/«PKGBUILDDIR»/t'
make[2]: *** [test] Error 2
Makefile:37: recipe for target 'test' failed
make[2]: Leaving directory '/«PKGBUILDDIR»/t'
make[1]: *** [test] Error 2
Makefile:2222: recipe for target 'test' failed
make[1]: Leaving directory '/«PKGBUILDDIR»'
make[1]: Entering directory '/«PKGBUILDDIR»'
GEN git-add--interactive
GEN git-difftool
GEN git-archimport
GEN git-cvsexportcommit
GEN git-cvsimport
GEN git-cvsserver
GEN git-relink
GEN git-send-email
GEN git-svn
GEN git-p4
make[2]: Entering directory '/«PKGBUILDDIR»/git-gui'
make[2]: Leaving directory '/«PKGBUILDDIR»/git-gui'
make[2]: Entering directory '/«PKGBUILDDIR»/gitk-git'
make[2]: Leaving directory '/«PKGBUILDDIR»/gitk-git'
make[2]: Entering directory '/«PKGBUILDDIR»/perl'
make[3]: Entering directory '/«PKGBUILDDIR»/perl'
make[3]: Leaving directory '/«PKGBUILDDIR»/perl'
make[2]: Leaving directory '/«PKGBUILDDIR»/perl'
make[2]: Entering directory '/«PKGBUILDDIR»/templates'
make[2]: Leaving directory '/«PKGBUILDDIR»/templates'
/usr/bin/make -C t/ all
make[2]: Entering directory '/«PKGBUILDDIR»/t'
rm -f -r 'test-results'
/usr/bin/make aggregate-results-and-cleanup
make[3]: Entering directory '/«PKGBUILDDIR»/t'
*** t0000-basic.sh ***
*** t0001-init.sh ***
*** t0002-gitfile.sh ***
*** t0003-attributes.sh ***
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0000-basic/.git/
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/.git/
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0003-attributes/.git/
expecting success:
git init plain &&
check_config plain/.git false unset
expecting success:
find .git/objects -type f -print >should-be-empty &&
test_line_count = 0 should-be-empty
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0002-gitfile/.git/
expecting success:
mkdir -p a/b/d a/c b &&
(
echo "[attr]notest !test"
echo "f test=f"
echo "a/i test=a/i"
echo "onoff test -test"
echo "offon -test test"
echo "no notest"
echo "A/e/F test=A/e/F"
) >.gitattributes &&
(
echo "g test=a/g" &&
echo "b/g test=a/b/g"
) >a/.gitattributes &&
(
echo "h test=a/b/h" &&
echo "d/* test=a/b/d/*"
echo "d/yes notest"
) >a/b/.gitattributes &&
(
echo "global test=global"
) >"$HOME"/global-gitattributes &&
cat <<-EOF >expect-all
f: test: f
a/f: test: f
a/c/f: test: f
a/g: test: a/g
a/b/g: test: a/b/g
b/g: test: unspecified
a/b/h: test: a/b/h
a/b/d/g: test: a/b/d/*
onoff: test: unset
offon: test: set
no: notest: set
no: test: unspecified
a/b/d/no: notest: set
a/b/d/no: test: a/b/d/*
a/b/d/yes: notest: set
a/b/d/yes: test: unspecified
EOF
expecting success:
REAL="$(pwd)/.real" &&
mv .git "$REAL"
ok 1 - .git/objects should be empty after git init in an empty repo
expecting success:
find .git/objects -type d -print >full-of-directories &&
test_line_count = 3 full-of-directories
ok 1 - initial setup
expecting success:
echo "gitdir $REAL" >.git &&
if git rev-parse 2>.err
then
echo "git rev-parse accepted an invalid .git file"
false
fi &&
if ! grep "Invalid gitfile format" .err
then
echo "git rev-parse returned wrong error"
false
fi
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/plain/.git/
ok 1 - setup
expecting success:
test_must_fail git check-attr &&
test_must_fail git check-attr -- &&
test_must_fail git check-attr test &&
test_must_fail git check-attr test -- &&
test_must_fail git check-attr -- f &&
echo "f" | test_must_fail git check-attr --stdin &&
echo "f" | test_must_fail git check-attr --stdin -- f &&
echo "f" | test_must_fail git check-attr --stdin test -- f &&
test_must_fail git check-attr "" -- f
ok 2 - .git/objects should have 3 subdirectories
expecting success:
:
ok 3 - success is reported like this
expecting success:
run_sub_test_lib_test full-pass '3 passing tests' <<-\EOF &&
for i in 1 2 3
do
test_expect_success "passing test #$i" 'true'
done
test_done
EOF
check_sub_test_lib_test full-pass <<-\EOF
> ok 1 - passing test #1
> ok 2 - passing test #2
> ok 3 - passing test #3
> # passed all 3 test(s)
> 1..3
EOF
fatal: Invalid gitfile format: .git
ok 2 - bad setup: invalid .git file format
expecting success:
echo "gitdir: $REAL.not" >.git &&
if git rev-parse 2>.err
then
echo "git rev-parse accepted an invalid .git file path"
false
fi &&
if ! grep "Not a git repository" .err
then
echo "git rev-parse returned wrong error"
false
fi
error: No attribute specified
usage: git check-attr [-a | --all | <attr>...] [--] <pathname>...
or: git check-attr --stdin [-z] [-a | --all | <attr>...]
-a, --all report all attributes set on file
--cached use .gitattributes only from the index
--stdin read file names from stdin
-z terminate input and output records by a NUL character
ok 1 - plain
expecting success:
(
git init --bare bare-ancestor.git &&
cd bare-ancestor.git &&
mkdir plain-nested &&
cd plain-nested &&
git init
) &&
check_config bare-ancestor.git/plain-nested/.git false unset
error: No attribute specified
fatal: Not a git repository: /«PKGBUILDDIR»/t/trash directory.t0002-gitfile/.real.not
usage: git check-attr [-a | --all | <attr>...] [--] <pathname>...
or: git check-attr --stdin [-z] [-a | --all | <attr>...]
-a, --all report all attributes set on file
--cached use .gitattributes only from the index
--stdin read file names from stdin
-z terminate input and output records by a NUL character
ok 3 - bad setup: invalid .git file path
expecting success:
echo "gitdir: $REAL" >.git &&
test "$REAL" = "$(git rev-parse --git-dir)"
error: No file specified
usage: git check-attr [-a | --all | <attr>...] [--] <pathname>...
or: git check-attr --stdin [-z] [-a | --all | <attr>...]
-a, --all report all attributes set on file
--cached use .gitattributes only from the index
--stdin read file names from stdin
-z terminate input and output records by a NUL character
ok 4 - final setup + check rev-parse --git-dir
expecting success:
echo "foo" >bar &&
SHA=$(cat bar | git hash-object -w --stdin) &&
objck $SHA
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/bare-ancestor.git/
error: No file specified
usage: git check-attr [-a | --all | <attr>...] [--] <pathname>...
or: git check-attr --stdin [-z] [-a | --all | <attr>...]
-a, --all report all attributes set on file
--cached use .gitattributes only from the index
--stdin read file names from stdin
-z terminate input and output records by a NUL character
error: No attribute specified
usage: git check-attr [-a | --all | <attr>...] [--] <pathname>...
or: git check-attr --stdin [-z] [-a | --all | <attr>...]
-a, --all report all attributes set on file
--cached use .gitattributes only from the index
--stdin read file names from stdin
-z terminate input and output records by a NUL character
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/bare-ancestor.git/plain-nested/.git/
ok 5 - check hash-object
expecting success:
git cat-file blob $SHA >actual &&
test_cmp bar actual
error: No attribute specified
usage: git check-attr [-a | --all | <attr>...] [--] <pathname>...
or: git check-attr --stdin [-z] [-a | --all | <attr>...]
-a, --all report all attributes set on file
--cached use .gitattributes only from the index
--stdin read file names from stdin
-z terminate input and output records by a NUL character
error: No attribute specified
usage: git check-attr [-a | --all | <attr>...] [--] <pathname>...
or: git check-attr --stdin [-z] [-a | --all | <attr>...]
-a, --all report all attributes set on file
--cached use .gitattributes only from the index
--stdin read file names from stdin
-z terminate input and output records by a NUL character
ok 2 - plain nested in bare
expecting success:
(
HOME=$(pwd)/alias-config &&
export HOME &&
mkdir alias-config &&
echo "[alias] aliasedinit = init" >alias-config/.gitconfig &&
GIT_CEILING_DIRECTORIES=$(pwd) &&
export GIT_CEILING_DIRECTORIES &&
mkdir plain-aliased &&
cd plain-aliased &&
git aliasedinit
) &&
check_config plain-aliased/.git false unset
ok 6 - check cat-file
expecting success:
if test -f "$REAL/index"
then
echo "Hmm, $REAL/index exists?"
false
fi &&
rm -f "$REAL/objects/$(objpath $SHA)" &&
git update-index --add bar &&
if ! test -f "$REAL/index"
then
echo "$REAL/index not found"
false
fi &&
objck $SHA
error: Can't specify files with --stdin
usage: git check-attr [-a | --all | <attr>...] [--] <pathname>...
or: git check-attr --stdin [-z] [-a | --all | <attr>...]
-a, --all report all attributes set on file
--cached use .gitattributes only from the index
--stdin read file names from stdin
-z terminate input and output records by a NUL character
error: : not a valid attribute name
ok 2 - command line checks
expecting success:
attr_check f f &&
attr_check a/f f &&
attr_check a/c/f f &&
attr_check a/g a/g &&
attr_check a/b/g a/b/g &&
attr_check b/g unspecified &&
attr_check a/b/h a/b/h &&
attr_check a/b/d/g "a/b/d/*" &&
attr_check onoff unset &&
attr_check offon set &&
attr_check no unspecified &&
attr_check a/b/d/no "a/b/d/*" &&
attr_check a/b/d/yes unspecified
ok 7 - check update-index
expecting success:
SHA=$(git write-tree) &&
objck $SHA
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/plain-aliased/.git/
ok 8 - check write-tree
expecting success:
SHA=$(echo "commit bar" | git commit-tree $SHA) &&
objck $SHA
ok 3 - plain through aliased command, outside any git repo
expecting success:
(
git init plain-ancestor-aliased &&
cd plain-ancestor-aliased &&
echo "[alias] aliasedinit = init" >>.git/config &&
mkdir plain-nested &&
cd plain-nested &&
git aliasedinit
) &&
check_config plain-ancestor-aliased/plain-nested/.git false unset
ok 4 - pretend we have a fully passing test suite
expecting success:
test_must_fail run_sub_test_lib_test partial-pass '2/3 tests passing' <<-\EOF &&
test_expect_success 'passing test #1' 'true'
test_expect_success 'failing test #2' 'false'
test_expect_success 'passing test #3' 'true'
test_done
EOF
check_sub_test_lib_test partial-pass <<-\EOF
> ok 1 - passing test #1
> not ok 2 - failing test #2
# false
> ok 3 - passing test #3
> # failed 1 among 3 test(s)
> 1..3
EOF
ok 9 - check commit-tree
expecting success:
echo $SHA >"$REAL/HEAD" &&
test "$SHA" = "$(git rev-list HEAD)"
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/plain-ancestor-aliased/.git/
ok 10 - check rev-list
expecting success:
git init sgd &&
(
cd sgd &&
git config alias.lsfi ls-files &&
mv .git .realgit &&
echo "gitdir: .realgit" >.git &&
mkdir subdir &&
cd subdir &&
>foo &&
git add foo &&
git lsfi >actual &&
echo foo >expected &&
test_cmp expected actual
)
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0002-gitfile/sgd/.git/
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/plain-ancestor-aliased/plain-nested/.git/
ok 4 - plain nested through aliased command
expecting success:
(
git init --bare bare-ancestor-aliased.git &&
cd bare-ancestor-aliased.git &&
echo "[alias] aliasedinit = init" >>config &&
mkdir plain-nested &&
cd plain-nested &&
git aliasedinit
) &&
check_config bare-ancestor-aliased.git/plain-nested/.git false unset
ok 11 - setup_git_dir twice in subdir
expecting success:
test_create_repo enter_repo &&
(
cd enter_repo &&
test_tick &&
test_commit foo &&
mv .git .realgit &&
echo "gitdir: .realgit" >.git
) &&
git ls-remote enter_repo >actual &&
cat >expected <<-\EOF &&
946e985ab20de757ca5b872b16d64e92ff3803a9 HEAD
946e985ab20de757ca5b872b16d64e92ff3803a9 refs/heads/master
946e985ab20de757ca5b872b16d64e92ff3803a9 refs/tags/foo
EOF
test_cmp expected actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/bare-ancestor-aliased.git/
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0002-gitfile/enter_repo/.git/
ok 5 - pretend we have a partially passing test suite
expecting success:
run_sub_test_lib_test failing-todo 'A failing TODO test' <<-\EOF &&
test_expect_success 'passing test' 'true'
test_expect_failure 'pretend we have a known breakage' 'false'
test_done
EOF
check_sub_test_lib_test failing-todo <<-\EOF
> ok 1 - passing test
> not ok 2 - pretend we have a known breakage # TODO known breakage
> # still have 1 known breakage(s)
> # passed all remaining 1 test(s)
> 1..2
EOF
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/bare-ancestor-aliased.git/plain-nested/.git/
ok 5 - plain nested in bare through aliased command
expecting success:
mkdir plain-wt &&
test_must_fail env GIT_WORK_TREE="$(pwd)/plain-wt" git init plain-wt
[master (root-commit) 946e985] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
fatal: GIT_WORK_TREE (or --work-tree=<directory>) not allowed without specifying GIT_DIR (or --git-dir=<directory>)
ok 6 - plain with GIT_WORK_TREE
expecting success:
git --bare init plain-bare-1 &&
check_config plain-bare-1 true unset
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/plain-bare-1/
ok 3 - attribute test
expecting success:
test_must_fail attr_check F f "-c core.ignorecase=0" &&
test_must_fail attr_check a/F f "-c core.ignorecase=0" &&
test_must_fail attr_check a/c/F f "-c core.ignorecase=0" &&
test_must_fail attr_check a/G a/g "-c core.ignorecase=0" &&
test_must_fail attr_check a/B/g a/b/g "-c core.ignorecase=0" &&
test_must_fail attr_check a/b/G a/b/g "-c core.ignorecase=0" &&
test_must_fail attr_check a/b/H a/b/h "-c core.ignorecase=0" &&
test_must_fail attr_check a/b/D/g "a/b/d/*" "-c core.ignorecase=0" &&
test_must_fail attr_check oNoFf unset "-c core.ignorecase=0" &&
test_must_fail attr_check oFfOn set "-c core.ignorecase=0" &&
attr_check NO unspecified "-c core.ignorecase=0" &&
test_must_fail attr_check a/b/D/NO "a/b/d/*" "-c core.ignorecase=0" &&
attr_check a/b/d/YES a/b/d/* "-c core.ignorecase=0" &&
test_must_fail attr_check a/E/f "A/e/F" "-c core.ignorecase=0"
ok 7 - plain bare
expecting success:
mkdir plain-bare-2 &&
test_must_fail \
env GIT_WORK_TREE="$(pwd)/plain-bare-2" \
git --bare init plain-bare-2
ok 12 - enter_repo non-strict mode
expecting success:
(
cd enter_repo &&
git worktree add ../foo refs/tags/foo
) &&
git ls-remote foo >actual &&
cat >expected <<-\EOF &&
946e985ab20de757ca5b872b16d64e92ff3803a9 HEAD
946e985ab20de757ca5b872b16d64e92ff3803a9 refs/heads/master
946e985ab20de757ca5b872b16d64e92ff3803a9 refs/tags/foo
EOF
test_cmp expected actual
--- expect 2015-12-16 10:48:12.957564762 +0000
+++ actual 2015-12-16 10:48:12.957564762 +0000
@@ -1 +1 @@
-F: test: f
+F: test: unspecified
Preparing ../foo (identifier foo)
--- expect 2015-12-16 10:48:12.993564762 +0000
+++ actual 2015-12-16 10:48:12.989564762 +0000
@@ -1 +1 @@
-a/F: test: f
+a/F: test: unspecified
fatal: GIT_WORK_TREE (or --work-tree=<directory>) not allowed without specifying GIT_DIR (or --git-dir=<directory>)
ok 8 - plain bare with GIT_WORK_TREE
expecting success:
mkdir git-dir-bare.git &&
GIT_DIR=git-dir-bare.git git init &&
check_config git-dir-bare.git true unset
--- expect 2015-12-16 10:48:13.025564762 +0000
+++ actual 2015-12-16 10:48:13.021564762 +0000
@@ -1 +1 @@
-a/c/F: test: f
+a/c/F: test: unspecified
HEAD is now at 946e985 foo
--- expect 2015-12-16 10:48:13.049564762 +0000
+++ actual 2015-12-16 10:48:13.049564762 +0000
@@ -1 +1 @@
-a/G: test: a/g
+a/G: test: unspecified
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/git-dir-bare.git/
ok 6 - pretend we have a known breakage
expecting success:
run_sub_test_lib_test passing-todo 'A passing TODO test' <<-\EOF &&
test_expect_failure 'pretend we have fixed a known breakage' 'true'
test_done
EOF
check_sub_test_lib_test passing-todo <<-\EOF
> ok 1 - pretend we have fixed a known breakage # TODO known breakage vanished
> # 1 known breakage(s) vanished; please update test(s)
> 1..1
EOF
--- expect 2015-12-16 10:48:13.077564762 +0000
+++ actual 2015-12-16 10:48:13.077564762 +0000
@@ -1 +1 @@
-a/B/g: test: a/b/g
+a/B/g: test: a/g
ok 9 - GIT_DIR bare
expecting success:
git init --bare init-bare.git &&
check_config init-bare.git true unset
ok 13 - enter_repo linked checkout
expecting success:
git ls-remote --upload-pack="git upload-pack --strict" foo/.git >actual &&
cat >expected <<-\EOF &&
946e985ab20de757ca5b872b16d64e92ff3803a9 HEAD
946e985ab20de757ca5b872b16d64e92ff3803a9 refs/heads/master
946e985ab20de757ca5b872b16d64e92ff3803a9 refs/tags/foo
EOF
test_cmp expected actual
--- expect 2015-12-16 10:48:13.113564762 +0000
+++ actual 2015-12-16 10:48:13.109564762 +0000
@@ -1 +1 @@
-a/b/G: test: a/b/g
+a/b/G: test: unspecified
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/init-bare.git/
--- expect 2015-12-16 10:48:13.149564762 +0000
+++ actual 2015-12-16 10:48:13.145564762 +0000
@@ -1 +1 @@
-a/b/H: test: a/b/h
+a/b/H: test: unspecified
ok 10 - init --bare
expecting success:
(
mkdir non-bare &&
cd non-bare &&
GIT_DIR=.git git init
) &&
check_config non-bare/.git false unset
ok 14 - enter_repo strict mode
--- expect 2015-12-16 10:48:13.181564762 +0000
+++ actual 2015-12-16 10:48:13.177564762 +0000
@@ -1 +1 @@
-a/b/D/g: test: a/b/d/*
+a/b/D/g: test: a/g
# passed all 14 test(s)
1..14
--- expect 2015-12-16 10:48:13.213564762 +0000
+++ actual 2015-12-16 10:48:13.213564762 +0000
@@ -1 +1 @@
-oNoFf: test: unset
+oNoFf: test: unspecified
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/non-bare/.git/
--- expect 2015-12-16 10:48:13.241564762 +0000
+++ actual 2015-12-16 10:48:13.241564762 +0000
@@ -1 +1 @@
-oFfOn: test: set
+oFfOn: test: unspecified
ok 11 - GIT_DIR non-bare
expecting success:
(
mkdir git-dir-wt-1.git &&
GIT_WORK_TREE=$(pwd) GIT_DIR=git-dir-wt-1.git git init
) &&
check_config git-dir-wt-1.git false "$(pwd)"
*** t0004-unwritable.sh ***
--- expect 2015-12-16 10:48:13.309564762 +0000
+++ actual 2015-12-16 10:48:13.305564762 +0000
@@ -1 +1 @@
-a/b/D/NO: test: a/b/d/*
+a/b/D/NO: test: unspecified
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/git-dir-wt-1.git/
ok 12 - GIT_DIR & GIT_WORK_TREE (1)
expecting success:
mkdir git-dir-wt-2.git &&
test_must_fail env \
GIT_WORK_TREE="$(pwd)" \
GIT_DIR=git-dir-wt-2.git \
git --bare init
ok 7 - pretend we have fixed a known breakage
expecting success:
run_sub_test_lib_test partially-passing-todos '2 TODO tests, one passing' <<-\EOF &&
test_expect_failure 'pretend we have a known breakage' 'false'
test_expect_success 'pretend we have a passing test' 'true'
test_expect_failure 'pretend we have fixed another known breakage' 'true'
test_done
EOF
check_sub_test_lib_test partially-passing-todos <<-\EOF
> not ok 1 - pretend we have a known breakage # TODO known breakage
> ok 2 - pretend we have a passing test
> ok 3 - pretend we have fixed another known breakage # TODO known breakage vanished
> # 1 known breakage(s) vanished; please update test(s)
> # still have 1 known breakage(s)
> # passed all remaining 1 test(s)
> 1..3
EOF
--- expect 2015-12-16 10:48:13.377564762 +0000
+++ actual 2015-12-16 10:48:13.377564762 +0000
@@ -1 +1 @@
-a/E/f: test: A/e/F
+a/E/f: test: f
ok 4 - attribute matching is case sensitive when core.ignorecase=0
expecting success:
attr_check F f "-c core.ignorecase=1" &&
attr_check a/F f "-c core.ignorecase=1" &&
attr_check a/c/F f "-c core.ignorecase=1" &&
attr_check a/G a/g "-c core.ignorecase=1" &&
attr_check a/B/g a/b/g "-c core.ignorecase=1" &&
attr_check a/b/G a/b/g "-c core.ignorecase=1" &&
attr_check a/b/H a/b/h "-c core.ignorecase=1" &&
attr_check a/b/D/g "a/b/d/*" "-c core.ignorecase=1" &&
attr_check oNoFf unset "-c core.ignorecase=1" &&
attr_check oFfOn set "-c core.ignorecase=1" &&
attr_check NO unspecified "-c core.ignorecase=1" &&
attr_check a/b/D/NO "a/b/d/*" "-c core.ignorecase=1" &&
attr_check a/b/d/YES unspecified "-c core.ignorecase=1" &&
attr_check a/E/f "A/e/F" "-c core.ignorecase=1"
fatal: GIT_WORK_TREE (or --work-tree=<directory>) not allowed without specifying GIT_DIR (or --git-dir=<directory>)
ok 13 - GIT_DIR & GIT_WORK_TREE (2)
expecting success:
(
mkdir again &&
cd again &&
git init >out1 2>err1 &&
git init >out2 2>err2
) &&
test_i18ngrep "Initialized empty" again/out1 &&
test_i18ngrep "Reinitialized existing" again/out2 &&
>again/empty &&
test_i18ncmp again/empty again/err1 &&
test_i18ncmp again/empty again/err2
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0004-unwritable/.git/
expecting success:
>file &&
git add file &&
test_tick &&
git commit -m initial &&
echo >file &&
git add file
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/again/.git/
Reinitialized existing Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/again/.git/
ok 14 - reinit
expecting success:
mkdir template-source &&
echo content >template-source/file &&
git init --template=../template-source template-custom &&
test_cmp template-source/file template-custom/.git/file
[master (root-commit) 1bd44cb] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/template-custom/.git/
ok 15 - init with --template
ok 1 - setup
expecting success:
git init template-plain &&
test_path_is_file template-plain/.git/info/exclude &&
git init --template= template-blank &&
test_path_is_missing template-blank/.git/info/exclude
checking prerequisite: SANITY
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
mkdir SANETESTD.1 SANETESTD.2 &&
chmod +w SANETESTD.1 SANETESTD.2 &&
>SANETESTD.1/x 2>SANETESTD.2/x &&
chmod -w SANETESTD.1 &&
chmod -rx SANETESTD.2 ||
error "bug in test sript: cannot prepare SANETESTD"
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
error "bug in test sript: cannot clean SANETESTD"
return $status
)
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/template-plain/.git/
rm: cannot remove 'SANETESTD.1/x': Permission denied
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/template-blank/.git/
ok 16 - init with --template (blank)
expecting success:
mkdir templatedir-source &&
echo Content >templatedir-source/file &&
test_config_global init.templatedir "${HOME}/templatedir-source" &&
(
mkdir templatedir-set &&
cd templatedir-set &&
sane_unset GIT_TEMPLATE_DIR &&
NO_SET_GIT_TEMPLATE_DIR=t &&
export NO_SET_GIT_TEMPLATE_DIR &&
git init
) &&
test_cmp templatedir-source/file templatedir-set/.git/file
ok 8 - pretend we have fixed one of two known breakages (run in sub test-lib)
expecting success:
test_must_fail run_sub_test_lib_test mixed-results1 'mixed results #1' <<-\EOF &&
test_expect_success 'passing test' 'true'
test_expect_success 'failing test' 'false'
test_expect_failure 'pretend we have a known breakage' 'false'
test_done
EOF
check_sub_test_lib_test mixed-results1 <<-\EOF
> ok 1 - passing test
> not ok 2 - failing test
> # false
> not ok 3 - pretend we have a known breakage # TODO known breakage
> # still have 1 known breakage(s)
> # failed 1 among remaining 2 test(s)
> 1..3
EOF
prerequisite SANITY ok
expecting success:
test_when_finished "chmod 775 .git/objects .git/objects/??" &&
chmod a-w .git/objects .git/objects/?? &&
test_must_fail git write-tree
error: insufficient permission for adding an object to repository database .git/objects
fatal: git-write-tree: error building trees
ok 2 - write-tree should notice unwritable repository
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/templatedir-set/.git/
expecting success:
test_when_finished "chmod 775 .git/objects .git/objects/??" &&
chmod a-w .git/objects .git/objects/?? &&
test_must_fail git commit -m second
ok 17 - init with init.templatedir set
expecting success:
test_config_global core.bare false &&
test_config_global core.sharedRepository 0640 &&
git init --bare --shared=0666 init-bare-shared-override &&
check_config init-bare-shared-override true unset &&
test x0666 = \
x$(git config -f init-bare-shared-override/config core.sharedRepository)
error: insufficient permission for adding an object to repository database .git/objects
error: insufficient permission for adding an object to repository database .git/objects
error: Error building trees
ok 3 - commit should notice unwritable repository
expecting success:
test_when_finished "chmod 775 .git/objects .git/objects/??" &&
echo 6O >file &&
chmod a-w .git/objects .git/objects/?? &&
test_must_fail git update-index file
error: insufficient permission for adding an object to repository database .git/objects
error: file: failed to insert into database
fatal: Unable to process path file
ok 4 - update-index should notice unwritable repository
expecting success:
test_when_finished "chmod 775 .git/objects .git/objects/??" &&
echo b >file &&
chmod a-w .git/objects .git/objects/?? &&
test_must_fail git add file
Initialized empty shared Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/init-bare-shared-override/
error: insufficient permission for adding an object to repository database .git/objects
error: file: failed to insert into database
error: unable to index file file
fatal: updating files failed
ok 5 - attribute matching is case insensitive when core.ignorecase=1
checking prerequisite: CASE_INSENSITIVE_FS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
echo good >CamelCase &&
echo bad >camelcase &&
test "$(cat CamelCase)" != good
)
ok 5 - add should notice unwritable repository
# passed all 5 test(s)
1..5
prerequisite CASE_INSENSITIVE_FS not satisfied
skipping test: additional case insensitivity tests
test_must_fail attr_check a/B/D/g "a/b/d/*" "-c core.ignorecase=0" &&
test_must_fail attr_check A/B/D/NO "a/b/d/*" "-c core.ignorecase=0" &&
attr_check A/b/h a/b/h "-c core.ignorecase=1" &&
attr_check a/B/D/g "a/b/d/*" "-c core.ignorecase=1" &&
attr_check A/B/D/NO "a/b/d/*" "-c core.ignorecase=1"
ok 6 # skip additional case insensitivity tests (missing CASE_INSENSITIVE_FS)
expecting success:
attr_check ./f f &&
attr_check ./a/g a/g &&
attr_check a/./g a/g &&
attr_check a/c/../b/g a/b/g
ok 9 - pretend we have a pass, fail, and known breakage
expecting success:
test_must_fail run_sub_test_lib_test mixed-results2 'mixed results #2' <<-\EOF &&
test_expect_success 'passing test' 'true'
test_expect_success 'passing test' 'true'
test_expect_success 'passing test' 'true'
test_expect_success 'passing test' 'true'
test_expect_success 'failing test' 'false'
test_expect_success 'failing test' 'false'
test_expect_success 'failing test' 'false'
test_expect_failure 'pretend we have a known breakage' 'false'
test_expect_failure 'pretend we have a known breakage' 'false'
test_expect_failure 'pretend we have fixed a known breakage' 'true'
test_done
EOF
check_sub_test_lib_test mixed-results2 <<-\EOF
> ok 1 - passing test
> ok 2 - passing test
> ok 3 - passing test
> ok 4 - passing test
> not ok 5 - failing test
> # false
> not ok 6 - failing test
> # false
> not ok 7 - failing test
> # false
> not ok 8 - pretend we have a known breakage # TODO known breakage
> not ok 9 - pretend we have a known breakage # TODO known breakage
> ok 10 - pretend we have fixed a known breakage # TODO known breakage vanished
> # 1 known breakage(s) vanished; please update test(s)
> # still have 2 known breakage(s)
> # failed 3 among remaining 7 test(s)
> 1..10
EOF
ok 18 - init --bare/--shared overrides system/global config
expecting success:
test_config_global core.sharedRepository 0666 &&
git init shared-honor-global &&
test x0666 = \
x$(git config -f shared-honor-global/.git/config core.sharedRepository)
*** t0005-signals.sh ***
Initialized empty shared Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/shared-honor-global/.git/
ok 7 - unnormalized paths
expecting success:
(cd a && attr_check ../f f) &&
(cd a && attr_check f f) &&
(cd a && attr_check i a/i) &&
(cd a && attr_check g a/g) &&
(cd a && attr_check b/g a/b/g) &&
(cd b && attr_check ../a/f f) &&
(cd b && attr_check ../a/g a/g) &&
(cd b && attr_check ../a/b/g a/b/g)
ok 19 - init honors global core.sharedRepository
expecting success:
test_must_fail git init --template=$(printf "x%09999dx" 1) test
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0005-signals/.git/
fatal: insanely long template path x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001x
ok 20 - init rejects insanely long --template
expecting success:
rm -fr newdir &&
git init newdir &&
test_path_is_dir newdir/.git/refs
expecting success:
{ test-sigchain >actual; ret=$?; } &&
case "$ret" in
143) true ;; # POSIX w/ SIGTERM=15
271) true ;; # ksh w/ SIGTERM=15
3) true ;; # Windows
*) false ;;
esac &&
test_cmp expect actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/newdir/.git/
Terminated
ok 21 - init creates a new directory
expecting success:
rm -fr newdir &&
git init --bare newdir &&
test_path_is_dir newdir/refs
ok 1 - sigchain works
expecting success:
# we use exec here to avoid any sub-shell interpretation
# of the exit code
git config alias.sigterm "!exec test-sigchain" &&
test_expect_code 143 git sigterm
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/newdir/
ok 22 - init creates a new bare directory
expecting success:
rm -fr newdir &&
mkdir newdir &&
git init newdir &&
test_path_is_dir newdir/.git/refs
ok 10 - pretend we have a mix of all possible results
expecting success:
test_must_fail run_sub_test_lib_test \
test-verbose "test verbose" --verbose <<-\EOF &&
test_expect_success "passing test" true
test_expect_success "test with output" "echo foo"
test_expect_success "failing test" false
test_done
EOF
mv test-verbose/out test-verbose/out+ &&
grep -v "^Initialized empty" test-verbose/out+ >test-verbose/out &&
check_sub_test_lib_test test-verbose <<-\EOF
> expecting success: true
> ok 1 - passing test
> Z
> expecting success: echo foo
> foo
> ok 2 - test with output
> Z
> expecting success: false
> not ok 3 - failing test
> # false
> Z
> # failed 1 among 3 test(s)
> 1..3
EOF
three
two
one
error: exec test-sigchain died of signal 15
ok 2 - signals are propagated using shell convention
expecting success:
test-genrandom foo 16384 >file &&
git add file
ok 3 - create blob
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/newdir/.git/
ok 23 - init recreates a directory
expecting success:
rm -fr newdir &&
mkdir newdir &&
git init --bare newdir &&
test_path_is_dir newdir/refs
expecting success:
OUT=$( ((large_git; echo $? 1>&3) | :) 3>&1 ) &&
test "$OUT" -eq 141
ok 4 - a constipated git dies with SIGPIPE
ok 8 - relative paths
expecting success:
attr_check a_plus/g unspecified &&
cat >expect <<-\EOF &&
a/g: test: a/g
a_plus/g: test: unspecified
EOF
git check-attr test a/g a_plus/g >actual &&
test_cmp expect actual
expecting success:
OUT=$( ((trap "" PIPE; large_git; echo $? 1>&3) | :) 3>&1 ) &&
test "$OUT" -eq 141
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/newdir/
ok 24 - init recreates a new bare directory
expecting success:
rm -fr newdir &&
git init newdir/a/b/c &&
test_path_is_dir newdir/a/b/c/.git/refs
ok 5 - a constipated git dies with SIGPIPE even if parent ignores it
ok 9 - prefixes are not confused with leading directories
expecting success:
attr_check global unspecified &&
git config core.attributesfile "$HOME/global-gitattributes" &&
attr_check global global &&
git config core.attributesfile "~/global-gitattributes" &&
attr_check global global &&
echo "global test=precedence" >>.gitattributes &&
attr_check global precedence
# passed all 5 test(s)
1..5
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/newdir/a/b/c/.git/
ok 25 - init creates a new deep directory
expecting success:
rm -fr newdir &&
(
# Leading directories should honor umask while
# the repository itself should follow "shared"
umask 002 &&
git init --bare --shared=0660 newdir/a/b/c &&
test_path_is_dir newdir/a/b/c/refs &&
ls -ld newdir/a newdir/a/b > lsab.out &&
! grep -v "^drwxrw[sx]r-x" lsab.out &&
ls -ld newdir/a/b/c > lsc.out &&
! grep -v "^drwxrw[sx]---" lsc.out
)
*** t0006-date.sh ***
ok 11 - test --verbose
expecting success:
test_must_fail run_sub_test_lib_test \
test-verbose-only-2 "test verbose-only=2" \
--verbose-only=2 <<-\EOF &&
test_expect_success "passing test" true
test_expect_success "test with output" "echo foo"
test_expect_success "failing test" false
test_done
EOF
check_sub_test_lib_test test-verbose-only-2 <<-\EOF
> ok 1 - passing test
> Z
> expecting success: echo foo
> foo
> ok 2 - test with output
> Z
> not ok 3 - failing test
> # false
> # failed 1 among 3 test(s)
> 1..3
EOF
Initialized empty shared Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/newdir/a/b/c/
ok 26 - init creates a new deep directory (umask vs. shared)
expecting success:
rm -fr newdir &&
>newdir &&
test_must_fail git init newdir &&
test_path_is_file newdir
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0006-date/.git/
ok 10 - core.attributesfile
expecting success:
grep -v notest <expect-all >expect &&
sed -e "s/:.*//" <expect | git check-attr --stdin test >actual &&
test_cmp expect actual
fatal: cannot mkdir newdir: File exists
ok 27 - init notices EEXIST (1)
expecting success:
rm -fr newdir &&
mkdir newdir &&
>newdir/a &&
test_must_fail git init newdir/a/b &&
test_path_is_file newdir/a
expecting success:
test-date show 1251659995 >actual &&
test_i18ncmp expect actual
ok 11 - attribute test: read paths from stdin
fatal: cannot mkdir newdir/a/b: File exists
ok 1 - relative date (5 seconds ago)
expecting success:
grep -v unspecified <expect-all | sort >specified-all &&
sed -e "s/:.*//" <expect-all | uniq >stdin-all &&
git check-attr --stdin --all <stdin-all | sort >actual &&
test_cmp specified-all actual
expecting success:
test-date show 1251659700 >actual &&
test_i18ncmp expect actual
ok 28 - init notices EEXIST (2)
checking prerequisite: SANITY
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
mkdir SANETESTD.1 SANETESTD.2 &&
chmod +w SANETESTD.1 SANETESTD.2 &&
>SANETESTD.1/x 2>SANETESTD.2/x &&
chmod -w SANETESTD.1 &&
chmod -rx SANETESTD.2 ||
error "bug in test sript: cannot prepare SANETESTD"
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
error "bug in test sript: cannot clean SANETESTD"
return $status
)
ok 2 - relative date (5 minutes ago)
expecting success:
test-date show 1251642000 >actual &&
test_i18ncmp expect actual
ok 3 - relative date (5 hours ago)
expecting success:
test-date show 1251228000 >actual &&
test_i18ncmp expect actual
rm: cannot remove 'SANETESTD.1/x': Permission deniedok 12 - test --verbose-only
expecting success:
(
GIT_SKIP_TESTS='git.2' && export GIT_SKIP_TESTS &&
run_sub_test_lib_test git-skip-tests-basic 'GIT_SKIP_TESTS' <<-\EOF &&
for i in 1 2 3
do
test_expect_success "passing test #$i" 'true'
done
test_done
EOF
check_sub_test_lib_test git-skip-tests-basic <<-\EOF
> ok 1 - passing test #1
> ok 2 # skip passing test #2 (GIT_SKIP_TESTS)
> ok 3 - passing test #3
> # passed all 3 test(s)
> 1..3
EOF
)
ok 4 - relative date (5 days ago)
expecting success:
test-date show 1249932000 >actual &&
test_i18ncmp expect actual
ok 5 - relative date (3 weeks ago)
prerequisite SANITY ok
expecting success:
rm -fr newdir &&
mkdir newdir &&
chmod -w newdir &&
test_must_fail git init newdir/a/b
expecting success:
test-date show 1238660000 >actual &&
test_i18ncmp expect actual
ok 12 - attribute test: --all option
expecting success:
: >empty &&
git check-attr --cached --stdin --all <stdin-all | sort >actual &&
test_cmp empty actual &&
git add .gitattributes a/.gitattributes a/b/.gitattributes &&
git check-attr --cached --stdin --all <stdin-all | sort >actual &&
test_cmp specified-all actual
ok 6 - relative date (5 months ago)
expecting success:
test-date show 1214160000 >actual &&
test_i18ncmp expect actual
fatal: cannot mkdir newdir/a/b: Permission denied
ok 29 - init notices EPERM
expecting success:
rm -rf newdir &&
git --bare init newdir &&
test_path_is_dir newdir/refs
ok 7 - relative date (1 year, 2 months ago)
expecting success:
test-date show 1196472000 >actual &&
test_i18ncmp expect actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/newdir/
ok 8 - relative date (1 year, 9 months ago)
ok 30 - init creates a new bare directory with global --bare
expecting success:
test-date show 621660000 >actual &&
test_i18ncmp expect actual
expecting success:
rm -rf newdir &&
mkdir otherdir &&
GIT_DIR=otherdir git --bare init newdir &&
test_path_is_dir newdir/refs &&
test_path_is_missing otherdir/refs
ok 9 - relative date (20 years ago)
expecting success:
test-date show 1220210400 >actual &&
test_i18ncmp expect actual
ok 13 - attribute test: --cached option
expecting success:
attr_check a/i a/i &&
attr_check subdir/a/i unspecified
ok 10 - relative date (12 months ago)
expecting success:
test-date show 1188674400 >actual &&
test_i18ncmp expect actual
ok 11 - relative date (2 years ago)
expecting success:
TZ=UTC test-date parse '2008' >actual &&
test_cmp expect actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/newdir/
ok 31 - init prefers command line to GIT_DIR
expecting success:
rm -rf newdir &&
git init --separate-git-dir realgitdir newdir &&
echo "gitdir: $(pwd)/realgitdir" >expected &&
test_cmp expected newdir/.git &&
test_path_is_dir realgitdir/refs
ok 12 - parse date (2008)
expecting success:
TZ=UTC test-date parse '2008-02' >actual &&
test_cmp expect actual
ok 14 - root subdir attribute test
expecting success:
echo "!f test=bar" >.gitattributes &&
git check-attr test -- '!f' 2>errors &&
test_i18ngrep "Negative patterns are ignored" errors
!f: test: unspecified
ok 13 - parse date (2008-02)
expecting success:
TZ=UTC test-date parse '2008-02-14' >actual &&
test_cmp expect actual
warning: Negative patterns are ignored in git attributes
ok 15 - negative patterns
expecting success:
echo "\!f test=foo" >.gitattributes &&
attr_check "!f" foo
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/realgitdir/
ok 14 - parse date (2008-02-14)
expecting success:
TZ=UTC test-date parse '2008-02-14 20:30:45' >actual &&
test_cmp expect actual
ok 32 - init with separate gitdir
expecting success:
( cd newdir && git init )
ok 13 - GIT_SKIP_TESTS
expecting success:
(
GIT_SKIP_TESTS='git.2 git.5' && export GIT_SKIP_TESTS &&
run_sub_test_lib_test git-skip-tests-several 'GIT_SKIP_TESTS several tests' <<-\EOF &&
for i in 1 2 3 4 5 6
do
test_expect_success "passing test #$i" 'true'
done
test_done
EOF
check_sub_test_lib_test git-skip-tests-several <<-\EOF
> ok 1 - passing test #1
> ok 2 # skip passing test #2 (GIT_SKIP_TESTS)
> ok 3 - passing test #3
> ok 4 - passing test #4
> ok 5 # skip passing test #5 (GIT_SKIP_TESTS)
> ok 6 - passing test #6
> # passed all 6 test(s)
> 1..6
EOF
)
ok 15 - parse date (2008-02-14 20:30:45)
expecting success:
TZ=UTC test-date parse '2008-02-14 20:30:45 -0500' >actual &&
test_cmp expect actual
Reinitialized existing Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/realgitdir/
ok 33 - re-init on .git file
ok 16 - patterns starting with exclamation
expecting success:
(
cd newdir &&
git init --separate-git-dir ../surrealgitdir
) &&
echo "gitdir: $(pwd)/surrealgitdir" >expected &&
test_cmp expected newdir/.git &&
test_path_is_dir surrealgitdir/refs &&
test_path_is_missing realgitdir/refs
expecting success:
echo "**/f foo=bar" >.gitattributes &&
cat <<\EOF >expect &&
f: foo: bar
a/f: foo: bar
a/b/f: foo: bar
a/b/c/f: foo: bar
EOF
git check-attr foo -- "f" >actual 2>err &&
git check-attr foo -- "a/f" >>actual 2>>err &&
git check-attr foo -- "a/b/f" >>actual 2>>err &&
git check-attr foo -- "a/b/c/f" >>actual 2>>err &&
test_cmp expect actual &&
test_line_count = 0 err
ok 16 - parse date (2008-02-14 20:30:45 -0500)
expecting success:
TZ=UTC test-date parse '2008-02-14 20:30:45 -0015' >actual &&
test_cmp expect actual
Reinitialized existing Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/surrealgitdir/
ok 34 - re-init to update git link
expecting success:
rm -rf newdir realgitdir surrealgitdir &&
git init newdir &&
(
cd newdir &&
git init --separate-git-dir ../realgitdir
) &&
echo "gitdir: $(pwd)/realgitdir" >expected &&
test_cmp expected newdir/.git &&
test_path_is_dir realgitdir/refs
ok 17 - parse date (2008-02-14 20:30:45 -0015)
expecting success:
TZ=UTC test-date parse '2008-02-14 20:30:45 -5' >actual &&
test_cmp expect actual
ok 18 - parse date (2008-02-14 20:30:45 -5)
expecting success:
TZ=UTC test-date parse '2008-02-14 20:30:45 -5:' >actual &&
test_cmp expect actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/newdir/.git/
ok 19 - parse date (2008-02-14 20:30:45 -5:)
expecting success:
TZ=UTC test-date parse '2008-02-14 20:30:45 -05' >actual &&
test_cmp expect actual
ok 17 - "**" test
expecting success:
echo "a**f foo=bar" >.gitattributes &&
git check-attr foo -- "f" >actual &&
cat <<\EOF >expect &&
f: foo: unspecified
af: foo: bar
axf: foo: bar
a/f: foo: unspecified
a/b/f: foo: unspecified
a/b/c/f: foo: unspecified
EOF
git check-attr foo -- "f" >actual 2>err &&
git check-attr foo -- "af" >>actual 2>err &&
git check-attr foo -- "axf" >>actual 2>err &&
git check-attr foo -- "a/f" >>actual 2>>err &&
git check-attr foo -- "a/b/f" >>actual 2>>err &&
git check-attr foo -- "a/b/c/f" >>actual 2>>err &&
test_cmp expect actual &&
test_line_count = 0 err
ok 20 - parse date (2008-02-14 20:30:45 -05)
Reinitialized existing Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/realgitdir/
expecting success:
TZ=UTC test-date parse '2008-02-14 20:30:45 -:30' >actual &&
test_cmp expect actual
ok 35 - re-init to move gitdir
checking prerequisite: SYMLINKS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# test whether the filesystem supports symbolic links
ln -s x y && test -h y
)
ok 21 - parse date (2008-02-14 20:30:45 -:30)
expecting success:
TZ=UTC test-date parse '2008-02-14 20:30:45 -05:00' >actual &&
test_cmp expect actual
prerequisite SYMLINKS ok
expecting success:
rm -rf newdir realgitdir &&
git init newdir &&
(
cd newdir &&
mv .git here &&
ln -s here .git &&
git init --separate-git-dir ../realgitdir
) &&
echo "gitdir: $(pwd)/realgitdir" >expected &&
test_cmp expected newdir/.git &&
test_cmp expected newdir/here &&
test_path_is_dir realgitdir/refs
ok 22 - parse date (2008-02-14 20:30:45 -05:00)
expecting success:
TZ=EST5 test-date parse '2008-02-14 20:30:45' >actual &&
test_cmp expect actual
ok 23 - parse date (2008-02-14 20:30:45 TZ=EST5)
expecting success:
test-date approxidate 'now' >actual &&
test_cmp expect actual
ok 24 - parse approxidate (now)
expecting success:
test-date approxidate '5 seconds ago' >actual &&
test_cmp expect actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/newdir/.git/
ok 25 - parse approxidate (5 seconds ago)
expecting success:
test-date approxidate '5.seconds.ago' >actual &&
test_cmp expect actual
ok 14 - GIT_SKIP_TESTS several tests
expecting success:
(
GIT_SKIP_TESTS='git.[2-5]' && export GIT_SKIP_TESTS &&
run_sub_test_lib_test git-skip-tests-sh-pattern 'GIT_SKIP_TESTS sh pattern' <<-\EOF &&
for i in 1 2 3 4 5 6
do
test_expect_success "passing test #$i" 'true'
done
test_done
EOF
check_sub_test_lib_test git-skip-tests-sh-pattern <<-\EOF
> ok 1 - passing test #1
> ok 2 # skip passing test #2 (GIT_SKIP_TESTS)
> ok 3 # skip passing test #3 (GIT_SKIP_TESTS)
> ok 4 # skip passing test #4 (GIT_SKIP_TESTS)
> ok 5 # skip passing test #5 (GIT_SKIP_TESTS)
> ok 6 - passing test #6
> # passed all 6 test(s)
> 1..6
EOF
)
ok 26 - parse approxidate (5.seconds.ago)
expecting success:
test-date approxidate '10.minutes.ago' >actual &&
test_cmp expect actual
Reinitialized existing Git repository in /«PKGBUILDDIR»/t/trash directory.t0001-init/realgitdir/
ok 36 - re-init to move gitdir symlink
ok 18 - "**" with no slashes test
expecting success:
mkdir unreal real &&
git init real &&
echo "file test=in-real" >real/.gitattributes &&
(
cd unreal &&
attr_check file in-real "--git-dir ../real/.git --work-tree ../real"
)
# passed all 36 test(s)
1..36
ok 27 - parse approxidate (10.minutes.ago)
expecting success:
test-date approxidate 'yesterday' >actual &&
test_cmp expect actual
ok 28 - parse approxidate (yesterday)
expecting success:
test-date approxidate '3.days.ago' >actual &&
test_cmp expect actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0003-attributes/real/.git/
ok 29 - parse approxidate (3.days.ago)
expecting success:
test-date approxidate '3.weeks.ago' >actual &&
test_cmp expect actual
ok 19 - using --git-dir and --work-tree
expecting success:
git clone --bare . bare.git
ok 30 - parse approxidate (3.weeks.ago)
expecting success:
test-date approxidate '3.months.ago' >actual &&
test_cmp expect actual
Cloning into bare repository 'bare.git'...
ok 31 - parse approxidate (3.months.ago)
expecting success:
test-date approxidate '2.years.3.months.ago' >actual &&
test_cmp expect actual
ok 32 - parse approxidate (2.years.3.months.ago)
expecting success:
test-date approxidate '6am yesterday' >actual &&
test_cmp expect actual
warning: You appear to have cloned an empty repository.
done.
ok 33 - parse approxidate (6am yesterday)
expecting success:
test-date approxidate '6pm yesterday' >actual &&
test_cmp expect actual
ok 20 - setup bare
expecting success:
(
cd bare.git &&
(
echo "f test=f"
echo "a/i test=a/i"
) >.gitattributes &&
attr_check f unspecified &&
attr_check a/f unspecified &&
attr_check a/c/f unspecified &&
attr_check a/i unspecified &&
attr_check subdir/a/i unspecified
)
ok 34 - parse approxidate (6pm yesterday)
expecting success:
test-date approxidate '3:00' >actual &&
test_cmp expect actual
ok 35 - parse approxidate (3:00)
expecting success:
test-date approxidate '15:00' >actual &&
test_cmp expect actual
ok 15 - GIT_SKIP_TESTS sh pattern
expecting success:
run_sub_test_lib_test run-basic '--run basic' --run='1 3 5' <<-\EOF &&
for i in 1 2 3 4 5 6
do
test_expect_success "passing test #$i" 'true'
done
test_done
EOF
check_sub_test_lib_test run-basic <<-\EOF
> ok 1 - passing test #1
> ok 2 # skip passing test #2 (--run)
> ok 3 - passing test #3
> ok 4 # skip passing test #4 (--run)
> ok 5 - passing test #5
> ok 6 # skip passing test #6 (--run)
> # passed all 6 test(s)
> 1..6
EOF
ok 36 - parse approxidate (15:00)
expecting success:
test-date approxidate 'noon today' >actual &&
test_cmp expect actual
ok 37 - parse approxidate (noon today)
expecting success:
test-date approxidate 'noon yesterday' >actual &&
test_cmp expect actual
*** t0007-git-var.sh ***
ok 38 - parse approxidate (noon yesterday)
expecting success:
test-date approxidate 'last tuesday' >actual &&
test_cmp expect actual
ok 39 - parse approxidate (last tuesday)
expecting success:
test-date approxidate 'July 5th' >actual &&
test_cmp expect actual
ok 40 - parse approxidate (July 5th)
expecting success:
test-date approxidate '06/05/2009' >actual &&
test_cmp expect actual
ok 21 - bare repository: check that .gitattribute is ignored
expecting success:
(
cd bare.git &&
GIT_INDEX_FILE=../.git/index \
git check-attr --cached --stdin --all <../stdin-all |
sort >actual &&
test_cmp ../specified-all actual
)
ok 41 - parse approxidate (06/05/2009)
expecting success:
test-date approxidate '06.05.2009' >actual &&
test_cmp expect actual
ok 42 - parse approxidate (06.05.2009)
expecting success:
test-date approxidate 'Jun 6, 5AM' >actual &&
test_cmp expect actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0007-git-var/.git/
ok 22 - bare repository: check that --cached honors index
expecting success:
(
cd bare.git &&
(
echo "f test=f"
echo "a/i test=a/i"
) >info/attributes &&
attr_check f f &&
attr_check a/f f &&
attr_check a/c/f f &&
attr_check a/i a/i &&
attr_check subdir/a/i unspecified
)
ok 43 - parse approxidate (Jun 6, 5AM)
expecting success:
test-date approxidate '5AM Jun 6' >actual &&
test_cmp expect actual
expecting success:
test_tick &&
echo "$GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> $GIT_AUTHOR_DATE" >expect &&
git var GIT_AUTHOR_IDENT >actual &&
test_cmp expect actual
ok 44 - parse approxidate (5AM Jun 6)
expecting success:
test-date approxidate '6AM, June 7, 2009' >actual &&
test_cmp expect actual
ok 1 - get GIT_AUTHOR_IDENT
expecting success:
test_tick &&
echo "$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE" >expect &&
git var GIT_COMMITTER_IDENT >actual &&
test_cmp expect actual
ok 45 - parse approxidate (6AM, June 7, 2009)
expecting success:
test-date approxidate '2008-12-01' >actual &&
test_cmp expect actual
ok 2 - get GIT_COMMITTER_IDENT
ok 46 - parse approxidate (2008-12-01)
expecting success:
test-date approxidate '2009-12-01' >actual &&
test_cmp expect actual
checking prerequisite: AUTOIDENT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
sane_unset GIT_AUTHOR_NAME &&
sane_unset GIT_AUTHOR_EMAIL &&
git var GIT_AUTHOR_IDENT
)
ok 47 - parse approxidate (2009-12-01)
Debian build daemon <buildd@testbuildd.raspbian.org> 1112912053 -0700
prerequisite AUTOIDENT ok
skipping test: requested identites are strict
(
sane_unset GIT_COMMITTER_NAME &&
sane_unset GIT_COMMITTER_EMAIL &&
test_must_fail git var GIT_COMMITTER_IDENT
)
ok 3 # skip requested identites are strict (missing !AUTOIDENT)
expecting success:
git var -l >actual &&
echo "$GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> $GIT_AUTHOR_DATE" >expect &&
sed -n s/GIT_AUTHOR_IDENT=//p <actual >actual.author &&
test_cmp expect actual.author
# passed all 47 test(s)
1..47
*** t0008-ignores.sh ***
ok 4 - git var -l lists variables
expecting success:
git var -l >actual &&
echo false >expect &&
sed -n s/core\\.bare=//p <actual >actual.bare &&
test_cmp expect actual.bare
ok 23 - bare repository: test info/attributes
# passed all 23 test(s)
1..23
ok 5 - git var -l lists config
expecting success:
test_must_fail git var -l GIT_COMMITTER_IDENT
ok 16 - --run basic
expecting success:
run_sub_test_lib_test run-range '--run with a range' --run='1-3' <<-\EOF &&
for i in 1 2 3 4 5 6
do
test_expect_success "passing test #$i" 'true'
done
test_done
EOF
check_sub_test_lib_test run-range <<-\EOF
> ok 1 - passing test #1
> ok 2 - passing test #2
> ok 3 - passing test #3
> ok 4 # skip passing test #4 (--run)
> ok 5 # skip passing test #5 (--run)
> ok 6 # skip passing test #6 (--run)
> # passed all 6 test(s)
> 1..6
EOF
usage: git var (-l | <variable>)
ok 6 - listing and asking for variables are exclusive
# passed all 6 test(s)
1..6
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0008-ignores/.git/
*** t0009-prio-queue.sh ***
*** t0010-racy-git.sh ***
expecting success:
init_vars &&
mkdir -p a/b/ignored-dir a/submodule b &&
if test_have_prereq SYMLINKS
then
ln -s b a/symlink
fi &&
(
cd a/submodule &&
git init &&
echo a >a &&
git add a &&
git commit -m"commit in submodule"
) &&
git add a/submodule &&
cat <<-\EOF >.gitignore &&
one
ignored-*
top-level-dir/
EOF
for dir in . a
do
: >$dir/not-ignored &&
: >$dir/ignored-and-untracked &&
: >$dir/ignored-but-in-index
done &&
git add -f ignored-but-in-index a/ignored-but-in-index &&
cat <<-\EOF >a/.gitignore &&
two*
*three
EOF
cat <<-\EOF >a/b/.gitignore &&
four
five
# this comment should affect the line numbers
six
ignored-dir/
# and so should this blank line:
!on*
!two
EOF
echo "seven" >a/b/ignored-dir/.gitignore &&
test -n "$HOME" &&
cat <<-\EOF >"$global_excludes" &&
globalone
!globaltwo
globalthree
EOF
cat <<-\EOF >>.git/info/exclude
per-repo
EOF
checking prerequisite: SYMLINKS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# test whether the filesystem supports symbolic links
ln -s x y && test -h y
)
prerequisite SYMLINKS ok
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0009-prio-queue/.git/
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0008-ignores/a/submodule/.git/
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0010-racy-git/.git/
expecting success:
test-prio-queue 2 6 3 10 9 5 7 4 5 8 1 dump >actual &&
test_cmp expect actual
ok 1 - basic ordering
expecting success:
test-prio-queue 6 2 4 get 5 3 get get 1 dump >actual &&
test_cmp expect actual
[master (root-commit) 68ebdf2] commit in submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
expecting success: test "" != "$files"
ok 1 - Racy GIT trial #0 part A
ok 2 - mixed put and get
expecting success:
test-prio-queue 1 2 get get get 1 2 get get get >actual &&
test_cmp expect actual
ok 3 - notice empty queue
# passed all 3 test(s)
1..3
ok 17 - --run with a range
expecting success:
run_sub_test_lib_test run-two-ranges '--run with two ranges' --run='1-2 5-6' <<-\EOF &&
for i in 1 2 3 4 5 6
do
test_expect_success "passing test #$i" 'true'
done
test_done
EOF
check_sub_test_lib_test run-two-ranges <<-\EOF
> ok 1 - passing test #1
> ok 2 - passing test #2
> ok 3 # skip passing test #3 (--run)
> ok 4 # skip passing test #4 (--run)
> ok 5 - passing test #5
> ok 6 - passing test #6
> # passed all 6 test(s)
> 1..6
EOF
ok 1 - setup
*** t0011-hashmap.sh ***
expecting success:
expect "$expect" &&
eval "$code"
ok 2 - . corner-case
expecting success:
expect '' &&
test_check_ignore . 1
ok 3 - . corner-case with -q
expecting success:
expect '' &&
test_check_ignore . 1
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0011-hashmap/.git/
ok 4 - . corner-case with --quiet
expecting success:
expect '' &&
test_check_ignore . 1
expecting success:
test_hashmap "hash key1" "2215982743 2215982743 116372151 116372151" &&
test_hashmap "hash key2" "2215982740 2215982740 116372148 116372148" &&
test_hashmap "hash fooBarFrotz" "1383912807 1383912807 3189766727 3189766727" &&
test_hashmap "hash foobarfrotz" "2862305959 2862305959 3189766727 3189766727"
ok 5 - . corner-case with -v
expecting success:
expect ':: .' &&
test_check_ignore . 1
ok 6 - . corner-case with -v -n
expecting success:
expect ':: .' &&
test_check_ignore . 1
ok 1 - hash functions
expecting success:
test_hashmap "put key1 value1
put key2 value2
put fooBarFrotz value3
put foobarfrotz value4
size" "NULL
NULL
NULL
NULL
64 4"
ok 2 - put
expecting success:
test_hashmap "put key1 value1
put key2 value2
put fooBarFrotz value3
size" "NULL
NULL
NULL
64 3" ignorecase
ok 7 - . corner-case with -v --non-matching
expecting success:
expect '' &&
test_check_ignore . 1
ok 3 - put (case insensitive)
expecting success:
test_hashmap "put key1 value1
put key1 value2
put fooBarFrotz value3
put fooBarFrotz value4
size" "NULL
value1
NULL
value3
64 2"
ok 8 - . corner-case with --verbose
expecting success:
expect ':: .' &&
test_check_ignore . 1
ok 4 - replace
expecting success:
test_hashmap "put key1 value1
put Key1 value2
put fooBarFrotz value3
put foobarfrotz value4
size" "NULL
value1
NULL
value3
64 2" ignorecase
ok 5 - replace (case insensitive)
expecting success:
test_hashmap "put key1 value1
put key2 value2
put fooBarFrotz value3
put foobarfrotz value4
get key1
get key2
get fooBarFrotz
get notInMap" "NULL
NULL
NULL
NULL
value1
value2
value3
NULL"
ok 9 - . corner-case with --verbose -n
expecting success:
expect ':: .' &&
test_check_ignore . 1
ok 6 - get
expecting success:
test_hashmap "put key1 value1
put key2 value2
put fooBarFrotz value3
get Key1
get keY2
get foobarfrotz
get notInMap" "NULL
NULL
NULL
value1
value2
value3
NULL" ignorecase
ok 18 - --run with two ranges
expecting success:
run_sub_test_lib_test run-left-open-range '--run with a left open range' --run='-3' <<-\EOF &&
for i in 1 2 3 4 5 6
do
test_expect_success "passing test #$i" 'true'
done
test_done
EOF
check_sub_test_lib_test run-left-open-range <<-\EOF
> ok 1 - passing test #1
> ok 2 - passing test #2
> ok 3 - passing test #3
> ok 4 # skip passing test #4 (--run)
> ok 5 # skip passing test #5 (--run)
> ok 6 # skip passing test #6 (--run)
> # passed all 6 test(s)
> 1..6
EOF
ok 10 - . corner-case with --verbose --non-matching
ok 7 - get (case insensitive)
expecting success:
test_hashmap "add key1 value1
add key1 value2
add fooBarFrotz value3
add fooBarFrotz value4
get key1
get fooBarFrotz
get notInMap" "value2
value1
value4
value3
NULL"
expecting success:
expect "$expect" &&
eval "$code"
ok 8 - add
expecting success:
test_hashmap "add key1 value1
add Key1 value2
add fooBarFrotz value3
add foobarfrotz value4
get key1
get Foobarfrotz
get notInMap" "value2
value1
value4
value3
NULL" ignorecase
ok 9 - add (case insensitive)
expecting success:
test_hashmap "put key1 value1
put key2 value2
put fooBarFrotz value3
remove key1
remove key2
remove notInMap
size" "NULL
NULL
NULL
value1
value2
NULL
64 1"
fatal: no path specified
ok 11 - empty command line
expecting success:
expect '' &&
test_check_ignore "" 128 &&
stderr_contains "fatal: no path specified"
ok 10 - remove
expecting success:
test_hashmap "put key1 value1
put key2 value2
put fooBarFrotz value3
remove Key1
remove keY2
remove notInMap
size" "NULL
NULL
NULL
value1
value2
NULL
64 1" ignorecase
ok 11 - remove (case insensitive)
expecting success:
test_hashmap "put key1 value1
put key2 value2
put fooBarFrotz value3
iterate" "NULL
NULL
NULL
key2 value2
key1 value1
fooBarFrotz value3"
fatal: no path specified
ok 12 - empty command line with -q
expecting success:
expect '' &&
test_check_ignore "" 128 &&
stderr_contains "fatal: no path specified"
ok 12 - iterate
expecting success:
test_hashmap "put key1 value1
put key2 value2
put fooBarFrotz value3
iterate" "NULL
NULL
NULL
fooBarFrotz value3
key2 value2
key1 value1" ignorecase
ok 13 - iterate (case insensitive)
expecting success:
rm -f in &&
rm -f expect &&
for n in $(test_seq 51)
do
echo put key$n value$n >> in &&
echo NULL >> expect
done &&
echo size >> in &&
echo 64 51 >> expect &&
echo put key52 value52 >> in &&
echo NULL >> expect &&
echo size >> in &&
echo 256 52 >> expect &&
for n in $(test_seq 12)
do
echo remove key$n >> in &&
echo value$n >> expect
done &&
echo size >> in &&
echo 256 40 >> expect &&
echo remove key40 >> in &&
echo value40 >> expect &&
echo size >> in &&
echo 64 39 >> expect &&
cat in | test-hashmap > out &&
test_cmp expect out
fatal: no path specified
ok 13 - empty command line with --quiet
expecting success:
expect '' &&
test_check_ignore "" 128 &&
stderr_contains "fatal: no path specified"
fatal: no path specified
ok 14 - empty command line with -v
expecting success:
expect '' &&
test_check_ignore "" 128 &&
stderr_contains "fatal: no path specified"
ok 14 - grow / shrink
expecting success:
test_hashmap "intern value1
intern Value1
intern value2
intern value2
" "value1
Value1
value2
value2"
fatal: no path specified
ok 15 - empty command line with -v -n
expecting success:
expect '' &&
test_check_ignore "" 128 &&
stderr_contains "fatal: no path specified"
ok 15 - string interning
# passed all 15 test(s)
1..15
ok 19 - --run with a left open range
expecting success:
run_sub_test_lib_test run-right-open-range '--run with a right open range' --run='4-' <<-\EOF &&
for i in 1 2 3 4 5 6
do
test_expect_success "passing test #$i" 'true'
done
test_done
EOF
check_sub_test_lib_test run-right-open-range <<-\EOF
> ok 1 # skip passing test #1 (--run)
> ok 2 # skip passing test #2 (--run)
> ok 3 # skip passing test #3 (--run)
> ok 4 - passing test #4
> ok 5 - passing test #5
> ok 6 - passing test #6
> # passed all 6 test(s)
> 1..6
EOF
fatal: no path specified
ok 16 - empty command line with -v --non-matching
expecting success:
expect '' &&
test_check_ignore "" 128 &&
stderr_contains "fatal: no path specified"
*** t0020-crlf.sh ***
fatal: no path specified
ok 17 - empty command line with --verbose
expecting success:
expect '' &&
test_check_ignore "" 128 &&
stderr_contains "fatal: no path specified"
fatal: no path specified
ok 18 - empty command line with --verbose -n
expecting success:
expect '' &&
test_check_ignore "" 128 &&
stderr_contains "fatal: no path specified"
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0020-crlf/.git/
fatal: no path specified
expecting success:
git config core.autocrlf false &&
for w in Hello world how are you; do echo $w; done >one &&
mkdir dir &&
for w in I am very very fine thank you; do echo $w; done >dir/two &&
for w in Oh here is NULQin text here; do echo $w; done | q_to_nul >three &&
git add . &&
git commit -m initial &&
one=$(git rev-parse HEAD:one) &&
dir=$(git rev-parse HEAD:dir) &&
two=$(git rev-parse HEAD:dir/two) &&
three=$(git rev-parse HEAD:three) &&
for w in Some extra lines here; do echo $w; done >>one &&
git diff >patch.file &&
patched=$(git hash-object --stdin <one) &&
git read-tree --reset -u HEAD
ok 19 - empty command line with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 20 - --stdin with empty STDIN
expecting success: test "" != "$files"
ok 2 - Racy GIT trial #0 part B
expecting success:
expect '' &&
test_check_ignore "--stdin" 1 </dev/null &&
test_stderr ""
expecting success: test "" != "$files"
ok 3 - Racy GIT trial #1 part A
ok 21 - --stdin with empty STDIN with -q
expecting success:
expect '' &&
test_check_ignore "--stdin" 1 </dev/null &&
test_stderr ""
[master (root-commit) 41add3b] initial
Author: A U Thor <author@example.com>
3 files changed, 12 insertions(+)
create mode 100644 dir/two
create mode 100644 one
create mode 100644 three
ok 20 - --run with a right open range
expecting success:
run_sub_test_lib_test run-basic-neg '--run with basic negation' --run='!3' <<-\EOF &&
for i in 1 2 3 4 5 6
do
test_expect_success "passing test #$i" 'true'
done
test_done
EOF
check_sub_test_lib_test run-basic-neg <<-\EOF
> ok 1 - passing test #1
> ok 2 - passing test #2
> ok 3 # skip passing test #3 (--run)
> ok 4 - passing test #4
> ok 5 - passing test #5
> ok 6 - passing test #6
> # passed all 6 test(s)
> 1..6
EOF
ok 22 - --stdin with empty STDIN with --quiet
expecting success:
expect '' &&
test_check_ignore "--stdin" 1 </dev/null &&
test_stderr ""
ok 23 - --stdin with empty STDIN with -v
expecting success:
expect '' &&
test_check_ignore "--stdin" 1 </dev/null &&
test_stderr ""
ok 24 - --stdin with empty STDIN with -v -n
expecting success:
expect '' &&
test_check_ignore "--stdin" 1 </dev/null &&
test_stderr ""
ok 1 - setup
expecting success:
git config core.autocrlf input &&
git config core.safecrlf true &&
for w in I am all CRLF; do echo $w; done | append_cr >allcrlf &&
test_must_fail git add allcrlf
ok 25 - --stdin with empty STDIN with -v --non-matching
expecting success:
expect '' &&
test_check_ignore "--stdin" 1 </dev/null &&
test_stderr ""
ok 26 - --stdin with empty STDIN with --verbose
expecting success:
expect '' &&
test_check_ignore "--stdin" 1 </dev/null &&
test_stderr ""
fatal: CRLF would be replaced by LF in allcrlf.
ok 2 - safecrlf: autocrlf=input, all CRLF
expecting success:
git config core.autocrlf input &&
git config core.safecrlf true &&
for w in Oh here is CRLFQ in text; do echo $w; done | q_to_cr >mixed &&
test_must_fail git add mixed
ok 27 - --stdin with empty STDIN with --verbose -n
expecting success:
expect '' &&
test_check_ignore "--stdin" 1 </dev/null &&
test_stderr ""
fatal: CRLF would be replaced by LF in mixed.
ok 3 - safecrlf: autocrlf=input, mixed LF/CRLF
expecting success:
git config core.autocrlf true &&
git config core.safecrlf true &&
for w in I am all LF; do echo $w; done >alllf &&
test_must_fail git add alllf
ok 28 - --stdin with empty STDIN with --verbose --non-matching
expecting success:
expect "" &&
test_check_ignore "-q one two" 128 &&
stderr_contains "fatal: --quiet is only valid with a single pathname"
fatal: LF would be replaced by CRLF in alllf
ok 4 - safecrlf: autocrlf=true, all LF
expecting success:
git config core.autocrlf true &&
git config core.safecrlf true &&
for w in Oh here is CRLFQ in text; do echo $w; done | q_to_cr >mixed &&
test_must_fail git add mixed
ok 21 - --run with basic negation
expecting success:
run_sub_test_lib_test run-two-neg '--run with two negations' --run='!3 !6' <<-\EOF &&
for i in 1 2 3 4 5 6
do
test_expect_success "passing test #$i" 'true'
done
test_done
EOF
check_sub_test_lib_test run-two-neg <<-\EOF
> ok 1 - passing test #1
> ok 2 - passing test #2
> ok 3 # skip passing test #3 (--run)
> ok 4 - passing test #4
> ok 5 - passing test #5
> ok 6 # skip passing test #6 (--run)
> # passed all 6 test(s)
> 1..6
EOF
fatal: --quiet is only valid with a single pathname
ok 29 - -q with multiple args
expecting success:
expect "" &&
test_check_ignore "--quiet one two" 128 &&
stderr_contains "fatal: --quiet is only valid with a single pathname"
fatal: --quiet is only valid with a single pathname
ok 30 - --quiet with multiple args
expecting success:
expect '' &&
test_check_ignore '-q -v foo' 128 &&
stderr_contains 'fatal: cannot have both --quiet and --verbose'
fatal: LF would be replaced by CRLF in mixed
ok 5 - safecrlf: autocrlf=true mixed LF/CRLF
expecting success:
git config core.autocrlf input &&
git config core.safecrlf warn &&
for w in I am all LF; do echo $w; done >doublewarn &&
git add doublewarn &&
git commit -m "nowarn" &&
for w in Oh here is CRLFQ in text; do echo $w; done | q_to_cr >doublewarn &&
test $(git add doublewarn 2>&1 | grep "CRLF will be replaced by LF" | wc -l) = 1
fatal: cannot have both --quiet and --verbose
ok 31 - -q -v
expecting success:
expect '' &&
test_check_ignore '--quiet -v foo' 128 &&
stderr_contains 'fatal: cannot have both --quiet and --verbose'
fatal: cannot have both --quiet and --verbose
ok 32 - --quiet -v
expecting success:
expect '' &&
test_check_ignore '-q --verbose foo' 128 &&
stderr_contains 'fatal: cannot have both --quiet and --verbose'
[master e57d128] nowarn
Author: A U Thor <author@example.com>
1 file changed, 4 insertions(+)
create mode 100644 doublewarn
fatal: cannot have both --quiet and --verbose
ok 33 - -q --verbose
expecting success:
expect '' &&
test_check_ignore '--quiet --verbose foo' 128 &&
stderr_contains 'fatal: cannot have both --quiet and --verbose'
ok 6 - safecrlf: print warning only once
expecting success:
git config core.autocrlf input &&
git config core.safecrlf true &&
git diff HEAD
fatal: cannot have both --quiet and --verbose
ok 34 - --quiet --verbose
expecting success:
expect "" &&
test_check_ignore "--quiet one two" 128 &&
stderr_contains "fatal: --quiet is only valid with a single pathname"
warning: CRLF will be replaced by LF in doublewarn.
The file will have its original line endings in your working directory.
diff --git a/doublewarn b/doublewarn
index 03ba6c2..1ed2a2c 100644
--- a/doublewarn
+++ b/doublewarn
@@ -1,4 +1,6 @@
-I
-am
-all
-LF
+Oh
+here
+is
+CRLF
+in
+text
ok 7 - safecrlf: git diff demotes safecrlf=true to warn
expecting success:
git config core.autocrlf false &&
git config core.safecrlf false &&
git reset --hard HEAD^
fatal: --quiet is only valid with a single pathname
ok 35 - --quiet with multiple args
expecting success:
expect "$expect" &&
eval "$code"
HEAD is now at 41add3b initial
ok 8 - switch off autocrlf, safecrlf, reset HEAD
expecting success:
rm -f tmp one dir/two three &&
git read-tree --reset -u HEAD &&
git config core.autocrlf input &&
munge_cr append one &&
munge_cr append dir/two &&
git update-index -- one dir/two &&
differs=$(git diff-index --cached HEAD) &&
verbose test -z "$differs"
fatal: no path specified
ok 22 - --run with two negations
expecting success:
run_sub_test_lib_test run-range-and-neg '--run a range and negation' --run='-4 !2' <<-\EOF &&
for i in 1 2 3 4 5 6
do
test_expect_success "passing test #$i" 'true'
done
test_done
EOF
check_sub_test_lib_test run-range-and-neg <<-\EOF
> ok 1 - passing test #1
> ok 2 # skip passing test #2 (--run)
> ok 3 - passing test #3
> ok 4 - passing test #4
> ok 5 # skip passing test #5 (--run)
> ok 6 # skip passing test #6 (--run)
> # passed all 6 test(s)
> 1..6
EOF
ok 36 - erroneous use of --
expecting success:
expect '' &&
test_check_ignore "--" 128 &&
stderr_contains "fatal: no path specified"
fatal: no path specified
ok 37 - erroneous use of -- with -q
expecting success:
expect '' &&
test_check_ignore "--" 128 &&
stderr_contains "fatal: no path specified"
fatal: no path specified
ok 38 - erroneous use of -- with --quiet
expecting success:
expect '' &&
test_check_ignore "--" 128 &&
stderr_contains "fatal: no path specified"
ok 9 - update with autocrlf=input
expecting success:
rm -f tmp one dir/two three &&
git read-tree --reset -u HEAD &&
git config core.autocrlf true &&
munge_cr append one &&
munge_cr append dir/two &&
git update-index -- one dir/two &&
differs=$(git diff-index --cached HEAD) &&
verbose test -z "$differs"
fatal: no path specified
ok 39 - erroneous use of -- with -v
expecting success:
expect '' &&
test_check_ignore "--" 128 &&
stderr_contains "fatal: no path specified"
fatal: no path specified
ok 40 - erroneous use of -- with -v -n
expecting success:
expect '' &&
test_check_ignore "--" 128 &&
stderr_contains "fatal: no path specified"
fatal: no path specified
ok 41 - erroneous use of -- with -v --non-matching
expecting success:
expect '' &&
test_check_ignore "--" 128 &&
stderr_contains "fatal: no path specified"
ok 10 - update with autocrlf=true
expecting success:
rm -f tmp one dir/two three &&
git config core.autocrlf true &&
git read-tree --reset -u HEAD &&
munge_cr remove one &&
munge_cr remove dir/two &&
git update-index -- one dir/two &&
test "$one" = $(git hash-object --stdin <one) &&
test "$two" = $(git hash-object --stdin <dir/two) &&
differs=$(git diff-index --cached HEAD) &&
verbose test -z "$differs"
fatal: no path specified
ok 42 - erroneous use of -- with --verbose
expecting success:
expect '' &&
test_check_ignore "--" 128 &&
stderr_contains "fatal: no path specified"
expecting success: test "" != "$files"
ok 4 - Racy GIT trial #1 part B
fatal: no path specified
ok 43 - erroneous use of -- with --verbose -n
expecting success:
expect '' &&
test_check_ignore "--" 128 &&
stderr_contains "fatal: no path specified"
expecting success: test "" != "$files"
ok 5 - Racy GIT trial #2 part A
ok 23 - --run a range and negation
expecting success:
run_sub_test_lib_test run-range-neg '--run range negation' --run='!1-3' <<-\EOF &&
for i in 1 2 3 4 5 6
do
test_expect_success "passing test #$i" 'true'
done
test_done
EOF
check_sub_test_lib_test run-range-neg <<-\EOF
> ok 1 # skip passing test #1 (--run)
> ok 2 # skip passing test #2 (--run)
> ok 3 # skip passing test #3 (--run)
> ok 4 - passing test #4
> ok 5 - passing test #5
> ok 6 - passing test #6
> # passed all 6 test(s)
> 1..6
EOF
fatal: no path specified
ok 44 - erroneous use of -- with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
fatal: cannot specify pathnames with --stdin
ok 11 - checkout with autocrlf=true
ok 45 - --stdin with superfluous arg
expecting success:
rm -f tmp one dir/two three &&
git config core.autocrlf input &&
git read-tree --reset -u HEAD &&
test_must_fail has_cr one &&
test_must_fail has_cr two &&
git update-index -- one dir/two &&
test "$one" = $(git hash-object --stdin <one) &&
test "$two" = $(git hash-object --stdin <dir/two) &&
differs=$(git diff-index --cached HEAD) &&
verbose test -z "$differs"
expecting success:
expect '' &&
test_check_ignore "--stdin foo" 128 &&
stderr_contains "fatal: cannot specify pathnames with --stdin"
fatal: cannot specify pathnames with --stdin
ok 46 - --stdin with superfluous arg with -q
expecting success:
expect '' &&
test_check_ignore "--stdin foo" 128 &&
stderr_contains "fatal: cannot specify pathnames with --stdin"
t0020-crlf.sh: 8: eval: cannot open two: No such file
fatal: cannot specify pathnames with --stdin
ok 47 - --stdin with superfluous arg with --quiet
expecting success:
expect '' &&
test_check_ignore "--stdin foo" 128 &&
stderr_contains "fatal: cannot specify pathnames with --stdin"
ok 12 - checkout with autocrlf=input
expecting success:
rm -f tmp one dir/two three &&
git config core.autocrlf input &&
git read-tree --reset -u HEAD &&
git apply patch.file &&
verbose test "$patched" = "$(git hash-object --stdin <one)"
fatal: cannot specify pathnames with --stdin
ok 48 - --stdin with superfluous arg with -v
expecting success:
expect '' &&
test_check_ignore "--stdin foo" 128 &&
stderr_contains "fatal: cannot specify pathnames with --stdin"
fatal: cannot specify pathnames with --stdin
ok 49 - --stdin with superfluous arg with -v -n
expecting success:
expect '' &&
test_check_ignore "--stdin foo" 128 &&
stderr_contains "fatal: cannot specify pathnames with --stdin"
ok 13 - apply patch (autocrlf=input)
expecting success:
rm -f tmp one dir/two three &&
git config core.autocrlf input &&
git read-tree --reset -u HEAD &&
git apply --cached patch.file &&
verbose test "$patched" = $(git rev-parse :one)
ok 24 - --run range negation
fatal: cannot specify pathnames with --stdin
expecting success:
run_sub_test_lib_test run-inc-neg-inc '--run include, exclude and include' --run='1-5 !1-3 2' <<-\EOF &&
for i in 1 2 3 4 5 6
do
test_expect_success "passing test #$i" 'true'
done
test_done
EOF
check_sub_test_lib_test run-inc-neg-inc <<-\EOF
> ok 1 # skip passing test #1 (--run)
> ok 2 - passing test #2
> ok 3 # skip passing test #3 (--run)
> ok 4 - passing test #4
> ok 5 - passing test #5
> ok 6 # skip passing test #6 (--run)
> # passed all 6 test(s)
> 1..6
EOF
ok 50 - --stdin with superfluous arg with -v --non-matching
expecting success:
expect '' &&
test_check_ignore "--stdin foo" 128 &&
stderr_contains "fatal: cannot specify pathnames with --stdin"
fatal: cannot specify pathnames with --stdin
ok 51 - --stdin with superfluous arg with --verbose
expecting success:
expect '' &&
test_check_ignore "--stdin foo" 128 &&
stderr_contains "fatal: cannot specify pathnames with --stdin"
ok 14 - apply patch --cached (autocrlf=input)
expecting success:
rm -f tmp one dir/two three &&
git config core.autocrlf input &&
git read-tree --reset -u HEAD &&
git apply --index patch.file &&
verbose test "$patched" = $(git rev-parse :one) &&
verbose test "$patched" = $(git hash-object --stdin <one)
fatal: cannot specify pathnames with --stdin
ok 52 - --stdin with superfluous arg with --verbose -n
expecting success:
expect '' &&
test_check_ignore "--stdin foo" 128 &&
stderr_contains "fatal: cannot specify pathnames with --stdin"
fatal: cannot specify pathnames with --stdin
ok 53 - --stdin with superfluous arg with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
fatal: cannot specify pathnames with --stdin
ok 54 - --stdin -z with superfluous arg
ok 15 - apply patch --index (autocrlf=input)
expecting success:
rm -f tmp one dir/two three &&
git config core.autocrlf true &&
git read-tree --reset -u HEAD &&
git apply patch.file &&
verbose test "$patched" = "$(remove_cr <one | git hash-object --stdin)"
expecting success:
expect '' &&
test_check_ignore "--stdin -z foo" 128 &&
stderr_contains "fatal: cannot specify pathnames with --stdin"
fatal: cannot specify pathnames with --stdin
ok 55 - --stdin -z with superfluous arg with -q
expecting success:
expect '' &&
test_check_ignore "--stdin -z foo" 128 &&
stderr_contains "fatal: cannot specify pathnames with --stdin"
ok 16 - apply patch (autocrlf=true)
expecting success:
rm -f tmp one dir/two three &&
git config core.autocrlf true &&
git read-tree --reset -u HEAD &&
git apply --cached patch.file &&
verbose test "$patched" = $(git rev-parse :one)
fatal: cannot specify pathnames with --stdin
ok 56 - --stdin -z with superfluous arg with --quiet
expecting success:
expect '' &&
test_check_ignore "--stdin -z foo" 128 &&
stderr_contains "fatal: cannot specify pathnames with --stdin"
fatal: cannot specify pathnames with --stdin
ok 57 - --stdin -z with superfluous arg with -v
expecting success:
expect '' &&
test_check_ignore "--stdin -z foo" 128 &&
stderr_contains "fatal: cannot specify pathnames with --stdin"
ok 17 - apply patch --cached (autocrlf=true)
expecting success:
rm -f tmp one dir/two three &&
git config core.autocrlf true &&
git read-tree --reset -u HEAD &&
git apply --index patch.file &&
verbose test "$patched" = $(git rev-parse :one) &&
verbose test "$patched" = "$(remove_cr <one | git hash-object --stdin)"
fatal: cannot specify pathnames with --stdin
ok 58 - --stdin -z with superfluous arg with -v -n
expecting success:
expect '' &&
test_check_ignore "--stdin -z foo" 128 &&
stderr_contains "fatal: cannot specify pathnames with --stdin"
ok 25 - --run include, exclude and include
expecting success:
run_sub_test_lib_test run-inc-neg-inc-comma '--run include, exclude and include, comma separated' --run=1-5,\!1-3,2 <<-\EOF &&
for i in 1 2 3 4 5 6
do
test_expect_success "passing test #$i" 'true'
done
test_done
EOF
check_sub_test_lib_test run-inc-neg-inc-comma <<-\EOF
> ok 1 # skip passing test #1 (--run)
> ok 2 - passing test #2
> ok 3 # skip passing test #3 (--run)
> ok 4 - passing test #4
> ok 5 - passing test #5
> ok 6 # skip passing test #6 (--run)
> # passed all 6 test(s)
> 1..6
EOF
fatal: cannot specify pathnames with --stdin
ok 59 - --stdin -z with superfluous arg with -v --non-matching
expecting success:
expect '' &&
test_check_ignore "--stdin -z foo" 128 &&
stderr_contains "fatal: cannot specify pathnames with --stdin"
fatal: cannot specify pathnames with --stdin
ok 60 - --stdin -z with superfluous arg with --verbose
expecting success:
expect '' &&
test_check_ignore "--stdin -z foo" 128 &&
stderr_contains "fatal: cannot specify pathnames with --stdin"
ok 18 - apply patch --index (autocrlf=true)
expecting success:
rm -f tmp one dir/two three &&
echo "two -crlf" >.gitattributes &&
git config core.autocrlf true &&
git read-tree --reset -u HEAD &&
test_must_fail has_cr dir/two &&
verbose has_cr one &&
test_must_fail has_cr three
fatal: cannot specify pathnames with --stdin
ok 61 - --stdin -z with superfluous arg with --verbose -n
expecting success:
expect '' &&
test_check_ignore "--stdin -z foo" 128 &&
stderr_contains "fatal: cannot specify pathnames with --stdin"
ok 19 - .gitattributes says two is binary
fatal: cannot specify pathnames with --stdin
expecting success:
rm -f tmp one dir/two three &&
echo "two crlf=input" >.gitattributes &&
git read-tree --reset -u HEAD &&
test_must_fail has_cr dir/two
ok 62 - --stdin -z with superfluous arg with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 20 - .gitattributes says two is input
expecting success:
rm -f tmp one dir/two three &&
echo "t* crlf" >.gitattributes &&
git read-tree --reset -u HEAD &&
verbose has_cr dir/two &&
verbose has_cr three
expecting success: test "" != "$files"
ok 6 - Racy GIT trial #2 part B
fatal: -z only makes sense with --stdin
ok 63 - -z without --stdin
expecting success:
expect '' &&
test_check_ignore "-z" 128 &&
stderr_contains "fatal: -z only makes sense with --stdin"
ok 21 - .gitattributes says two and three are text
expecting success:
echo "one -crlf" >>.gitattributes &&
git add .gitattributes &&
git commit -m "Add .gitattributes" &&
rm -rf tmp one dir .gitattributes patch.file three &&
git read-tree --reset -u HEAD &&
test_must_fail has_cr one &&
verbose has_cr three
expecting success: test "" != "$files"
ok 7 - Racy GIT trial #3 part A
fatal: -z only makes sense with --stdin
ok 64 - -z without --stdin with -q
expecting success:
expect '' &&
test_check_ignore "-z" 128 &&
stderr_contains "fatal: -z only makes sense with --stdin"
[master 3ee77c8] Add .gitattributes
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
create mode 100644 .gitattributes
fatal: -z only makes sense with --stdin
ok 65 - -z without --stdin with --quiet
expecting success:
expect '' &&
test_check_ignore "-z" 128 &&
stderr_contains "fatal: -z only makes sense with --stdin"
fatal: -z only makes sense with --stdin
ok 22 - in-tree .gitattributes (1)
ok 66 - -z without --stdin with -v
expecting success:
rm -rf tmp one dir .gitattributes patch.file three &&
git read-tree --reset HEAD &&
git checkout-index -f -q -u -a &&
test_must_fail has_cr one &&
verbose has_cr three
expecting success:
expect '' &&
test_check_ignore "-z" 128 &&
stderr_contains "fatal: -z only makes sense with --stdin"
fatal: -z only makes sense with --stdin
ok 67 - -z without --stdin with -v -n
expecting success:
expect '' &&
test_check_ignore "-z" 128 &&
stderr_contains "fatal: -z only makes sense with --stdin"
ok 23 - in-tree .gitattributes (2)
expecting success:
rm -rf tmp one dir .gitattributes patch.file three &&
git read-tree --reset HEAD &&
git checkout-index -u .gitattributes &&
git checkout-index -u one dir/two three &&
test_must_fail has_cr one &&
verbose has_cr three
ok 26 - --run include, exclude and include, comma separated
expecting success:
run_sub_test_lib_test run-neg-inc '--run exclude and include' --run='!3- 5' <<-\EOF &&
for i in 1 2 3 4 5 6
do
test_expect_success "passing test #$i" 'true'
done
test_done
EOF
check_sub_test_lib_test run-neg-inc <<-\EOF
> ok 1 - passing test #1
> ok 2 - passing test #2
> ok 3 # skip passing test #3 (--run)
> ok 4 # skip passing test #4 (--run)
> ok 5 - passing test #5
> ok 6 # skip passing test #6 (--run)
> # passed all 6 test(s)
> 1..6
EOF
fatal: -z only makes sense with --stdin
ok 68 - -z without --stdin with -v --non-matching
expecting success:
expect '' &&
test_check_ignore "-z" 128 &&
stderr_contains "fatal: -z only makes sense with --stdin"
fatal: -z only makes sense with --stdin
ok 69 - -z without --stdin with --verbose
expecting success:
expect '' &&
test_check_ignore "-z" 128 &&
stderr_contains "fatal: -z only makes sense with --stdin"
ok 24 - in-tree .gitattributes (3)
expecting success:
rm -rf tmp one dir .gitattributes patch.file three &&
git read-tree --reset HEAD &&
git checkout-index -u one dir/two three &&
git checkout-index -u .gitattributes &&
test_must_fail has_cr one &&
verbose has_cr three
fatal: -z only makes sense with --stdin
ok 70 - -z without --stdin with --verbose -n
expecting success:
expect '' &&
test_check_ignore "-z" 128 &&
stderr_contains "fatal: -z only makes sense with --stdin"
fatal: -z only makes sense with --stdin
ok 71 - -z without --stdin with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 25 - in-tree .gitattributes (4)
expecting success:
git config core.autocrlf true &&
git config --unset core.safecrlf &&
echo ".file2 -crlfQ" | q_to_cr >> .gitattributes &&
git add .gitattributes &&
git commit -m initial &&
echo ".file -crlfQ" | q_to_cr >> .gitattributes &&
echo "contents" > .file &&
git add .gitattributes .file &&
git commit -m second &&
git checkout master~1 &&
git checkout master &&
test "$(git diff-files --raw)" = ""
fatal: -z only makes sense with --stdin
ok 72 - -z without --stdin and superfluous arg
expecting success:
expect '' &&
test_check_ignore "-z foo" 128 &&
stderr_contains "fatal: -z only makes sense with --stdin"
fatal: -z only makes sense with --stdin
ok 73 - -z without --stdin and superfluous arg with -q
expecting success:
expect '' &&
test_check_ignore "-z foo" 128 &&
stderr_contains "fatal: -z only makes sense with --stdin"
[master 7fd7693] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
fatal: -z only makes sense with --stdin
ok 74 - -z without --stdin and superfluous arg with --quiet
expecting success:
expect '' &&
test_check_ignore "-z foo" 128 &&
stderr_contains "fatal: -z only makes sense with --stdin"
ok 27 - --run exclude and include
expecting success:
run_sub_test_lib_test run-empty-sel '--run empty selectors' --run='1,,3,,,5' <<-\EOF &&
for i in 1 2 3 4 5 6
do
test_expect_success "passing test #$i" 'true'
done
test_done
EOF
check_sub_test_lib_test run-empty-sel <<-\EOF
> ok 1 - passing test #1
> ok 2 # skip passing test #2 (--run)
> ok 3 - passing test #3
> ok 4 # skip passing test #4 (--run)
> ok 5 - passing test #5
> ok 6 # skip passing test #6 (--run)
> # passed all 6 test(s)
> 1..6
EOF
fatal: -z only makes sense with --stdin
ok 75 - -z without --stdin and superfluous arg with -v
expecting success:
expect '' &&
test_check_ignore "-z foo" 128 &&
stderr_contains "fatal: -z only makes sense with --stdin"
[master b6d33b1] second
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 .file
fatal: -z only makes sense with --stdin
ok 76 - -z without --stdin and superfluous arg with -v -n
expecting success:
expect '' &&
test_check_ignore "-z foo" 128 &&
stderr_contains "fatal: -z only makes sense with --stdin"
Note: checking out 'master~1'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 7fd7693... initial
Previous HEAD position was 7fd7693... initial
Switched to branch 'master'
fatal: -z only makes sense with --stdin
ok 77 - -z without --stdin and superfluous arg with -v --non-matching
expecting success:
expect '' &&
test_check_ignore "-z foo" 128 &&
stderr_contains "fatal: -z only makes sense with --stdin"
ok 26 - checkout with existing .gitattributes
expecting success:
git rm .gitattributes &&
echo "contentsQ" | q_to_cr > .file2 &&
git add .file2 &&
git commit -m third &&
git checkout master~1 &&
git checkout master &&
has_cr .file2
rm '.gitattributes'
fatal: -z only makes sense with --stdin
ok 78 - -z without --stdin and superfluous arg with --verbose
expecting success:
expect '' &&
test_check_ignore "-z foo" 128 &&
stderr_contains "fatal: -z only makes sense with --stdin"
fatal: -z only makes sense with --stdin
ok 79 - -z without --stdin and superfluous arg with --verbose -n
expecting success:
expect '' &&
test_check_ignore "-z foo" 128 &&
stderr_contains "fatal: -z only makes sense with --stdin"
[master df647ca] third
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 4 deletions(-)
create mode 100644 .file2
delete mode 100644 .gitattributes
Note: checking out 'master~1'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at b6d33b1... second
M three
fatal: -z only makes sense with --stdin
ok 80 - -z without --stdin and superfluous arg with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
Previous HEAD position was b6d33b1... second
Switched to branch 'master'
ok 27 - checkout when deleting .gitattributes
expecting success:
echo "three +crlf" >>.gitattributes &&
git diff
+crlf is not a valid attribute name: .gitattributes:1
diff --git a/three b/three
index 98efc5e..c5c386a 100644
Binary files a/three and b/three differ
fatal: This operation must be run in a work tree
ok 81 - needs work tree
ok 28 - invalid .gitattributes (must not crash)
expecting success:
git config core.autocrlf false &&
git config core.safecrlf false &&
rm -rf .????* * &&
for w in I am all LF; do echo $w; done >alllf &&
for w in Oh here is CRLFQ in text; do echo $w; done | q_to_cr >mixed &&
for w in I am all CRLF; do echo $w; done | append_cr >allcrlf &&
git add -A . &&
git commit -m "alllf, allcrlf and mixed only" &&
git tag -a -m "message" autocrlf-checkpoint
expecting success:
expect '' &&
(
cd .git &&
test_check_ignore "foo" 128
) &&
stderr_contains "fatal: This operation must be run in a work tree"
ok 28 - --run empty selectors
expecting success:
run_sub_test_lib_test_err run-inv-range-start '--run invalid range start' --run='a-5' <<-\EOF &&
test_expect_success "passing test #1" 'true'
test_done
EOF
check_sub_test_lib_test_err run-inv-range-start <<-\EOF_OUT 3<<-\EOF_ERR
> FATAL: Unexpected exit with code 1
EOF_OUT
> error: --run: invalid non-numeric in range start: 'a-5'
EOF_ERR
fatal: This operation must be run in a work tree
ok 82 - needs work tree with -q
expecting success:
expect '' &&
(
cd .git &&
test_check_ignore "foo" 128
) &&
stderr_contains "fatal: This operation must be run in a work tree"
fatal: This operation must be run in a work tree
ok 83 - needs work tree with --quiet
expecting success:
expect '' &&
(
cd .git &&
test_check_ignore "foo" 128
) &&
stderr_contains "fatal: This operation must be run in a work tree"
expecting success: test "" != "$files"
ok 8 - Racy GIT trial #3 part B
[master b9451be] alllf, allcrlf and mixed only
Author: A U Thor <author@example.com>
7 files changed, 8 insertions(+), 14 deletions(-)
delete mode 100644 .file
delete mode 100644 .file2
create mode 100644 allcrlf
create mode 100644 alllf
delete mode 100644 dir/two
rename three => mixed (57%)
delete mode 100644 one
fatal: This operation must be run in a work tree
ok 84 - needs work tree with -v
expecting success:
expect '' &&
(
cd .git &&
test_check_ignore "foo" 128
) &&
stderr_contains "fatal: This operation must be run in a work tree"
expecting success: test "" != "$files"
ok 9 - Racy GIT trial #4 part A
ok 29 - setting up for new autocrlf tests
expecting success:
git config core.autocrlf true &&
touch * &&
git diff --exit-code
fatal: This operation must be run in a work tree
ok 85 - needs work tree with -v -n
expecting success:
expect '' &&
(
cd .git &&
test_check_ignore "foo" 128
) &&
stderr_contains "fatal: This operation must be run in a work tree"
ok 30 - report no change after setting autocrlf
expecting success:
rm * &&
git checkout -f &&
git diff --exit-code
fatal: This operation must be run in a work tree
ok 86 - needs work tree with -v --non-matching
expecting success:
expect '' &&
(
cd .git &&
test_check_ignore "foo" 128
) &&
stderr_contains "fatal: This operation must be run in a work tree"
ok 29 - --run invalid range start
expecting success:
run_sub_test_lib_test_err run-inv-range-end '--run invalid range end' --run='1-z' <<-\EOF &&
test_expect_success "passing test #1" 'true'
test_done
EOF
check_sub_test_lib_test_err run-inv-range-end <<-\EOF_OUT 3<<-\EOF_ERR
> FATAL: Unexpected exit with code 1
EOF_OUT
> error: --run: invalid non-numeric in range end: '1-z'
EOF_ERR
ok 31 - files are clean after checkout
expecting success:
test "$(cr_to_Q_no_NL < alllf)" = "IQamQallQLFQ"
ok 32 - LF only file gets CRLF with autocrlf
expecting success:
test "$(cr_to_Q_no_NL < mixed)" = "OhhereisCRLFQintext"
fatal: This operation must be run in a work tree
ok 87 - needs work tree with --verbose
expecting success:
expect '' &&
(
cd .git &&
test_check_ignore "foo" 128
) &&
stderr_contains "fatal: This operation must be run in a work tree"
ok 33 - Mixed file is still mixed with autocrlf
expecting success:
test "$(cr_to_Q_no_NL < allcrlf)" = "IQamQallQCRLFQ"
ok 34 - CRLF only file has CRLF with autocrlf
expecting success:
tr -d "\015" < alllf | append_cr > alllf2 &&
git add alllf2 &&
git commit -m "alllf2 added" &&
git config core.autocrlf false &&
rm * &&
git checkout -f &&
test_cmp alllf alllf2
fatal: This operation must be run in a work tree
ok 88 - needs work tree with --verbose -n
expecting success:
expect '' &&
(
cd .git &&
test_check_ignore "foo" 128
) &&
stderr_contains "fatal: This operation must be run in a work tree"
[master a56ad6b] alllf2 added
Author: A U Thor <author@example.com>
1 file changed, 4 insertions(+)
create mode 100644 alllf2
fatal: This operation must be run in a work tree
ok 89 - needs work tree with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 35 - New CRLF file gets LF in repo
# passed all 35 test(s)
1..35
ok 90 - non-existent file at top-level not ignored
expecting success:
expect '' &&
test_check_ignore 'non-existent' 1
ok 30 - --run invalid range end
expecting success:
run_sub_test_lib_test_err run-inv-selector '--run invalid selector' --run='1?' <<-\EOF &&
test_expect_success "passing test #1" 'true'
test_done
EOF
check_sub_test_lib_test_err run-inv-selector <<-\EOF_OUT 3<<-\EOF_ERR
> FATAL: Unexpected exit with code 1
EOF_OUT
> error: --run: invalid non-numeric in test selector: '1?'
EOF_ERR
ok 91 - non-existent file at top-level not ignored with -q
expecting success:
expect '' &&
test_check_ignore 'non-existent' 1
*** t0021-conversion.sh ***
ok 92 - non-existent file at top-level not ignored with --quiet
expecting success:
expect '' &&
test_check_ignore 'non-existent' 1
ok 93 - non-existent file at top-level not ignored with -v
expecting success:
expect ':: non-existent' &&
test_check_ignore 'non-existent' 1
ok 94 - non-existent file at top-level not ignored with -v -n
expecting success:
expect ':: non-existent' &&
test_check_ignore 'non-existent' 1
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0021-conversion/.git/
ok 95 - non-existent file at top-level not ignored with -v --non-matching
expecting success:
expect '' &&
test_check_ignore 'non-existent' 1
expecting success:
git config filter.rot13.smudge ./rot13.sh &&
git config filter.rot13.clean ./rot13.sh &&
{
echo "*.t filter=rot13"
echo "*.i ident"
} >.gitattributes &&
{
echo a b c d e f g h i j k l m
echo n o p q r s t u v w x y z
echo '$Id$'
} >test &&
cat test >test.t &&
cat test >test.o &&
cat test >test.i &&
git add test test.t test.i &&
rm -f test test.t test.i &&
git checkout -- test test.t test.i
ok 96 - non-existent file at top-level not ignored with --verbose
ok 31 - --run invalid selector
expecting success:
expect ':: non-existent' &&
test_check_ignore 'non-existent' 1
expecting success:
test_have_prereq HAVEIT &&
haveit=yes
ok 32 - test runs if prerequisite is satisfied
skipping test: unmet prerequisite causes test to be skipped
donthaveit=no
ok 33 # skip unmet prerequisite causes test to be skipped (missing DONTHAVEIT)
expecting success:
test_have_prereq HAVEIT &&
test_have_prereq HAVETHIS &&
haveit=yes
ok 34 - test runs if prerequisites are satisfied
skipping test: unmet prerequisites causes test to be skipped
donthaveit=no
ok 35 # skip unmet prerequisites causes test to be skipped (missing DONTHAVEIT of HAVEIT,DONTHAVEIT)
skipping test: unmet prerequisites causes test to be skipped
donthaveiteither=no
ok 36 # skip unmet prerequisites causes test to be skipped (missing DONTHAVEIT of DONTHAVEIT,HAVEIT)
checking prerequisite: LAZY_TRUE
ok 97 - non-existent file at top-level not ignored with --verbose -n
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&true
)
expecting success:
expect ':: non-existent' &&
test_check_ignore 'non-existent' 1
prerequisite LAZY_TRUE ok
expecting success:
havetrue=yes
ok 37 - test runs if lazy prereq is satisfied
skipping test: missing lazy prereqs skip tests
donthavetrue=no
ok 38 # skip missing lazy prereqs skip tests (missing !LAZY_TRUE)
checking prerequisite: LAZY_FALSE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&false
)
ok 98 - non-existent file at top-level not ignored with --verbose --non-matching
prerequisite LAZY_FALSE not satisfied
expecting success:
nothavefalse=yes
ok 39 - negative lazy prereqs checked
expecting success:
expect "$expect" &&
eval "$code"
skipping test: missing negative lazy prereqs will skip
havefalse=no
ok 40 # skip missing negative lazy prereqs will skip (missing LAZY_FALSE)
expecting success:
test_when_finished clean=yes
ok 41 - tests clean up after themselves
ok 1 - setup
expecting success:
cmp test.o test &&
cmp test.o test.t &&
# ident should be stripped in the repository
git diff --raw --exit-code :test :test.i &&
id=$(git rev-parse --verify :test) &&
embedded=$(sed -ne "$script" test.i) &&
test "z$id" = "z$embedded" &&
git cat-file blob :test.t > test.r &&
./rot13.sh < test.o > test.t &&
cmp test.r test.t
expecting success:
test_must_fail run_sub_test_lib_test failing-cleanup 'Failing tests with cleanup commands' <<-\EOF &&
test_expect_success 'tests clean up even after a failure' '
touch clean-after-failure &&
test_when_finished rm clean-after-failure &&
(exit 1)
'
test_expect_success 'failure to clean up causes the test to fail' '
test_when_finished "(exit 2)"
'
test_done
EOF
check_sub_test_lib_test failing-cleanup <<-\EOF
> not ok 1 - tests clean up even after a failure
> # Z
> # touch clean-after-failure &&
> # test_when_finished rm clean-after-failure &&
> # (exit 1)
> # Z
> not ok 2 - failure to clean up causes the test to fail
> # Z
> # test_when_finished "(exit 2)"
> # Z
> # failed 2 among 2 test(s)
> 1..2
EOF
ok 99 - non-existent file at top-level not ignored with --no-index
expecting success:
expect '' &&
test_check_ignore 'non-existent' 1
ok 100 - non-existent file at top-level not ignored with --no-index -q
expecting success:
expect '' &&
test_check_ignore 'non-existent' 1
ok 2 - check
expecting success:
{
echo "File with expanded keywords"
echo "\$Id\$"
echo "\$Id:\$"
echo "\$Id: 0000000000000000000000000000000000000000 \$"
echo "\$Id: NoSpaceAtEnd\$"
echo "\$Id:NoSpaceAtFront \$"
echo "\$Id:NoSpaceAtEitherEnd\$"
echo "\$Id: NoTerminatingSymbol"
echo "\$Id: Foreign Commit With Spaces \$"
} >expanded-keywords.0 &&
{
cat expanded-keywords.0 &&
printf "\$Id: NoTerminatingSymbolAtEOF"
} >expanded-keywords &&
cat expanded-keywords >expanded-keywords-crlf &&
git add expanded-keywords expanded-keywords-crlf &&
git commit -m "File with keywords expanded" &&
id=$(git rev-parse --verify :expanded-keywords) &&
{
echo "File with expanded keywords"
echo "\$Id: $id \$"
echo "\$Id: $id \$"
echo "\$Id: $id \$"
echo "\$Id: $id \$"
echo "\$Id: $id \$"
echo "\$Id: $id \$"
echo "\$Id: NoTerminatingSymbol"
echo "\$Id: Foreign Commit With Spaces \$"
} >expected-output.0 &&
{
cat expected-output.0 &&
printf "\$Id: NoTerminatingSymbolAtEOF"
} >expected-output &&
{
append_cr <expected-output.0 &&
printf "\$Id: NoTerminatingSymbolAtEOF"
} >expected-output-crlf &&
{
echo "expanded-keywords ident"
echo "expanded-keywords-crlf ident text eol=crlf"
} >>.gitattributes &&
rm -f expanded-keywords expanded-keywords-crlf &&
git checkout -- expanded-keywords &&
test_cmp expanded-keywords expected-output &&
git checkout -- expanded-keywords-crlf &&
test_cmp expanded-keywords-crlf expected-output-crlf
ok 101 - non-existent file at top-level not ignored with --no-index --quiet
expecting success:
expect '' &&
test_check_ignore 'non-existent' 1
ok 102 - non-existent file at top-level not ignored with --no-index -v
expecting success:
expect ':: non-existent' &&
test_check_ignore 'non-existent' 1
ok 103 - non-existent file at top-level not ignored with --no-index -v -n
expecting success:
expect ':: non-existent' &&
test_check_ignore 'non-existent' 1
[master (root-commit) 83be45d] File with keywords expanded
Author: A U Thor <author@example.com>
5 files changed, 29 insertions(+)
create mode 100644 expanded-keywords
create mode 100644 expanded-keywords-crlf
create mode 100644 test
create mode 100644 test.i
create mode 100644 test.t
ok 104 - non-existent file at top-level not ignored with --no-index -v --non-matching
expecting success:
expect '' &&
test_check_ignore 'non-existent' 1
ok 105 - non-existent file at top-level not ignored with --no-index --verbose
expecting success:
expect ':: non-existent' &&
test_check_ignore 'non-existent' 1
ok 42 - tests clean up even on failures
expecting success:
test_must_fail git update-index should-be-empty
error: should-be-empty: cannot add to the index - missing --add option?
fatal: Unable to process path should-be-empty
ok 43 - git update-index without --add should fail adding
expecting success:
git update-index --add should-be-empty
ok 106 - non-existent file at top-level not ignored with --no-index --verbose -n
expecting success:
expect ':: non-existent' &&
test_check_ignore 'non-existent' 1
ok 3 - expanded_in_repo
ok 44 - git update-index with --add should succeed
expecting success:
tree=$(git write-tree)
expecting success:
cat >argc.sh <<-EOF &&
#!$SHELL_PATH
cat >/dev/null
echo argc: \$# "\$@"
EOF
normal=name-no-magic &&
special="name with 'sq' and \$x" &&
echo some test text >"$normal" &&
echo some test text >"$special" &&
git add "$normal" "$special" &&
git commit -q -m "add files" &&
echo "name* filter=argc" >.gitattributes &&
# delete the files and check them out again, using a smudge filter
# that will count the args and echo the command-line back to us
git config filter.argc.smudge "sh ./argc.sh %f" &&
rm "$normal" "$special" &&
git checkout -- "$normal" "$special" &&
# make sure argc.sh counted the right number of args
echo "argc: 1 $normal" >expect &&
test_cmp expect "$normal" &&
echo "argc: 1 $special" >expect &&
test_cmp expect "$special" &&
# do the same thing, but with more args in the filter expression
git config filter.argc.smudge "sh ./argc.sh %f --my-extra-arg" &&
rm "$normal" "$special" &&
git checkout -- "$normal" "$special" &&
# make sure argc.sh counted the right number of args
echo "argc: 2 $normal --my-extra-arg" >expect &&
test_cmp expect "$normal" &&
echo "argc: 2 $special --my-extra-arg" >expect &&
test_cmp expect "$special" &&
:
expecting success: test "" != "$files"
ok 10 - Racy GIT trial #4 part B
ok 45 - writing tree out with git write-tree
expecting success:
test "$tree" = 7bb943559a305bdd6bdee2cef6e5df2413c3d30a
ok 107 - non-existent file at top-level not ignored with --no-index --verbose --non-matching
ok 46 - validate object ID of a known tree
expecting success:
rm -f should-be-empty full-of-directories &&
test_must_fail git update-index should-be-empty
# passed all 10 test(s)
1..10
expecting success:
expect "$expect" &&
eval "$code"
error: should-be-empty: does not exist and --remove not passed
fatal: Unable to process path should-be-empty
ok 47 - git update-index without --remove should fail removing
expecting success:
git update-index --remove should-be-empty
*** t0022-crlf-rename.sh ***
ok 48 - git update-index with --remove should be able to remove
expecting success:
tree=$(git write-tree)
ok 108 - non-existent file at top-level ignored
ok 49 - git write-tree should be able to write an empty tree
expecting success:
test "$tree" = 4b825dc642cb6eb9a060e54bf8d69288fbee4904
expecting success:
expect '' &&
test_check_ignore 'one'
ok 50 - validate object ID of a known tree
expecting success:
mkdir path2 path3 path3/subp3 &&
paths="path0 path2/file2 path3/file3 path3/subp3/file3" &&
(
for p in $paths
do
echo "hello $p" >$p || exit 1
test_ln_s_add "hello $p" ${p}sym || exit 1
done
) &&
find path* ! -type d -print | xargs git update-index --add
checking prerequisite: SYMLINKS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# test whether the filesystem supports symbolic links
ln -s x y && test -h y
)
prerequisite SYMLINKS ok
ok 109 - non-existent file at top-level ignored with -q
expecting success:
expect '' &&
test_check_ignore 'one'
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0022-crlf-rename/.git/
expecting success:
cat "$TEST_DIRECTORY"/t0022-crlf-rename.sh >sample &&
git add sample &&
test_tick &&
git commit -m Initial &&
append_cr <"$TEST_DIRECTORY"/t0022-crlf-rename.sh >elpmas &&
git add elpmas &&
rm -f sample &&
test_tick &&
git commit -a -m Second
ok 110 - non-existent file at top-level ignored with --quiet
expecting success:
expect '.gitignore:1:one one' &&
test_check_ignore 'one'
ok 111 - non-existent file at top-level ignored with -v
expecting success:
expect '.gitignore:1:one one' &&
test_check_ignore 'one'
[master (root-commit) 6ee20c2] Initial
Author: A U Thor <author@example.com>
1 file changed, 33 insertions(+)
create mode 100644 sample
ok 4 - filter shell-escaped filenames
expecting success:
git config filter.required.smudge ./rot13.sh &&
git config filter.required.clean ./rot13.sh &&
git config filter.required.required true &&
echo "*.r filter=required" >.gitattributes &&
cat test.o >test.r &&
git add test.r &&
rm -f test.r &&
git checkout -- test.r &&
cmp test.o test.r &&
./rot13.sh <test.o >expected &&
git cat-file blob :test.r >actual &&
cmp expected actual
ok 112 - non-existent file at top-level ignored with -v -n
expecting success:
expect '.gitignore:1:one one' &&
test_check_ignore 'one'
ok 51 - adding various types of objects with git update-index --add
expecting success:
git ls-files --stage >current
ok 113 - non-existent file at top-level ignored with -v --non-matching
expecting success:
expect '.gitignore:1:one one' &&
test_check_ignore 'one'
[master d248b45] Second
Author: A U Thor <author@example.com>
1 file changed, 33 insertions(+), 33 deletions(-)
rename sample => elpmas (94%)
ok 1 - setup
ok 52 - showing stage with git ls-files --stage
expecting success:
git diff-tree -M -r --name-status HEAD^ HEAD |
sed -e "s/R[0-9]*/RNUM/" >actual &&
echo "RNUM sample elpmas" >expect &&
test_cmp expect actual
expecting success:
cat >expected <<-\EOF &&
100644 f87290f8eb2cbbea7857214459a0739927eab154 0 path0
120000 15a98433ae33114b085f3eb3bb03b832b3180a01 0 path0sym
100644 3feff949ed00a62d9f7af97c15cd8a30595e7ac7 0 path2/file2
120000 d8ce161addc5173867a3c3c730924388daedbc38 0 path2/file2sym
100644 0aa34cae68d0878578ad119c86ca2b5ed5b28376 0 path3/file3
120000 8599103969b43aff7e430efea79ca4636466794f 0 path3/file3sym
100644 00fb5908cb97c2564a9783c0c64087333b3b464f 0 path3/subp3/file3
120000 6649a1ebe9e9f1c553b66f5a6e74136a07ccc57c 0 path3/subp3/file3sym
EOF
test_cmp expected current
ok 53 - validate git ls-files output for a known tree
expecting success:
tree=$(git write-tree)
ok 114 - non-existent file at top-level ignored with --verbose
expecting success:
expect '.gitignore:1:one one' &&
test_check_ignore 'one'
ok 2 - diff -M
# passed all 2 test(s)
1..2
ok 54 - writing tree out with git write-tree
expecting success:
test "$tree" = 087704a96baf1c2d1c869a8b084481e121c88b5b
ok 55 - validate object ID for a known tree
expecting success:
git ls-tree $tree >current
ok 115 - non-existent file at top-level ignored with --verbose -n
expecting success:
expect '.gitignore:1:one one' &&
test_check_ignore 'one'
ok 56 - showing tree with git ls-tree
expecting success:
cat >expected <<-\EOF &&
100644 blob f87290f8eb2cbbea7857214459a0739927eab154 path0
120000 blob 15a98433ae33114b085f3eb3bb03b832b3180a01 path0sym
040000 tree 58a09c23e2ca152193f2786e06986b7b6712bdbe path2
040000 tree 21ae8269cacbe57ae09138dcc3a2887f904d02b3 path3
EOF
test_cmp expected current
ok 57 - git ls-tree output for a known tree
expecting success:
git ls-tree -r $tree >current
*** t0023-crlf-am.sh ***
ok 116 - non-existent file at top-level ignored with --verbose --non-matching
ok 5 - required filter should filter data
ok 58 - showing tree with git ls-tree -r
expecting success:
git config filter.failsmudge.smudge false &&
git config filter.failsmudge.clean cat &&
git config filter.failsmudge.required true &&
echo "*.fs filter=failsmudge" >.gitattributes &&
echo test >test.fs &&
git add test.fs &&
rm -f test.fs &&
test_must_fail git checkout -- test.fs
expecting success:
cat >expected <<-\EOF &&
100644 blob f87290f8eb2cbbea7857214459a0739927eab154 path0
120000 blob 15a98433ae33114b085f3eb3bb03b832b3180a01 path0sym
100644 blob 3feff949ed00a62d9f7af97c15cd8a30595e7ac7 path2/file2
120000 blob d8ce161addc5173867a3c3c730924388daedbc38 path2/file2sym
100644 blob 0aa34cae68d0878578ad119c86ca2b5ed5b28376 path3/file3
120000 blob 8599103969b43aff7e430efea79ca4636466794f path3/file3sym
100644 blob 00fb5908cb97c2564a9783c0c64087333b3b464f path3/subp3/file3
120000 blob 6649a1ebe9e9f1c553b66f5a6e74136a07ccc57c path3/subp3/file3sym
EOF
test_cmp expected current
ok 59 - git ls-tree -r output for a known tree
expecting success:
git ls-tree -r -t $tree >current
expecting success:
expect "$expect" &&
eval "$code"
ok 60 - showing tree with git ls-tree -r -t
expecting success:
cat >expected <<-\EOF &&
100644 blob f87290f8eb2cbbea7857214459a0739927eab154 path0
120000 blob 15a98433ae33114b085f3eb3bb03b832b3180a01 path0sym
040000 tree 58a09c23e2ca152193f2786e06986b7b6712bdbe path2
100644 blob 3feff949ed00a62d9f7af97c15cd8a30595e7ac7 path2/file2
120000 blob d8ce161addc5173867a3c3c730924388daedbc38 path2/file2sym
040000 tree 21ae8269cacbe57ae09138dcc3a2887f904d02b3 path3
100644 blob 0aa34cae68d0878578ad119c86ca2b5ed5b28376 path3/file3
120000 blob 8599103969b43aff7e430efea79ca4636466794f path3/file3sym
040000 tree 3c5e5399f3a333eddecce7a9b9465b63f65f51e2 path3/subp3
100644 blob 00fb5908cb97c2564a9783c0c64087333b3b464f path3/subp3/file3
120000 blob 6649a1ebe9e9f1c553b66f5a6e74136a07ccc57c path3/subp3/file3sym
EOF
test_cmp expected current
ok 61 - git ls-tree -r output for a known tree
expecting success:
ptree=$(git write-tree --prefix=path3)
ok 117 - non-existent file at top-level ignored with --no-index
expecting success:
expect '' &&
test_check_ignore 'one'
ok 62 - writing partial tree out with git write-tree --prefix
expecting success:
test "$ptree" = 21ae8269cacbe57ae09138dcc3a2887f904d02b3
ok 63 - validate object ID for a known tree
expecting success:
ptree=$(git write-tree --prefix=path3/subp3)
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0023-crlf-am/.git/
ok 64 - writing partial tree out with git write-tree --prefix
expecting success:
test "$ptree" = 3c5e5399f3a333eddecce7a9b9465b63f65f51e2
ok 65 - validate object ID for a known tree
expecting success:
rm -f .git/index &&
cat >badobjects <<-\EOF &&
100644 blob 1000000000000000000000000000000000000000 dir/file1
100644 blob 2000000000000000000000000000000000000000 dir/file2
100644 blob 3000000000000000000000000000000000000000 dir/file3
100644 blob 4000000000000000000000000000000000000000 dir/file4
100644 blob 5000000000000000000000000000000000000000 dir/file5
EOF
git update-index --index-info <badobjects
ok 118 - non-existent file at top-level ignored with --no-index -q
expecting success:
expect '' &&
test_check_ignore 'one'
error: external filter false failed 1
error: external filter false failed
fatal: test.fs: smudge filter failsmudge failed
ok 6 - required filter smudge failure
expecting success:
git config core.autocrlf true &&
echo foo >bar &&
git add bar &&
test_tick &&
git commit -m initial
expecting success:
git config filter.failclean.smudge cat &&
git config filter.failclean.clean false &&
git config filter.failclean.required true &&
echo "*.fc filter=failclean" >.gitattributes &&
echo test >test.fc &&
test_must_fail git add test.fc
ok 66 - put invalid objects into the index
expecting success:
test_must_fail git write-tree
warning: LF will be replaced by CRLF in bar.
The file will have its original line endings in your working directory.
ok 119 - non-existent file at top-level ignored with --no-index --quiet
expecting success:
expect '.gitignore:1:one one' &&
test_check_ignore 'one'
error: invalid object 100644 1000000000000000000000000000000000000000 for 'dir/file1'
fatal: git-write-tree: error building trees
ok 67 - writing this tree without --missing-ok
expecting success:
git write-tree --missing-ok
851a367613bb6e1f0b2b518323eafed530b5b4c4
ok 68 - writing this tree with --missing-ok
expecting success:
rm -f .git/index &&
git read-tree $tree &&
test -f .git/index &&
newtree=$(git write-tree) &&
test "$newtree" = "$tree"
ok 120 - non-existent file at top-level ignored with --no-index -v
expecting success:
expect '.gitignore:1:one one' &&
test_check_ignore 'one'
error: external filter false failed 1
error: external filter false failed
fatal: test.fc: clean filter 'failclean' failed
warning: LF will be replaced by CRLF in bar.
The file will have its original line endings in your working directory.
ok 7 - required filter clean failure
expecting success:
git config filter.devnull.clean "cat >/dev/null" &&
git config filter.devnull.required true &&
for i in $(test_seq 1 30); do printf "%1048576d" 1; done >30MB &&
echo "30MB filter=devnull" >.gitattributes &&
GIT_MMAP_LIMIT=1m GIT_ALLOC_LIMIT=1m git add 30MB
[master (root-commit) 1adb513] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
ok 1 - setup
expecting success:
git am -3 <patchfile &&
git diff-files --name-status --exit-code
ok 121 - non-existent file at top-level ignored with --no-index -v -n
ok 69 - git read-tree followed by write-tree should be idempotent
expecting success:
expect '.gitignore:1:one one' &&
test_check_ignore 'one'
expecting success:
cat >expected <<\EOF &&
:100644 100644 f87290f8eb2cbbea7857214459a0739927eab154 0000000000000000000000000000000000000000 M path0
:120000 120000 15a98433ae33114b085f3eb3bb03b832b3180a01 0000000000000000000000000000000000000000 M path0sym
:100644 100644 3feff949ed00a62d9f7af97c15cd8a30595e7ac7 0000000000000000000000000000000000000000 M path2/file2
:120000 120000 d8ce161addc5173867a3c3c730924388daedbc38 0000000000000000000000000000000000000000 M path2/file2sym
:100644 100644 0aa34cae68d0878578ad119c86ca2b5ed5b28376 0000000000000000000000000000000000000000 M path3/file3
:120000 120000 8599103969b43aff7e430efea79ca4636466794f 0000000000000000000000000000000000000000 M path3/file3sym
:100644 100644 00fb5908cb97c2564a9783c0c64087333b3b464f 0000000000000000000000000000000000000000 M path3/subp3/file3
:120000 120000 6649a1ebe9e9f1c553b66f5a6e74136a07ccc57c 0000000000000000000000000000000000000000 M path3/subp3/file3sym
EOF
git diff-files >current &&
test_cmp current expected
Applying: test1
ok 122 - non-existent file at top-level ignored with --no-index -v --non-matching
expecting success:
expect '.gitignore:1:one one' &&
test_check_ignore 'one'
ok 70 - validate git diff-files output for a know cache/work tree state
expecting success:
git update-index --refresh
ok 71 - git update-index --refresh should succeed
expecting success:
git diff-files >current &&
cmp -s current /dev/null
ok 123 - non-existent file at top-level ignored with --no-index --verbose
expecting success:
expect '.gitignore:1:one one' &&
test_check_ignore 'one'
ok 72 - no diff after checkout and git update-index --refresh
expecting success:
commit0=$(echo NO | git commit-tree $P) &&
tree=$(git show --pretty=raw $commit0 |
sed -n -e "s/^tree //p" -e "/^author /q") &&
test "z$tree" = "z$P"
ok 2 - am
# passed all 2 test(s)
1..2
ok 124 - non-existent file at top-level ignored with --no-index --verbose -n
expecting success:
expect '.gitignore:1:one one' &&
test_check_ignore 'one'
ok 73 - git commit-tree records the correct tree in a commit
expecting success:
commit1=$(echo NO | git commit-tree $P -p $commit0) &&
parent=$(git show --pretty=raw $commit1 |
sed -n -e "s/^parent //p" -e "/^author /q") &&
test "z$commit0" = "z$parent"
*** t0024-crlf-archive.sh ***
ok 125 - non-existent file at top-level ignored with --no-index --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 74 - git commit-tree records the correct parent in a commit
expecting success:
commit2=$(echo NO | git commit-tree $P -p $commit0 -p $commit0) &&
parent=$(git show --pretty=raw $commit2 |
sed -n -e "s/^parent //p" -e "/^author /q" |
sort -u) &&
test "z$commit0" = "z$parent" &&
numparent=$(git show --pretty=raw $commit2 |
sed -n -e "s/^parent //p" -e "/^author /q" |
wc -l) &&
test $numparent = 1
error: duplicate parent f6d63b3f53a780586f4c31f1a602f23063a92842 ignored
ok 126 - existing untracked file at top-level not ignored
expecting success:
expect '' &&
test_check_ignore 'not-ignored' 1
ok 127 - existing untracked file at top-level not ignored with -q
ok 75 - git commit-tree omits duplicated parent in a commit
expecting success:
expect '' &&
test_check_ignore 'not-ignored' 1
expecting success:
mv path0 tmp &&
mv path2 path0 &&
mv tmp path2 &&
git update-index --add --replace path2 path0/file2 &&
numpath0=$(git ls-files path0 | wc -l) &&
test $numpath0 = 1
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0024-crlf-archive/.git/
expecting success:
git config core.autocrlf true &&
printf "CRLF line ending\r\nAnd another\r\n" > sample &&
git add sample &&
test_tick &&
git commit -m Initial
ok 128 - existing untracked file at top-level not ignored with --quiet
expecting success:
expect '' &&
test_check_ignore 'not-ignored' 1
ok 76 - update-index D/F conflict
expecting success:
a=a && # 1
a=$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a && # 16
a=$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a && # 256
a=$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a$a && # 4096
a=${a}q &&
>path4 &&
git update-index --add path4 &&
(
git ls-files -s path4 |
sed -e "s/ .*/ /" |
tr -d "\012"
echo "$a"
) | git update-index --index-info &&
len=$(git ls-files "a*" | wc -c) &&
test $len = 4098
ok 129 - existing untracked file at top-level not ignored with -v
expecting success:
expect ':: not-ignored' &&
test_check_ignore 'not-ignored' 1
[master (root-commit) 4f7f1aa] Initial
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
create mode 100644 sample
ok 1 - setup
expecting success:
git archive --format=tar HEAD |
( mkdir untarred && cd untarred && "$TAR" -xf - ) &&
test_cmp sample untarred/sample
ok 130 - existing untracked file at top-level not ignored with -v -n
expecting success:
expect ':: not-ignored' &&
test_check_ignore 'not-ignored' 1
ok 77 - very long name in the index handled sanely
ok 2 - tar archive
checking prerequisite: UNZIP
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
"$GIT_UNZIP" -v
test $? -ne 127
)
# passed all 77 test(s)
1..77
ok 131 - existing untracked file at top-level not ignored with -v --non-matching
expecting success:
expect '' &&
test_check_ignore 'not-ignored' 1
UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.
Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.
Compiled with gcc 5.2.1 20151028 for Unix (Linux ELF).
UnZip special compilation options:
ACORN_FTYPE_NFS
COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)
SET_DIR_ATTRIB
SYMLINKS (symbolic links supported, if RTL and file system permit)
TIMESTAMP
UNIXBACKUP
USE_EF_UT_TIME
USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported)
USE_DEFLATE64 (PKZIP 4.x Deflate64(tm) supported)
UNICODE_SUPPORT [wide-chars, char coding: other] (handle UTF-8 paths)
LARGE_FILE_SUPPORT (large files over 2 GiB supported)
ZIP64_SUPPORT (archives using Zip64 for large files supported)
USE_BZIP2 (PKZIP 4.6+, using bzip2 lib version 1.0.6, 6-Sept-2010)
VMS_TEXT_CONV
WILD_STOP_AT_DIR
[decryption, version 2.11 of 05 Jan 2007]
UnZip and ZipInfo environment options:
UNZIP: [none]
UNZIPOPT: [none]
ZIPINFO: [none]
ZIPINFOOPT: [none]
prerequisite UNZIP ok
expecting success:
git archive --format=zip HEAD >test.zip &&
( mkdir unzipped && cd unzipped && "$GIT_UNZIP" ../test.zip ) &&
test_cmp sample unzipped/sample
ok 132 - existing untracked file at top-level not ignored with --verbose
expecting success:
expect ':: not-ignored' &&
test_check_ignore 'not-ignored' 1
ok 133 - existing untracked file at top-level not ignored with --verbose -n
expecting success:
expect ':: not-ignored' &&
test_check_ignore 'not-ignored' 1
Archive: ../test.zip
4f7f1aaec1ee996d8f5e13c2cfbd43a378578e1f
extracting: sample
ok 3 - zip archive
# passed all 3 test(s)
1..3
ok 134 - existing untracked file at top-level not ignored with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
*** t0025-crlf-auto.sh ***
ok 135 - existing untracked file at top-level not ignored with --no-index
expecting success:
expect '' &&
test_check_ignore 'not-ignored' 1
ok 136 - existing untracked file at top-level not ignored with --no-index -q
expecting success:
expect '' &&
test_check_ignore 'not-ignored' 1
*** t0026-eol-config.sh ***
ok 137 - existing untracked file at top-level not ignored with --no-index --quiet
expecting success:
expect '' &&
test_check_ignore 'not-ignored' 1
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0025-crlf-auto/.git/
ok 138 - existing untracked file at top-level not ignored with --no-index -v
expecting success:
expect ':: not-ignored' &&
test_check_ignore 'not-ignored' 1
expecting success:
git config core.autocrlf false &&
for w in Hello world how are you; do echo $w; done >LFonly &&
for w in I am very very fine thank you; do echo ${w}Q; done | q_to_cr >CRLFonly &&
for w in Oh here is a QNUL byte how alarming; do echo ${w}; done | q_to_nul >LFwithNUL &&
git add . &&
git commit -m initial &&
LFonly=$(git rev-parse HEAD:LFonly) &&
CRLFonly=$(git rev-parse HEAD:CRLFonly) &&
LFwithNUL=$(git rev-parse HEAD:LFwithNUL) &&
echo happy.
ok 139 - existing untracked file at top-level not ignored with --no-index -v -n
expecting success:
expect ':: not-ignored' &&
test_check_ignore 'not-ignored' 1
ok 140 - existing untracked file at top-level not ignored with --no-index -v --non-matching
expecting success:
expect '' &&
test_check_ignore 'not-ignored' 1
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0026-eol-config/.git/
expecting success:
git config core.autocrlf false &&
echo "one text" > .gitattributes &&
for w in Hello world how are you; do echo $w; done >one &&
for w in I am very very fine thank you; do echo $w; done >two &&
git add . &&
git commit -m initial &&
one=$(git rev-parse HEAD:one) &&
two=$(git rev-parse HEAD:two) &&
echo happy.
ok 141 - existing untracked file at top-level not ignored with --no-index --verbose
expecting success:
expect ':: not-ignored' &&
test_check_ignore 'not-ignored' 1
[master (root-commit) bbb85a9] initial
Author: A U Thor <author@example.com>
3 files changed, 12 insertions(+)
create mode 100644 CRLFonly
create mode 100644 LFonly
create mode 100644 LFwithNUL
ok 142 - existing untracked file at top-level not ignored with --no-index --verbose -n
expecting success:
expect ':: not-ignored' &&
test_check_ignore 'not-ignored' 1
[master (root-commit) fb1998c] initial
Author: A U Thor <author@example.com>
3 files changed, 13 insertions(+)
create mode 100644 .gitattributes
create mode 100644 one
create mode 100644 two
ok 143 - existing untracked file at top-level not ignored with --no-index --verbose --non-matching
happy.
ok 1 - setup
expecting success:
rm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&
git read-tree --reset -u HEAD &&
! has_cr LFonly &&
has_cr CRLFonly &&
LFonlydiff=$(git diff LFonly) &&
CRLFonlydiff=$(git diff CRLFonly) &&
LFwithNULdiff=$(git diff LFwithNUL) &&
test -z "$LFonlydiff" -a -z "$CRLFonlydiff" -a -z "$LFwithNULdiff"
happy.
ok 1 - setup
expecting success:
rm -f .gitattributes tmp one two &&
git config core.eol lf &&
git read-tree --reset -u HEAD &&
! has_cr one &&
! has_cr two &&
onediff=$(git diff one) &&
twodiff=$(git diff two) &&
test -z "$onediff" && test -z "$twodiff"
expecting success:
expect "$expect" &&
eval "$code"
ok 144 - existing tracked file at top-level not ignored
expecting success:
expect '' &&
test_check_ignore 'ignored-but-in-index' 1
ok 145 - existing tracked file at top-level not ignored with -q
expecting success:
expect '' &&
test_check_ignore 'ignored-but-in-index' 1
ok 2 - default settings cause no changes
expecting success:
# Backwards compatibility check
rm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&
echo "CRLFonly crlf" > .gitattributes &&
git read-tree --reset -u HEAD &&
# Note, "normalized" means that git will normalize it if added
has_cr CRLFonly &&
CRLFonlydiff=$(git diff CRLFonly) &&
test -n "$CRLFonlydiff"
ok 2 - eol=lf puts LFs in normalized file
expecting success:
rm -f .gitattributes tmp one two &&
git config core.eol crlf &&
git read-tree --reset -u HEAD &&
has_cr one &&
! has_cr two &&
onediff=$(git diff one) &&
twodiff=$(git diff two) &&
test -z "$onediff" && test -z "$twodiff"
ok 146 - existing tracked file at top-level not ignored with --quiet
expecting success:
expect '' &&
test_check_ignore 'ignored-but-in-index' 1
warning: CRLF will be replaced by LF in CRLFonly.
The file will have its original line endings in your working directory.
ok 147 - existing tracked file at top-level not ignored with -v
ok 3 - crlf=true causes a CRLF file to be normalized
expecting success:
expect ':: ignored-but-in-index' &&
test_check_ignore 'ignored-but-in-index' 1
expecting success:
rm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&
echo "CRLFonly text" > .gitattributes &&
git read-tree --reset -u HEAD &&
# Note, "normalized" means that git will normalize it if added
has_cr CRLFonly &&
CRLFonlydiff=$(git diff CRLFonly) &&
test -n "$CRLFonlydiff"
ok 148 - existing tracked file at top-level not ignored with -v -n
expecting success:
expect ':: ignored-but-in-index' &&
test_check_ignore 'ignored-but-in-index' 1
ok 3 - eol=crlf puts CRLFs in normalized file
expecting success:
rm -f .gitattributes tmp one two &&
git config core.eol lf &&
git config core.autocrlf true &&
git read-tree --reset -u HEAD &&
has_cr one &&
has_cr two &&
onediff=$(git diff one) &&
twodiff=$(git diff two) &&
test -z "$onediff" && test -z "$twodiff"
warning: CRLF will be replaced by LF in CRLFonly.
The file will have its original line endings in your working directory.
ok 4 - text=true causes a CRLF file to be normalized
expecting success:
rm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&
git config core.autocrlf false &&
echo "LFonly eol=crlf" > .gitattributes &&
git read-tree --reset -u HEAD &&
has_cr LFonly &&
LFonlydiff=$(git diff LFonly) &&
test -z "$LFonlydiff"
ok 149 - existing tracked file at top-level not ignored with -v --non-matching
expecting success:
expect '' &&
test_check_ignore 'ignored-but-in-index' 1
ok 150 - existing tracked file at top-level not ignored with --verbose
expecting success:
expect ':: ignored-but-in-index' &&
test_check_ignore 'ignored-but-in-index' 1
ok 5 - eol=crlf gives a normalized file CRLFs with autocrlf=false
expecting success:
rm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&
git config core.autocrlf input &&
echo "LFonly eol=crlf" > .gitattributes &&
git read-tree --reset -u HEAD &&
has_cr LFonly &&
LFonlydiff=$(git diff LFonly) &&
test -z "$LFonlydiff"
ok 4 - autocrlf=true overrides eol=lf
expecting success:
rm -f .gitattributes tmp one two &&
git config --unset-all core.eol &&
git config core.autocrlf true &&
git read-tree --reset -u HEAD &&
has_cr one &&
has_cr two &&
onediff=$(git diff one) &&
twodiff=$(git diff two) &&
test -z "$onediff" && test -z "$twodiff"
ok 151 - existing tracked file at top-level not ignored with --verbose -n
expecting success:
expect ':: ignored-but-in-index' &&
test_check_ignore 'ignored-but-in-index' 1
ok 152 - existing tracked file at top-level not ignored with --verbose --non-matching
ok 6 - eol=crlf gives a normalized file CRLFs with autocrlf=input
expecting success:
rm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&
git config core.autocrlf true &&
echo "LFonly eol=lf" > .gitattributes &&
git read-tree --reset -u HEAD &&
! has_cr LFonly &&
LFonlydiff=$(git diff LFonly) &&
test -z "$LFonlydiff"
expecting success:
expect "$expect" &&
eval "$code"
ok 153 - existing tracked file at top-level shown as ignored with --no-index
ok 5 - autocrlf=true overrides unset eol
expecting success:
expect '' &&
test_check_ignore 'ignored-but-in-index'
skipping test: eol native is crlf
rm -rf native_eol && mkdir native_eol &&
(
cd native_eol &&
printf "*.txt text\n" >.gitattributes &&
printf "one\r\ntwo\r\nthree\r\n" >filedos.txt &&
printf "one\ntwo\nthree\n" >fileunix.txt &&
git init &&
git config core.autocrlf false &&
git config core.eol native &&
git add filedos.txt fileunix.txt &&
git commit -m "first" &&
rm file*.txt &&
git reset --hard HEAD &&
has_cr filedos.txt &&
has_cr fileunix.txt
)
ok 6 # skip eol native is crlf (missing NATIVE_CRLF)
# passed all 6 test(s)
1..6
ok 7 - eol=lf gives a normalized file LFs with autocrlf=true
expecting success:
rm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&
git config core.autocrlf true &&
git read-tree --reset -u HEAD &&
has_cr LFonly &&
has_cr CRLFonly &&
LFonlydiff=$(git diff LFonly) &&
CRLFonlydiff=$(git diff CRLFonly) &&
LFwithNULdiff=$(git diff LFwithNUL) &&
test -z "$LFonlydiff" -a -z "$CRLFonlydiff" -a -z "$LFwithNULdiff"
ok 154 - existing tracked file at top-level shown as ignored with --no-index -q
expecting success:
expect '' &&
test_check_ignore 'ignored-but-in-index'
*** t0027-auto-crlf.sh ***
ok 155 - existing tracked file at top-level shown as ignored with --no-index --quiet
expecting success:
expect '.gitignore:2:ignored-* ignored-but-in-index' &&
test_check_ignore 'ignored-but-in-index'
ok 156 - existing tracked file at top-level shown as ignored with --no-index -v
expecting success:
expect '.gitignore:2:ignored-* ignored-but-in-index' &&
test_check_ignore 'ignored-but-in-index'
ok 8 - autocrlf=true does not normalize CRLF files
expecting success:
rm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&
git config core.autocrlf true &&
echo "* text=auto" > .gitattributes &&
git read-tree --reset -u HEAD &&
has_cr LFonly &&
has_cr CRLFonly &&
LFonlydiff=$(git diff LFonly) &&
CRLFonlydiff=$(git diff CRLFonly) &&
LFwithNULdiff=$(git diff LFwithNUL) &&
test -z "$LFonlydiff" -a -n "$CRLFonlydiff" -a -z "$LFwithNULdiff"
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0027-auto-crlf/.git/
ok 157 - existing tracked file at top-level shown as ignored with --no-index -v -n
expecting success:
expect '.gitignore:2:ignored-* ignored-but-in-index' &&
test_check_ignore 'ignored-but-in-index'
checking prerequisite: EXPENSIVE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test -n "$GIT_TEST_LONG"
)
prerequisite EXPENSIVE not satisfied
ok 8 - filtering large input to small output should use little memory
expecting success:
test-genrandom foo $((128 * 1024 + 1)) >big &&
echo "big filter=epipe" >.gitattributes &&
git config filter.epipe.clean "echo xyzzy" &&
git add big &&
git cat-file blob :big >actual &&
echo xyzzy >expect &&
test_cmp expect actual
1..0 # SKIP EXPENSIVE not set
ok 158 - existing tracked file at top-level shown as ignored with --no-index -v --non-matching
expecting success:
expect '.gitignore:2:ignored-* ignored-but-in-index' &&
test_check_ignore 'ignored-but-in-index'
*** t0030-stripspace.sh ***
ok 159 - existing tracked file at top-level shown as ignored with --no-index --verbose
expecting success:
expect '.gitignore:2:ignored-* ignored-but-in-index' &&
test_check_ignore 'ignored-but-in-index'
ok 9 - text=auto, autocrlf=true _does_ normalize CRLF files
expecting success:
rm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&
git config core.autocrlf true &&
echo "* text=auto" > .gitattributes &&
git read-tree --reset -u HEAD &&
! has_cr LFwithNUL &&
LFwithNULdiff=$(git diff LFwithNUL) &&
test -z "$LFwithNULdiff"
ok 160 - existing tracked file at top-level shown as ignored with --no-index --verbose -n
expecting success:
expect '.gitignore:2:ignored-* ignored-but-in-index' &&
test_check_ignore 'ignored-but-in-index'
ok 161 - existing tracked file at top-level shown as ignored with --no-index --verbose --non-matching
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0030-stripspace/.git/
ok 10 - text=auto, autocrlf=true does not normalize binary files
expecting success:
rm -f .gitattributes tmp LFonly CRLFonly LFwithNUL &&
echo "LFwithNUL eol=crlf" > .gitattributes &&
git read-tree --reset -u HEAD &&
has_cr LFwithNUL &&
LFwithNULdiff=$(git diff LFwithNUL) &&
test -z "$LFwithNULdiff"
expecting success:
echo "$ttt" >expect &&
git stripspace <expect >actual &&
test_cmp expect actual &&
echo "$ttt$ttt" >expect &&
git stripspace <expect >actual &&
test_cmp expect actual &&
echo "$ttt$ttt$ttt" >expect &&
git stripspace <expect >actual &&
test_cmp expect actual &&
echo "$ttt$ttt$ttt$ttt" >expect &&
git stripspace <expect >actual &&
test_cmp expect actual
expecting success:
expect "$expect" &&
eval "$code"
ok 162 - existing untracked file at top-level ignored
expecting success:
expect '' &&
test_check_ignore 'ignored-and-untracked'
ok 11 - eol=crlf _does_ normalize binary files
# passed all 11 test(s)
1..11
ok 1 - long lines without spaces should be unchanged
expecting success:
echo "$sss$ttt" >expect &&
git stripspace <expect >actual &&
test_cmp expect actual &&
echo "$sss$sss$ttt" >expect &&
git stripspace <expect >actual &&
test_cmp expect actual &&
echo "$sss$sss$sss$ttt" >expect &&
git stripspace <expect >actual &&
test_cmp expect actual
ok 163 - existing untracked file at top-level ignored with -q
expecting success:
expect '' &&
test_check_ignore 'ignored-and-untracked'
*** t0040-parse-options.sh ***
ok 164 - existing untracked file at top-level ignored with --quiet
expecting success:
expect '.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore 'ignored-and-untracked'
ok 2 - lines with spaces at the beginning should be unchanged
expecting success:
echo "$ttt$sss$ttt" >expect &&
git stripspace <expect >actual &&
test_cmp expect actual &&
echo "$ttt$sss$sss$ttt" >expect &&
git stripspace <expect >actual &&
test_cmp expect actual
ok 165 - existing untracked file at top-level ignored with -v
expecting success:
expect '.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore 'ignored-and-untracked'
ok 3 - lines with intermediate spaces should be unchanged
expecting success:
printf "$ttt\n\n$ttt\n" > expect &&
printf "$ttt\n\n\n\n\n$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt$ttt\n\n$ttt\n" > expect &&
printf "$ttt$ttt\n\n\n\n\n$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt$ttt$ttt\n\n$ttt\n" > expect &&
printf "$ttt$ttt$ttt\n\n\n\n\n$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n\n$ttt\n" > expect &&
printf "$ttt\n\n\n\n\n$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n\n$ttt$ttt\n" > expect &&
printf "$ttt\n\n\n\n\n$ttt$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n\n$ttt$ttt$ttt\n" > expect &&
printf "$ttt\n\n\n\n\n$ttt$ttt$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n\n$ttt\n" > expect &&
printf "$ttt\n\t\n \n\n \t\t\n$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt$ttt\n\n$ttt\n" > expect &&
printf "$ttt$ttt\n\t\n \n\n \t\t\n$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt$ttt$ttt\n\n$ttt\n" > expect &&
printf "$ttt$ttt$ttt\n\t\n \n\n \t\t\n$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n\n$ttt\n" > expect &&
printf "$ttt\n\t\n \n\n \t\t\n$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n\n$ttt$ttt\n" > expect &&
printf "$ttt\n\t\n \n\n \t\t\n$ttt$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n\n$ttt$ttt$ttt\n" > expect &&
printf "$ttt\n\t\n \n\n \t\t\n$ttt$ttt$ttt\n" | git stripspace >actual &&
test_cmp expect actual
ok 166 - existing untracked file at top-level ignored with -v -n
expecting success:
expect '.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore 'ignored-and-untracked'
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0040-parse-options/.git/
expecting success:
test_must_fail test-parse-options -h > output 2> output.err &&
test_must_be_empty output.err &&
test_i18ncmp expect output
ok 167 - existing untracked file at top-level ignored with -v --non-matching
expecting success:
expect '.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore 'ignored-and-untracked'
ok 1 - test help
expecting success: check boolean: 1 --yes
ok 168 - existing untracked file at top-level ignored with --verbose
expecting success:
expect '.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore 'ignored-and-untracked'
ok 2 - OPT_BOOL() #1
expecting success: check boolean: 1 --no-doubt
ok 169 - existing untracked file at top-level ignored with --verbose -n
expecting success:
expect '.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore 'ignored-and-untracked'
ok 3 - OPT_BOOL() #2
expecting success: check boolean: 1 -D
ok 4 - OPT_BOOL() #3
expecting success: check boolean: 1 --no-fear
ok 170 - existing untracked file at top-level ignored with --verbose --non-matching
ok 5 - OPT_BOOL() #4
expecting success: check boolean: 1 -B
expecting success:
expect "$expect" &&
eval "$code"
ok 6 - OPT_BOOL() #5
expecting success: check boolean: 1 --yes --yes
ok 171 - existing untracked file at top-level ignored with --no-index
expecting success:
expect '' &&
test_check_ignore 'ignored-and-untracked'
ok 4 - consecutive blank lines should be unified
expecting success:
> expect &&
printf "\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "\n\n\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$sss\n$sss\n$sss\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$sss$sss\n$sss\n\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "\n$sss\n$sss$sss\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$sss$sss$sss$sss\n\n\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "\n$sss$sss$sss$sss\n\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "\n\n$sss$sss$sss$sss\n" | git stripspace >actual &&
test_cmp expect actual
ok 7 - OPT_BOOL() is idempotent #1
expecting success: check boolean: 1 -DB
ok 172 - existing untracked file at top-level ignored with --no-index -q
expecting success:
expect '' &&
test_check_ignore 'ignored-and-untracked'
ok 8 - OPT_BOOL() is idempotent #2
expecting success: check boolean: 0 -D --no-yes
ok 173 - existing untracked file at top-level ignored with --no-index --quiet
expecting success:
expect '.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore 'ignored-and-untracked'
ok 9 - OPT_BOOL() negation #1
expecting success: check boolean: 0 -D --no-no-doubt
ok 10 - OPT_BOOL() negation #2
expecting success: check_unknown_i18n --fear
ok 174 - existing untracked file at top-level ignored with --no-index -v
expecting success:
expect '.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore 'ignored-and-untracked'
ok 11 - OPT_BOOL() no negation #1
expecting success: check_unknown_i18n --no-no-fear
ok 175 - existing untracked file at top-level ignored with --no-index -v -n
expecting success:
expect '.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore 'ignored-and-untracked'
ok 12 - OPT_BOOL() no negation #2
expecting success: check boolean: 0 -D --doubt
ok 5 - only consecutive blank lines should be completely removed
expecting success:
printf "$ttt\n" > expect &&
printf "\n$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n" > expect &&
printf "\n\n\n$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt$ttt\n" > expect &&
printf "\n\n\n$ttt$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt$ttt$ttt\n" > expect &&
printf "\n\n\n$ttt$ttt$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt$ttt$ttt$ttt\n" > expect &&
printf "\n\n\n$ttt$ttt$ttt$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n" > expect &&
printf "$sss\n$sss\n$sss\n$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "\n$sss\n$sss$sss\n$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$sss$sss\n$sss\n\n$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$sss$sss$sss\n\n\n$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "\n$sss$sss$sss\n\n$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "\n\n$sss$sss$sss\n$ttt\n" | git stripspace >actual &&
test_cmp expect actual
ok 176 - existing untracked file at top-level ignored with --no-index -v --non-matching
expecting success:
expect '.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore 'ignored-and-untracked'
ok 13 - OPT_BOOL() positivation
expecting success: check integer: -2345 -i -2345
ok 14 - OPT_INT() negative
expecting success:
check magnitude: 2345678 -m 2345678
ok 177 - existing untracked file at top-level ignored with --no-index --verbose
expecting success:
expect '.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore 'ignored-and-untracked'
ok 15 - OPT_MAGNITUDE() simple
expecting success:
check magnitude: 239616 -m 234k
ok 178 - existing untracked file at top-level ignored with --no-index --verbose -n
expecting success:
expect '.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore 'ignored-and-untracked'
ok 16 - OPT_MAGNITUDE() kilo
expecting success:
check magnitude: 104857600 -m 100m
ok 179 - existing untracked file at top-level ignored with --no-index --verbose --non-matching
ok 17 - OPT_MAGNITUDE() mega
expecting success:
check magnitude: 1073741824 -m 1g
expecting success:
expect "$expect" &&
eval "$code"
ok 18 - OPT_MAGNITUDE() giga
expecting success:
check magnitude: 3221225472 -m 3g
ok 19 - OPT_MAGNITUDE() 3giga
expecting success:
test-parse-options -s123 -b -i 1729 -m 16k -b -vv -n -F my.file \
>output 2>output.err &&
test_cmp expect output &&
test_must_be_empty output.err
ok 180 - mix of file types at top-level
expecting success:
expect '.gitignore:1:one one
.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore '
non-existent
one
not-ignored
ignored-but-in-index
ignored-and-untracked'
ok 20 - short options
expecting success:
test-parse-options --boolean --integer 1729 --magnitude 16k \
--boolean --string2=321 --verbose --verbose --no-dry-run \
--abbrev=10 --file fi.le --obsolete \
>output 2>output.err &&
test_must_be_empty output.err &&
test_cmp expect output
ok 181 - mix of file types at top-level with -v
ok 21 - long options
expecting success:
expect ':: non-existent
.gitignore:1:one one
:: not-ignored
:: ignored-but-in-index
.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore '
non-existent
one
not-ignored
ignored-but-in-index
ignored-and-untracked'
expecting success:
test_expect_code 129 test-parse-options -s &&
test_expect_code 129 test-parse-options --string &&
test_expect_code 129 test-parse-options --file
ok 6 - consecutive blank lines at the beginning should be removed
expecting success:
printf "$ttt\n" > expect &&
printf "$ttt\n\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n" > expect &&
printf "$ttt\n\n\n\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt$ttt\n" > expect &&
printf "$ttt$ttt\n\n\n\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt$ttt$ttt\n" > expect &&
printf "$ttt$ttt$ttt\n\n\n\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt$ttt$ttt$ttt\n" > expect &&
printf "$ttt$ttt$ttt$ttt\n\n\n\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n" > expect &&
printf "$ttt\n$sss\n$sss\n$sss\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n\n$sss\n$sss$sss\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n$sss$sss\n$sss\n\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n$sss$sss$sss\n\n\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n\n$sss$sss$sss\n\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n\n\n$sss$sss$sss\n" | git stripspace >actual &&
test_cmp expect actual
error: switch `s' requires a value
usage: test-parse-options <options>
--yes get a boolean
-D, --no-doubt begins with 'no-'
-B, --no-fear be brave
-b, --boolean increment by one
-4, --or4 bitwise-or boolean with ...0100
--neg-or4 same as --no-or4
-i, --integer <n> get a integer
-j <n> get a integer, too
-m, --magnitude <n> get a magnitude
--set23 set integer to 23
-t <time> get timestamp of <time>
-L, --length <str> get length of <str>
-F, --file <file> set file to <file>
String options
-s, --string <string>
get a string
--string2 <str> get another string
--st <st> get another string (pervert ordering)
-o <str> get another string
--list <str> add str to list
Magic arguments
--quux means --quux
-NUM set integer to NUM
+ same as -b
--ambiguous positive ambiguity
--no-ambiguous negative ambiguity
Standard options
--abbrev[=<n>] use <n> digits to display SHA-1s
-v, --verbose be verbose
-n, --dry-run dry run
-q, --quiet be quiet
error: option `string' requires a value
usage: test-parse-options <options>
--yes get a boolean
-D, --no-doubt begins with 'no-'
-B, --no-fear be brave
-b, --boolean increment by one
-4, --or4 bitwise-or boolean with ...0100
--neg-or4 same as --no-or4
-i, --integer <n> get a integer
-j <n> get a integer, too
-m, --magnitude <n> get a magnitude
--set23 set integer to 23
-t <time> get timestamp of <time>
-L, --length <str> get length of <str>
-F, --file <file> set file to <file>
String options
-s, --string <string>
get a string
--string2 <str> get another string
--st <st> get another string (pervert ordering)
-o <str> get another string
--list <str> add str to list
Magic arguments
--quux means --quux
-NUM set integer to NUM
+ same as -b
--ambiguous positive ambiguity
--no-ambiguous negative ambiguity
Standard options
--abbrev[=<n>] use <n> digits to display SHA-1s
-v, --verbose be verbose
-n, --dry-run dry run
-q, --quiet be quiet
ok 9 - filter that does not read is fine
checking prerequisite: EXPENSIVE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test -n "$GIT_TEST_LONG"
)
error: option `file' requires a value
usage: test-parse-options <options>
--yes get a boolean
-D, --no-doubt begins with 'no-'
-B, --no-fear be brave
-b, --boolean increment by one
-4, --or4 bitwise-or boolean with ...0100
--neg-or4 same as --no-or4
-i, --integer <n> get a integer
-j <n> get a integer, too
-m, --magnitude <n> get a magnitude
--set23 set integer to 23
-t <time> get timestamp of <time>
-L, --length <str> get length of <str>
-F, --file <file> set file to <file>
String options
-s, --string <string>
get a string
--string2 <str> get another string
--st <st> get another string (pervert ordering)
-o <str> get another string
--list <str> add str to list
Magic arguments
--quux means --quux
-NUM set integer to NUM
+ same as -b
--ambiguous positive ambiguity
--no-ambiguous negative ambiguity
Standard options
--abbrev[=<n>] use <n> digits to display SHA-1s
-v, --verbose be verbose
-n, --dry-run dry run
-q, --quiet be quiet
ok 22 - missing required value
expecting success:
test-parse-options a1 --string 123 b1 --boolean -j 13 -- --boolean \
> output 2> output.err &&
test_must_be_empty output.err &&
test_cmp expect output
ok 182 - mix of file types at top-level with -v -n
expecting success:
expect ':: non-existent
.gitignore:1:one one
:: not-ignored
:: ignored-but-in-index
.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore '
non-existent
one
not-ignored
ignored-but-in-index
ignored-and-untracked'
prerequisite EXPENSIVE not satisfied
skipping test: filter large file
git config filter.largefile.smudge cat &&
git config filter.largefile.clean cat &&
for i in $(test_seq 1 2048); do printf "%1048576d" 1; done >2GB &&
echo "2GB filter=largefile" >.gitattributes &&
git add 2GB 2>err &&
! test -s err &&
rm -f 2GB &&
git checkout -- 2GB 2>err &&
! test -s err
ok 10 # skip filter large file (missing EXPENSIVE)
expecting success:
git config filter.in-repo-header.clean "echo cleaned && cat" &&
git config filter.in-repo-header.smudge "sed 1d" &&
echo "empty-in-worktree filter=in-repo-header" >>.gitattributes &&
>empty-in-worktree &&
echo cleaned >expected &&
git add empty-in-worktree &&
git show :empty-in-worktree >actual &&
test_cmp expected actual
ok 23 - intermingled arguments
expecting success:
test-parse-options --int 2 --boolean --no-bo > output 2> output.err &&
test_must_be_empty output.err &&
test_cmp expect output
ok 183 - mix of file types at top-level with -v --non-matching
expecting success:
expect '.gitignore:1:one one
.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore '
non-existent
one
not-ignored
ignored-but-in-index
ignored-and-untracked'
ok 24 - unambiguously abbreviated option
expecting success:
test-parse-options --int=2 > output 2> output.err &&
test_must_be_empty output.err &&
test_cmp expect output
ok 25 - unambiguously abbreviated option with "="
expecting success:
test_expect_code 129 test-parse-options --strin 123
ok 184 - mix of file types at top-level with --verbose
expecting success:
expect ':: non-existent
.gitignore:1:one one
:: not-ignored
:: ignored-but-in-index
.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore '
non-existent
one
not-ignored
ignored-but-in-index
ignored-and-untracked'
error: Ambiguous option: strin (could be --string or --string2)
usage: test-parse-options <options>
--yes get a boolean
-D, --no-doubt begins with 'no-'
-B, --no-fear be brave
-b, --boolean increment by one
-4, --or4 bitwise-or boolean with ...0100
--neg-or4 same as --no-or4
-i, --integer <n> get a integer
-j <n> get a integer, too
-m, --magnitude <n> get a magnitude
--set23 set integer to 23
-t <time> get timestamp of <time>
-L, --length <str> get length of <str>
-F, --file <file> set file to <file>
String options
-s, --string <string>
get a string
--string2 <str> get another string
--st <st> get another string (pervert ordering)
-o <str> get another string
--list <str> add str to list
Magic arguments
--quux means --quux
-NUM set integer to NUM
+ same as -b
--ambiguous positive ambiguity
--no-ambiguous negative ambiguity
Standard options
--abbrev[=<n>] use <n> digits to display SHA-1s
-v, --verbose be verbose
-n, --dry-run dry run
-q, --quiet be quiet
ok 26 - ambiguously abbreviated option
expecting success:
test-parse-options --st 123 > output 2> output.err &&
test_must_be_empty output.err &&
test_cmp expect output
ok 11 - filter: clean empty file
expecting success:
git config filter.empty-in-repo.clean "cat >/dev/null" &&
git config filter.empty-in-repo.smudge "echo smudged && cat" &&
echo "empty-in-repo filter=empty-in-repo" >>.gitattributes &&
echo dead data walking >empty-in-repo &&
git add empty-in-repo &&
echo smudged >expected &&
git checkout-index --prefix=filtered- empty-in-repo &&
test_cmp expected filtered-empty-in-repo
ok 27 - non ambiguous option (after two options it abbreviates)
expecting success:
test_must_fail test-parse-options -boolean > output 2> output.err &&
test_must_be_empty output &&
test_cmp typo.err output.err
ok 185 - mix of file types at top-level with --verbose -n
expecting success:
expect ':: non-existent
.gitignore:1:one one
:: not-ignored
:: ignored-but-in-index
.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore '
non-existent
one
not-ignored
ignored-but-in-index
ignored-and-untracked'
ok 28 - detect possible typos
expecting success:
test_must_fail test-parse-options -ambiguous > output 2> output.err &&
test_must_be_empty output &&
test_cmp typo.err output.err
ok 29 - detect possible typos
expecting success:
test-parse-options --quux > output 2> output.err &&
test_must_be_empty output.err &&
test_cmp expect output
ok 186 - mix of file types at top-level with --verbose --non-matching
ok 7 - consecutive blank lines at the end should be removed
expecting success:
test $(printf "$ttt" | git stripspace | wc -l) -gt 0 &&
test $(printf "$ttt$ttt" | git stripspace | wc -l) -gt 0 &&
test $(printf "$ttt$ttt$ttt" | git stripspace | wc -l) -gt 0 &&
test $(printf "$ttt$ttt$ttt$ttt" | git stripspace | wc -l) -gt 0
expecting success:
expect "$expect" &&
eval "$code"
ok 30 - keep some options as arguments
expecting success:
test-parse-options -t "1970-01-01 00:00:01 +0000" \
foo -q > output 2> output.err &&
test_must_be_empty output.err &&
test_cmp expect output
ok 31 - OPT_DATE() works
ok 12 - filter: smudge empty file
expecting success:
test-parse-options --length=four -b -4 > output 2> output.err &&
test_must_be_empty output.err &&
test_cmp expect output
ok 187 - mix of file types at top-level with --no-index
# passed all 12 test(s)
1..12
expecting success:
expect '.gitignore:1:one one
.gitignore:2:ignored-* ignored-but-in-index
.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore '
non-existent
one
not-ignored
ignored-but-in-index
ignored-and-untracked'
ok 32 - OPT_CALLBACK() and OPT_BIT() work
ok 8 - text without newline at end should end with newline
expecting success:
test $(printf "$ttt$sss" | git stripspace | wc -l) -gt 0 &&
test $(printf "$ttt$ttt$sss" | git stripspace | wc -l) -gt 0 &&
test $(printf "$ttt$ttt$ttt$sss" | git stripspace | wc -l) -gt 0 &&
test $(printf "$ttt$sss$sss" | git stripspace | wc -l) -gt 0 &&
test $(printf "$ttt$ttt$sss$sss" | git stripspace | wc -l) -gt 0 &&
test $(printf "$ttt$sss$sss$sss" | git stripspace | wc -l) -gt 0
expecting success:
test_must_fail test-parse-options --no-length > output 2> output.err &&
test_i18ncmp expect output &&
test_i18ncmp expect.err output.err
ok 188 - mix of file types at top-level with --no-index -v
expecting success:
expect ':: non-existent
.gitignore:1:one one
:: not-ignored
.gitignore:2:ignored-* ignored-but-in-index
.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore '
non-existent
one
not-ignored
ignored-but-in-index
ignored-and-untracked'
ok 33 - OPT_CALLBACK() and callback errors work
expecting success:
test-parse-options --set23 -bbbbb --no-or4 > output 2> output.err &&
test_must_be_empty output.err &&
test_cmp expect output
ok 189 - mix of file types at top-level with --no-index -v -n
expecting success:
expect ':: non-existent
.gitignore:1:one one
:: not-ignored
.gitignore:2:ignored-* ignored-but-in-index
.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore '
non-existent
one
not-ignored
ignored-but-in-index
ignored-and-untracked'
ok 34 - OPT_BIT() and OPT_SET_INT() work
expecting success:
test-parse-options --set23 -bbbbb --neg-or4 > output 2> output.err &&
test_must_be_empty output.err &&
test_cmp expect output
*** t0050-filesystem.sh ***
ok 35 - OPT_NEGBIT() and OPT_SET_INT() work
expecting success:
test-parse-options -bb --or4 > output 2> output.err &&
test_must_be_empty output.err &&
test_cmp expect output
ok 190 - mix of file types at top-level with --no-index -v --non-matching
expecting success:
expect '.gitignore:1:one one
.gitignore:2:ignored-* ignored-but-in-index
.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore '
non-existent
one
not-ignored
ignored-but-in-index
ignored-and-untracked'
ok 9 - text plus spaces without newline at end should end with newline
expecting success:
! (printf "$ttt$sss" | git stripspace | grep " " >/dev/null) &&
! (printf "$ttt$ttt$sss" | git stripspace | grep " " >/dev/null) &&
! (printf "$ttt$ttt$ttt$sss" | git stripspace | grep " " >/dev/null) &&
! (printf "$ttt$sss$sss" | git stripspace | grep " " >/dev/null) &&
! (printf "$ttt$ttt$sss$sss" | git stripspace | grep " " >/dev/null) &&
! (printf "$ttt$sss$sss$sss" | git stripspace | grep " " >/dev/null)
ok 36 - OPT_BIT() works
expecting success:
test-parse-options -bb --no-neg-or4 > output 2> output.err &&
test_must_be_empty output.err &&
test_cmp expect output
ok 191 - mix of file types at top-level with --no-index --verbose
expecting success:
expect ':: non-existent
.gitignore:1:one one
:: not-ignored
.gitignore:2:ignored-* ignored-but-in-index
.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore '
non-existent
one
not-ignored
ignored-but-in-index
ignored-and-untracked'
ok 37 - OPT_NEGBIT() works
expecting success:
test-parse-options + + + + + + > output 2> output.err &&
test_must_be_empty output.err &&
test_cmp expect output
ok 38 - OPT_COUNTUP() with PARSE_OPT_NODASH works
expecting success:
test-parse-options -12345 > output 2> output.err &&
test_must_be_empty output.err &&
test_cmp expect output
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0050-filesystem/.git/
ok 192 - mix of file types at top-level with --no-index --verbose -n
expecting success:
expect ':: non-existent
.gitignore:1:one one
:: not-ignored
.gitignore:2:ignored-* ignored-but-in-index
.gitignore:2:ignored-* ignored-and-untracked' &&
test_check_ignore '
non-existent
one
not-ignored
ignored-but-in-index
ignored-and-untracked'
ok 39 - OPT_NUMBER_CALLBACK() works
checking prerequisite: CASE_INSENSITIVE_FS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
echo good >CamelCase &&
echo bad >camelcase &&
test "$(cat CamelCase)" != good
)
expecting success:
test-parse-options --no-ambig >output 2>output.err &&
test_must_be_empty output.err &&
test_cmp expect output
ok 10 - text plus spaces without newline at end should not show spaces
expecting success:
printf "$ttt\n" >expect &&
printf "$ttt$sss" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n" >expect &&
printf "$ttt$sss$sss" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n" >expect &&
printf "$ttt$sss$sss$sss" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt$ttt\n" >expect &&
printf "$ttt$ttt$sss" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt$ttt\n" >expect &&
printf "$ttt$ttt$sss$sss" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt$ttt$ttt\n" >expect &&
printf "$ttt$ttt$ttt$sss" | git stripspace >actual &&
test_cmp expect actual
prerequisite CASE_INSENSITIVE_FS not satisfied
ok 40 - negation of OPT_NONEG flags is not ambiguous
checking prerequisite: UTF8_NFD_TO_NFC
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# check whether FS converts nfd unicode to nfc
auml=$(printf "\303\244")
aumlcdiar=$(printf "\141\314\210")
>"$auml" &&
case "$(echo *)" in
"$aumlcdiar")
true ;;
*)
false ;;
esac
)
ok 193 - mix of file types at top-level with --no-index --verbose --non-matching
expecting success:
test-parse-options --list foo --list=bar --list=baz >output &&
test_cmp expect output
prerequisite UTF8_NFD_TO_NFC not satisfied
checking prerequisite: SYMLINKS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# test whether the filesystem supports symbolic links
ln -s x y && test -h y
)
ok 41 - --list keeps list of strings
expecting success:
test-parse-options --list=other --list=irrelevant --list=options \
--no-list --list=foo --list=bar --list=baz >output &&
test_cmp expect output
expecting success:
expect "$expect" &&
eval "$code"
ok 42 - --no-list resets list
prerequisite SYMLINKS ok
expecting success:
{
test_must_fail git config --bool core.ignorecase >/dev/null ||
test $(git config --bool core.ignorecase) = false
}
# passed all 42 test(s)
1..42
ok 194 - non-existent file in subdir a/ not ignored
ok 1 - detection of case insensitive filesystem during repo init
expecting success:
{
test_must_fail git config --bool core.symlinks ||
test "$(git config --bool core.symlinks)" = true
}
expecting success:
expect '' &&
test_check_ignore 'a/non-existent' 1
ok 2 - detection of filesystem w/o symlink support during repo init
expecting success:
git config core.ignorecase true &&
touch camelcase &&
git add camelcase &&
git commit -m "initial" &&
git tag initial &&
git checkout -b topic &&
git mv camelcase tmp &&
git mv tmp CamelCase &&
git commit -m "rename" &&
git checkout -f master
*** t0055-beyond-symlinks.sh ***
ok 195 - non-existent file in subdir a/ not ignored with -q
expecting success:
expect '' &&
test_check_ignore 'a/non-existent' 1
ok 11 - text plus spaces without newline should show the correct lines
expecting success:
! (echo "$ttt$sss" | git stripspace | grep " " >/dev/null) &&
! (echo "$ttt$ttt$sss" | git stripspace | grep " " >/dev/null) &&
! (echo "$ttt$ttt$ttt$sss" | git stripspace | grep " " >/dev/null) &&
! (echo "$ttt$sss$sss" | git stripspace | grep " " >/dev/null) &&
! (echo "$ttt$ttt$sss$sss" | git stripspace | grep " " >/dev/null) &&
! (echo "$ttt$sss$sss$sss" | git stripspace | grep " " >/dev/null)
ok 196 - non-existent file in subdir a/ not ignored with --quiet
expecting success:
expect '' &&
test_check_ignore 'a/non-existent' 1
[master (root-commit) dd53ea6] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 camelcase
ok 197 - non-existent file in subdir a/ not ignored with -v
expecting success:
expect ':: a/non-existent' &&
test_check_ignore 'a/non-existent' 1
Switched to a new branch 'topic'
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0055-beyond-symlinks/.git/
ok 198 - non-existent file in subdir a/ not ignored with -v -n
expecting success:
expect ':: a/non-existent' &&
test_check_ignore 'a/non-existent' 1
ok 12 - text plus spaces at end should not show spaces
checking prerequisite: SYMLINKS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# test whether the filesystem supports symbolic links
ln -s x y && test -h y
)
expecting success:
echo "$ttt" >expect &&
echo "$ttt$sss" | git stripspace >actual &&
test_cmp expect actual &&
echo "$ttt" >expect &&
echo "$ttt$sss$sss" | git stripspace >actual &&
test_cmp expect actual &&
echo "$ttt" >expect &&
echo "$ttt$sss$sss$sss" | git stripspace >actual &&
test_cmp expect actual &&
echo "$ttt$ttt" >expect &&
echo "$ttt$ttt$sss" | git stripspace >actual &&
test_cmp expect actual &&
echo "$ttt$ttt" >expect &&
echo "$ttt$ttt$sss$sss" | git stripspace >actual &&
test_cmp expect actual &&
echo "$ttt$ttt$ttt" >expect &&
echo "$ttt$ttt$ttt$sss" | git stripspace >actual &&
test_cmp expect actual
ok 199 - non-existent file in subdir a/ not ignored with -v --non-matching
expecting success:
expect '' &&
test_check_ignore 'a/non-existent' 1
prerequisite SYMLINKS ok
expecting success:
>a &&
mkdir b &&
ln -s b c &&
>c/d &&
git update-index --add a b/d
[topic b6f660e] rename
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename camelcase => CamelCase (100%)
ok 200 - non-existent file in subdir a/ not ignored with --verbose
expecting success:
expect ':: a/non-existent' &&
test_check_ignore 'a/non-existent' 1
Switched to branch 'master'
ok 3 - setup case tests
expecting success:
git mv camelcase CamelCase &&
git commit -m "rename"
ok 1 - setup
expecting success:
test_must_fail git update-index --add c/d &&
! ( git ls-files | grep c/d )
error: 'c/d' is beyond a symbolic link
fatal: Unable to process path c/d
ok 201 - non-existent file in subdir a/ not ignored with --verbose -n
expecting success:
expect ':: a/non-existent' &&
test_check_ignore 'a/non-existent' 1
[master b6f660e] rename
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename camelcase => CamelCase (100%)
ok 2 - update-index --add beyond symlinks
ok 4 - rename (case change)
expecting success:
rm -f CamelCase &&
rm -f camelcase &&
git reset --hard initial &&
git merge topic
expecting success:
test_must_fail git add c/d &&
! ( git ls-files | grep c/d )
fatal: pathspec 'c/d' is beyond a symbolic link
ok 202 - non-existent file in subdir a/ not ignored with --verbose --non-matching
ok 13 - text plus spaces at end should be cleaned and newline must remain
expecting success:
printf "" >expect &&
echo | git stripspace >actual &&
test_cmp expect actual &&
echo "$sss" | git stripspace >actual &&
test_cmp expect actual &&
echo "$sss$sss" | git stripspace >actual &&
test_cmp expect actual &&
echo "$sss$sss$sss" | git stripspace >actual &&
test_cmp expect actual &&
echo "$sss$sss$sss$sss" | git stripspace >actual &&
test_cmp expect actual
HEAD is now at dd53ea6 initial
expecting success:
expect "$expect" &&
eval "$code"
ok 3 - add beyond symlinks
Updating dd53ea6..b6f660e
Fast-forward
# passed all 3 test(s)
1..3
camelcase => CamelCase | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename camelcase => CamelCase (100%)
ok 5 - merge (case change)
skipping test: add (with different case)
git reset --hard initial &&
rm camelcase &&
echo 1 >CamelCase &&
git add CamelCase &&
camel=$(git ls-files | grep -i camelcase) &&
test $(echo "$camel" | wc -l) = 1 &&
test "z$(git cat-file blob :$camel)" = z1
ok 6 # skip add (with different case) (missing CASE_INSENSITIVE_FS)
expecting success:
test_create_repo unicode &&
cd unicode &&
git config core.precomposeunicode false &&
touch "$aumlcdiar" &&
git add "$aumlcdiar" &&
git commit -m initial &&
git tag initial &&
git checkout -b topic &&
git mv $aumlcdiar tmp &&
git mv tmp "$auml" &&
git commit -m rename &&
git checkout -f master
ok 203 - non-existent file in subdir a/ not ignored with --no-index
expecting success:
expect '' &&
test_check_ignore 'a/non-existent' 1
*** t0056-git-C.sh ***
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0050-filesystem/unicode/.git/
ok 204 - non-existent file in subdir a/ not ignored with --no-index -q
expecting success:
expect '' &&
test_check_ignore 'a/non-existent' 1
ok 14 - spaces with newline at end should be replaced with empty string
expecting success:
! (printf "" | git stripspace | grep " " >/dev/null) &&
! (printf "$sss" | git stripspace | grep " " >/dev/null) &&
! (printf "$sss$sss" | git stripspace | grep " " >/dev/null) &&
! (printf "$sss$sss$sss" | git stripspace | grep " " >/dev/null) &&
! (printf "$sss$sss$sss$sss" | git stripspace | grep " " >/dev/null)
ok 205 - non-existent file in subdir a/ not ignored with --no-index --quiet
expecting success:
expect '' &&
test_check_ignore 'a/non-existent' 1
[master (root-commit) 5b9bcfe] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 "a\314\210"
ok 206 - non-existent file in subdir a/ not ignored with --no-index -v
expecting success:
expect ':: a/non-existent' &&
test_check_ignore 'a/non-existent' 1
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0056-git-C/.git/
ok 15 - spaces without newline at end should not show spaces
expecting success:
printf "" >expect &&
printf "" | git stripspace >actual &&
test_cmp expect actual &&
printf "$sss$sss" | git stripspace >actual &&
test_cmp expect actual &&
printf "$sss$sss$sss" | git stripspace >actual &&
test_cmp expect actual &&
printf "$sss$sss$sss$sss" | git stripspace >actual &&
test_cmp expect actual
expecting success:
test_create_repo dir1 &&
echo 1 >dir1/a.txt &&
msg="initial in dir1" &&
(cd dir1 && git add a.txt && git commit -m "$msg") &&
echo "$msg" >expected &&
git -C dir1 log --format=%s >actual &&
test_cmp expected actual
ok 207 - non-existent file in subdir a/ not ignored with --no-index -v -n
expecting success:
expect ':: a/non-existent' &&
test_check_ignore 'a/non-existent' 1
Switched to a new branch 'topic'
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0056-git-C/dir1/.git/
ok 208 - non-existent file in subdir a/ not ignored with --no-index -v --non-matching
expecting success:
expect '' &&
test_check_ignore 'a/non-existent' 1
[topic a11c35e] rename
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename "a\314\210" => "\303\244" (100%)
ok 209 - non-existent file in subdir a/ not ignored with --no-index --verbose
expecting success:
expect ':: a/non-existent' &&
test_check_ignore 'a/non-existent' 1
ok 16 - spaces without newline at end should be replaced with empty string
expecting success:
printf "$ttt$ttt\n$ttt\n" >expect &&
printf "$ttt$ttt\n$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n$ttt$ttt\n$ttt\n" >expect &&
printf "$ttt\n$ttt$ttt\n$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n$ttt\n$ttt\n$ttt$ttt\n" >expect &&
printf "$ttt\n$ttt\n$ttt\n$ttt$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n$ttt\n\n$ttt$ttt\n$ttt\n" >expect &&
printf "$ttt\n$ttt\n\n$ttt$ttt\n$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt$ttt\n\n$ttt\n$ttt$ttt\n" >expect &&
printf "$ttt$ttt\n\n$ttt\n$ttt$ttt\n" | git stripspace >actual &&
test_cmp expect actual &&
printf "$ttt\n$ttt$ttt\n\n$ttt\n" >expect &&
printf "$ttt\n$ttt$ttt\n\n$ttt\n" | git stripspace >actual &&
test_cmp expect actual
[master (root-commit) cf66d21] initial in dir1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a.txt
Switched to branch 'master'
ok 7 - setup unicode normalization tests
expecting success:
git mv "$aumlcdiar" "$auml" &&
git commit -m rename
ok 210 - non-existent file in subdir a/ not ignored with --no-index --verbose -n
expecting success:
expect ':: a/non-existent' &&
test_check_ignore 'a/non-existent' 1
ok 1 - "git -C <path>" runs git from the directory <path>
expecting success:
(
mkdir -p dir1/subdir &&
cd dir1/subdir &&
git -C "" rev-parse --show-prefix >actual &&
echo subdir/ >expect &&
test_cmp expect actual
)
ok 211 - non-existent file in subdir a/ not ignored with --no-index --verbose --non-matching
ok 2 - "git -C <path>" with an empty <path> is a no-op
expecting success:
test_create_repo dir1/dir2 &&
echo 1 >dir1/dir2/b.txt &&
git -C dir1/dir2 add b.txt &&
msg="initial in dir1/dir2" &&
echo "$msg" >expected &&
git -C dir1/dir2 commit -m "$msg" &&
git -C dir1 -C dir2 log --format=%s >actual &&
test_cmp expected actual
[master a11c35e] rename
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename "a\314\210" => "\303\244" (100%)
ok 8 - rename (silent unicode normalization)
expecting success:
git reset --hard initial &&
git merge topic
expecting success:
expect "$expect" &&
eval "$code"
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0056-git-C/dir1/dir2/.git/
HEAD is now at 5b9bcfe initial
ok 17 - consecutive text lines should be unchanged
ok 212 - non-existent file in subdir a/ ignored
expecting success:
test ! -z "$(echo "# comment" | git stripspace)" &&
test -z "$(echo "# comment" | git stripspace -s)"
expecting success:
expect '' &&
test_check_ignore 'a/one'
Updating 5b9bcfe..a11c35e
Fast-forward
"a\314\210" => "\303\244" | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename "a\314\210" => "\303\244" (100%)
ok 9 - merge (silent unicode normalization)
[master (root-commit) 2cbbc49] initial in dir1/dir2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b.txt
# passed all 9 test(s)
1..9
ok 18 - strip comments, too
expecting success:
test ! -z "$(echo "; comment" | git -c core.commentchar=";" stripspace)" &&
test -z "$(echo "; comment" | git -c core.commentchar=";" stripspace -s)"
ok 213 - non-existent file in subdir a/ ignored with -q
expecting success:
expect '' &&
test_check_ignore 'a/one'
ok 3 - Multiple -C options: "-C dir1 -C dir2" is equivalent to "-C dir1/dir2"
expecting success:
mkdir c &&
mkdir c/a &&
mkdir c/a.git &&
(cd c/a.git && git init --bare) &&
echo 1 >c/a/a.txt &&
git --git-dir c/a.git --work-tree=c/a add a.txt &&
git --git-dir c/a.git --work-tree=c/a commit -m "initial" &&
git --git-dir=c/a.git log -1 --format=%s >expected &&
git -C c --git-dir=a.git log -1 --format=%s >actual &&
test_cmp expected actual
ok 19 - strip comments with changed comment char
expecting success:
printf "# foo\n" >expect &&
printf "foo" | git stripspace -c >actual &&
test_cmp expect actual
ok 214 - non-existent file in subdir a/ ignored with --quiet
*** t0060-path-utils.sh ***
expecting success:
expect '.gitignore:1:one a/one' &&
test_check_ignore 'a/one'
ok 20 - -c with single line
expecting success:
printf "# foo\n#\n" >expect &&
printf "foo\n\n" | git stripspace -c >actual &&
test_cmp expect actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0056-git-C/c/a.git/
ok 21 - -c with single line followed by empty line
expecting success:
printf "#\n" >expect &&
printf "\n" | git stripspace -c >actual &&
test_cmp expect actual
ok 215 - non-existent file in subdir a/ ignored with -v
expecting success:
expect '.gitignore:1:one a/one' &&
test_check_ignore 'a/one'
ok 22 - -c with newline only
expecting success:
printf "# foo\n" >expect &&
printf "foo" | git stripspace -c >actual &&
test_cmp expect actual
[master (root-commit) 6ec1d3d] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a.txt
ok 216 - non-existent file in subdir a/ ignored with -v -n
expecting success:
expect '.gitignore:1:one a/one' &&
test_check_ignore 'a/one'
ok 23 - --comment-lines with single line
expecting success:
printf "; foo\n" >expect &&
printf "foo" | git -c core.commentchar=";" stripspace -c >actual &&
test_cmp expect actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0060-path-utils/.git/
ok 24 - -c with changed comment char
expecting success:
printf "#\tone\n#\n# two\n" >expect &&
printf "\tone\n\ntwo\n" | git stripspace -c >actual &&
test_cmp expect actual
ok 4 - Effect on --git-dir option: "-C c --git-dir=a.git" is equivalent to "--git-dir c/a.git"
expecting success:
git -C c --git-dir=a.git log -1 --format=%s >expected &&
git --git-dir=a.git -C c log -1 --format=%s >actual &&
test_cmp expected actual
ok 217 - non-existent file in subdir a/ ignored with -v --non-matching
expecting success:
expect '.gitignore:1:one a/one' &&
test_check_ignore 'a/one'
ok 25 - avoid SP-HT sequence in commented line
# passed all 25 test(s)
1..25
ok 5 - Order should not matter: "--git-dir=a.git -C c" is equivalent to "-C c --git-dir=a.git"
expecting success:
rm c/a/a.txt &&
git --git-dir=c/a.git --work-tree=c/a status >expected &&
git -C c/a.git --work-tree=../a status >actual &&
test_cmp expected actual
expecting success: test "$(test-path-utils normalize_path_copy '')" = ''
ok 218 - non-existent file in subdir a/ ignored with --verbose
expecting success:
expect '.gitignore:1:one a/one' &&
test_check_ignore 'a/one'
ok 1 - normalize path: =>
*** t0061-run-command.sh ***
expecting success: test "$(test-path-utils normalize_path_copy '.')" = ''
ok 2 - normalize path: . =>
ok 219 - non-existent file in subdir a/ ignored with --verbose -n
expecting success:
expect '.gitignore:1:one a/one' &&
test_check_ignore 'a/one'
ok 6 - Effect on --work-tree option: "-C c/a.git --work-tree=../a" is equivalent to "--work-tree=c/a --git-dir=c/a.git"
expecting success:
git -C c/a.git --work-tree=../a status >expected &&
git --work-tree=../a -C c/a.git status >actual &&
test_cmp expected actual
expecting success: test "$(test-path-utils normalize_path_copy './')" = ''
ok 3 - normalize path: ./ =>
expecting success: test "$(test-path-utils normalize_path_copy './.')" = ''
ok 220 - non-existent file in subdir a/ ignored with --verbose --non-matching
ok 4 - normalize path: ./. =>
expecting success: test "$(test-path-utils normalize_path_copy './..')" = '++failed++'
expecting success:
expect "$expect" &&
eval "$code"
ok 7 - Order should not matter: "--work-tree=../a -C c/a.git" is equivalent to "-C c/a.git --work-tree=../a"
expecting success:
git --git-dir=c/a.git --work-tree=c/a status >expected &&
git -C c --git-dir=a.git --work-tree=a status >actual &&
test_cmp expected actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0061-run-command/.git/
ok 5 - normalize path: ./.. => ++failed++
expecting success: test "$(test-path-utils normalize_path_copy '../.')" = '++failed++'
expecting success:
test-run-command start-command-ENOENT ./does-not-exist
ok 6 - normalize path: ../. => ++failed++
ok 221 - non-existent file in subdir a/ ignored with --no-index
expecting success: test "$(test-path-utils normalize_path_copy './.././/')" = '++failed++'
error: cannot run ./does-not-exist: No such file or directory
expecting success:
expect '' &&
test_check_ignore 'a/one'
ok 1 - start_command reports ENOENT
expecting success:
cat hello-script >hello.sh &&
chmod +x hello.sh &&
test-run-command run-command ./hello.sh >actual 2>err &&
test_cmp hello-script actual &&
test_cmp empty err
ok 8 - Effect on --git-dir and --work-tree options - "-C c --git-dir=a.git --work-tree=a" is equivalent to "--git-dir=c/a.git --work-tree=c/a"
expecting success:
git -C c --git-dir=a.git --work-tree=a status >expected &&
git --git-dir=a.git -C c --work-tree=a status >actual &&
test_cmp expected actual
ok 7 - normalize path: ./../.// => ++failed++
expecting success: test "$(test-path-utils normalize_path_copy 'dir/..')" = ''
ok 8 - normalize path: dir/.. =>
ok 222 - non-existent file in subdir a/ ignored with --no-index -q
expecting success:
expect '' &&
test_check_ignore 'a/one'
expecting success: test "$(test-path-utils normalize_path_copy 'dir/sub/../..')" = ''
ok 2 - run_command can run a command
ok 9 - normalize path: dir/sub/../.. =>
expecting success:
cat hello-script >hello.sh &&
chmod -x hello.sh &&
test_must_fail test-run-command run-command ./hello.sh 2>err &&
grep "fatal: cannot exec.*hello.sh" err
ok 9 - Order should not matter: "-C c --git-dir=a.git --work-tree=a" is equivalent to "--git-dir=a.git -C c --work-tree=a"
expecting success:
git -C c --git-dir=a.git --work-tree=a status >expected &&
git --git-dir=a.git --work-tree=a -C c status >actual &&
test_cmp expected actual
expecting success: test "$(test-path-utils normalize_path_copy 'dir/sub/../../..')" = '++failed++'
ok 223 - non-existent file in subdir a/ ignored with --no-index --quiet
expecting success:
expect '.gitignore:1:one a/one' &&
test_check_ignore 'a/one'
ok 10 - normalize path: dir/sub/../../.. => ++failed++
fatal: cannot exec './hello.sh': Permission denied
expecting success: test "$(test-path-utils normalize_path_copy 'dir')" = 'dir'
ok 3 - run_command reports EACCES
checking prerequisite: SANITY
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
mkdir SANETESTD.1 SANETESTD.2 &&
chmod +w SANETESTD.1 SANETESTD.2 &&
>SANETESTD.1/x 2>SANETESTD.2/x &&
chmod -w SANETESTD.1 &&
chmod -rx SANETESTD.2 ||
error "bug in test sript: cannot prepare SANETESTD"
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
error "bug in test sript: cannot clean SANETESTD"
return $status
)
ok 224 - non-existent file in subdir a/ ignored with --no-index -v
expecting success:
expect '.gitignore:1:one a/one' &&
test_check_ignore 'a/one'
ok 11 - normalize path: dir => dir
ok 10 - Order should not matter: "-C c --git-dir=a.git --work-tree=a" is equivalent to "--git-dir=a.git --work-tree=a -C c"
expecting success:
echo "initial in dir1/dir2" >expected &&
git -C dir1 -C "$(pwd)/dir1/dir2" log --format=%s >actual &&
test_cmp expected actual
expecting success: test "$(test-path-utils normalize_path_copy 'dir//')" = 'dir/'
ok 225 - non-existent file in subdir a/ ignored with --no-index -v -n
expecting success:
expect '.gitignore:1:one a/one' &&
test_check_ignore 'a/one'
ok 12 - normalize path: dir// => dir/
rm: cannot remove 'SANETESTD.1/x': Permission denied
ok 11 - Relative followed by fullpath: "-C ./here -C /there" is equivalent to "-C /there"
expecting success: test "$(test-path-utils normalize_path_copy './dir')" = 'dir'
# passed all 11 test(s)
1..11
prerequisite SANITY ok
expecting success:
mkdir local-command &&
test_when_finished "chmod u+rwx local-command && rm -fr local-command" &&
git config alias.nitfol "!echo frotz" &&
chmod a-rx local-command &&
(
PATH=./local-command:$PATH &&
git nitfol >actual
) &&
echo frotz >expect &&
test_cmp expect actual
ok 13 - normalize path: ./dir => dir
ok 226 - non-existent file in subdir a/ ignored with --no-index -v --non-matching
expecting success:
expect '.gitignore:1:one a/one' &&
test_check_ignore 'a/one'
expecting success: test "$(test-path-utils normalize_path_copy 'dir/.')" = 'dir/'
ok 14 - normalize path: dir/. => dir/
expecting success: test "$(test-path-utils normalize_path_copy 'dir///./')" = 'dir/'
ok 227 - non-existent file in subdir a/ ignored with --no-index --verbose
expecting success:
expect '.gitignore:1:one a/one' &&
test_check_ignore 'a/one'
ok 15 - normalize path: dir///./ => dir/
expecting success: test "$(test-path-utils normalize_path_copy 'dir//sub/..')" = 'dir/'
ok 4 - unreadable directory in PATH
*** t0062-revision-walking.sh ***
ok 228 - non-existent file in subdir a/ ignored with --no-index --verbose -n
expecting success:
expect '.gitignore:1:one a/one' &&
test_check_ignore 'a/one'
# passed all 4 test(s)
1..4
ok 16 - normalize path: dir//sub/.. => dir/
expecting success: test "$(test-path-utils normalize_path_copy 'dir/sub/../')" = 'dir/'
ok 17 - normalize path: dir/sub/../ => dir/
*** t0063-string-list.sh ***
ok 229 - non-existent file in subdir a/ ignored with --no-index --verbose --non-matching
expecting success: test "$(test-path-utils normalize_path_copy 'dir/sub/../.')" = 'dir/'
ok 18 - normalize path: dir/sub/../. => dir/
expecting success:
expect "$expect" &&
eval "$code"
expecting success: test "$(test-path-utils normalize_path_copy 'dir/s1/../s2/')" = 'dir/s2/'
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0062-revision-walking/.git/
ok 19 - normalize path: dir/s1/../s2/ => dir/s2/
ok 230 - existing untracked file in subdir a/ not ignored
expecting success: test "$(test-path-utils normalize_path_copy 'd1/s1///s2/..//../s3/')" = 'd1/s3/'
expecting success:
expect '' &&
test_check_ignore 'a/not-ignored' 1
expecting success:
echo a > a &&
git add a &&
git commit -m "add a" &&
echo b > b &&
git add b &&
git commit -m "add b"
ok 20 - normalize path: d1/s1///s2/..//../s3/ => d1/s3/
expecting success: test "$(test-path-utils normalize_path_copy 'd1/s1//../s2/../../d2')" = 'd2'
ok 231 - existing untracked file in subdir a/ not ignored with -q
expecting success:
expect '' &&
test_check_ignore 'a/not-ignored' 1
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0063-string-list/.git/
ok 21 - normalize path: d1/s1//../s2/../../d2 => d2
[master (root-commit) 378779e] add a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
expecting success:
test-string-list split 'foo:bar:baz' ':' '-1' >actual &&
test_cmp expected actual &&
test-string-list split_in_place 'foo:bar:baz' ':' '-1' >actual &&
test_cmp expected actual
expecting success: test "$(test-path-utils normalize_path_copy 'd1/.../d2')" = 'd1/.../d2'
ok 232 - existing untracked file in subdir a/ not ignored with --quiet
expecting success:
expect '' &&
test_check_ignore 'a/not-ignored' 1
ok 22 - normalize path: d1/.../d2 => d1/.../d2
expecting success: test "$(test-path-utils normalize_path_copy 'd1/..././../d2')" = 'd1/d2'
ok 1 - split foo:bar:baz at :, max -1
expecting success:
test-string-list split 'foo:bar:baz' ':' '0' >actual &&
test_cmp expected actual &&
test-string-list split_in_place 'foo:bar:baz' ':' '0' >actual &&
test_cmp expected actual
ok 23 - normalize path: d1/..././../d2 => d1/d2
ok 233 - existing untracked file in subdir a/ not ignored with -v
expecting success:
expect ':: a/not-ignored' &&
test_check_ignore 'a/not-ignored' 1
[master 1a1e17b] add b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b
expecting success: test "$(test-path-utils normalize_path_copy '/')" = '/'
ok 1 - setup
expecting success:
test-revision-walking run-twice >run_twice_actual &&
test_cmp run_twice_expected run_twice_actual
ok 24 - normalize path: / => /
ok 2 - split foo:bar:baz at :, max 0
expecting success:
test-string-list split 'foo:bar:baz' ':' '1' >actual &&
test_cmp expected actual &&
test-string-list split_in_place 'foo:bar:baz' ':' '1' >actual &&
test_cmp expected actual
ok 2 - revision walking can be done twice
ok 234 - existing untracked file in subdir a/ not ignored with -v -n
expecting success:
expect ':: a/not-ignored' &&
test_check_ignore 'a/not-ignored' 1
expecting success: test "$(test-path-utils normalize_path_copy '//')" = '/'
# passed all 2 test(s)
1..2
ok 25 - normalize path: // => /
ok 3 - split foo:bar:baz at :, max 1
expecting success:
test-string-list split 'foo:bar:baz' ':' '2' >actual &&
test_cmp expected actual &&
test-string-list split_in_place 'foo:bar:baz' ':' '2' >actual &&
test_cmp expected actual
ok 235 - existing untracked file in subdir a/ not ignored with -v --non-matching
expecting success: test "$(test-path-utils normalize_path_copy '///')" = '/'
expecting success:
expect '' &&
test_check_ignore 'a/not-ignored' 1
ok 26 - normalize path: /// => /
*** t0064-sha1-array.sh ***
expecting success: test "$(test-path-utils normalize_path_copy '/.')" = '/'
ok 236 - existing untracked file in subdir a/ not ignored with --verbose
expecting success:
expect ':: a/not-ignored' &&
test_check_ignore 'a/not-ignored' 1
ok 4 - split foo:bar:baz at :, max 2
ok 27 - normalize path: /. => /
expecting success:
test-string-list split 'foo:bar:' ':' '-1' >actual &&
test_cmp expected actual &&
test-string-list split_in_place 'foo:bar:' ':' '-1' >actual &&
test_cmp expected actual
expecting success: test "$(test-path-utils normalize_path_copy '/./')" = '/'
ok 28 - normalize path: /./ => /
ok 237 - existing untracked file in subdir a/ not ignored with --verbose -n
expecting success:
expect ':: a/not-ignored' &&
test_check_ignore 'a/not-ignored' 1
ok 5 - split foo:bar: at :, max -1
expecting success:
test-string-list split '' ':' '-1' >actual &&
test_cmp expected actual &&
test-string-list split_in_place '' ':' '-1' >actual &&
test_cmp expected actual
expecting success: test "$(test-path-utils normalize_path_copy '/./..')" = '++failed++'
ok 29 - normalize path: /./.. => ++failed++
ok 238 - existing untracked file in subdir a/ not ignored with --verbose --non-matching
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0064-sha1-array/.git/
expecting success: test "$(test-path-utils normalize_path_copy '/../.')" = '++failed++'
ok 6 - split at :, max -1
ok 30 - normalize path: /../. => ++failed++
expecting success:
expect "$expect" &&
eval "$code"
expecting success:
test-string-list split ':' ':' '-1' >actual &&
test_cmp expected actual &&
test-string-list split_in_place ':' ':' '-1' >actual &&
test_cmp expected actual
expecting success:
echo20 "" 44 55 88 aa >expect &&
{
echo20 append 88 44 aa 55 &&
echo for_each_unique
} | test-sha1-array >actual &&
test_cmp expect actual
expecting success: test "$(test-path-utils normalize_path_copy '/./.././/')" = '++failed++'
ok 1 - ordered enumeration
expecting success:
echo20 "" 44 55 88 aa >expect &&
{
echo20 append 88 44 aa 55 &&
echo20 append 88 44 aa 55 &&
echo for_each_unique
} | test-sha1-array >actual &&
test_cmp expect actual
ok 31 - normalize path: /./../.// => ++failed++
ok 239 - existing untracked file in subdir a/ not ignored with --no-index
ok 7 - split : at :, max -1
expecting success:
test "x-" = "x$(test-string-list filter - y)" &&
test "x-" = "x$(test-string-list filter no y)" &&
test yes = "$(test-string-list filter yes y)" &&
test yes = "$(test-string-list filter no:yes y)" &&
test yes = "$(test-string-list filter yes:no y)" &&
test y1:y2 = "$(test-string-list filter y1:y2 y)" &&
test y2:y1 = "$(test-string-list filter y2:y1 y)" &&
test "x-" = "x$(test-string-list filter x1:x2 y)"
expecting success:
expect '' &&
test_check_ignore 'a/not-ignored' 1
expecting success: test "$(test-path-utils normalize_path_copy '/dir/..')" = '/'
ok 2 - ordered enumeration with duplicate suppression
expecting success:
{
echo20 append 88 44 aa 55 &&
echo20 lookup 55
} | test-sha1-array >actual &&
n=$(cat actual) &&
test "$n" -eq 1
ok 32 - normalize path: /dir/.. => /
expecting success: test "$(test-path-utils normalize_path_copy '/dir/sub/../..')" = '/'
ok 3 - lookup
expecting success:
{
echo20 append 88 44 aa 55 &&
echo20 lookup 33
} | test-sha1-array >actual &&
n=$(cat actual) &&
test "$n" -lt 0
ok 240 - existing untracked file in subdir a/ not ignored with --no-index -q
expecting success:
expect '' &&
test_check_ignore 'a/not-ignored' 1
ok 33 - normalize path: /dir/sub/../.. => /
ok 4 - lookup non-existing entry
expecting success:
{
echo20 append 88 44 aa 55 &&
echo20 append 88 44 aa 55 &&
echo20 lookup 55
} | test-sha1-array >actual &&
n=$(cat actual) &&
test "$n" -ge 2 &&
test "$n" -le 3
expecting success: test "$(test-path-utils normalize_path_copy '/dir/sub/../../..')" = '++failed++'
ok 241 - existing untracked file in subdir a/ not ignored with --no-index --quiet
expecting success:
expect '' &&
test_check_ignore 'a/not-ignored' 1
ok 5 - lookup with duplicates
expecting success:
{
echo20 append 88 44 aa 55 &&
echo20 append 88 44 aa 55 &&
echo20 lookup 66
} | test-sha1-array >actual &&
n=$(cat actual) &&
test "$n" -lt 0
ok 34 - normalize path: /dir/sub/../../.. => ++failed++
expecting success: test "$(test-path-utils normalize_path_copy '/dir')" = '/dir'
ok 6 - lookup non-existing entry with duplicates
expecting success:
{
echo "append 5555555555555555555555555555555555555555" &&
echo "append 555555555555555555555555555555555555555f" &&
echo20 lookup 55
} | test-sha1-array >actual &&
n=$(cat actual) &&
test "$n" -eq 0
ok 8 - test filter_string_list
expecting success:
test "x-" = "x$(test-string-list remove_duplicates -)" &&
test "x" = "x$(test-string-list remove_duplicates "")" &&
test a = "$(test-string-list remove_duplicates a)" &&
test a = "$(test-string-list remove_duplicates a:a)" &&
test a = "$(test-string-list remove_duplicates a:a:a:a:a)" &&
test a:b = "$(test-string-list remove_duplicates a:b)" &&
test a:b = "$(test-string-list remove_duplicates a:a:b)" &&
test a:b = "$(test-string-list remove_duplicates a:b:b)" &&
test a:b:c = "$(test-string-list remove_duplicates a:b:c)" &&
test a:b:c = "$(test-string-list remove_duplicates a:a:b:c)" &&
test a:b:c = "$(test-string-list remove_duplicates a:b:b:c)" &&
test a:b:c = "$(test-string-list remove_duplicates a:b:c:c)" &&
test a:b:c = "$(test-string-list remove_duplicates a:a:b:b:c:c)" &&
test a:b:c = "$(test-string-list remove_duplicates a:a:a:b:b:b:c:c:c)"
ok 242 - existing untracked file in subdir a/ not ignored with --no-index -v
expecting success:
expect ':: a/not-ignored' &&
test_check_ignore 'a/not-ignored' 1
ok 35 - normalize path: /dir => /dir
ok 7 - lookup with almost duplicate values
expecting success:
{
echo20 append 55 55 &&
echo20 lookup 55
} | test-sha1-array >actual &&
n=$(cat actual) &&
test "$n" -ge 0 &&
test "$n" -le 1
expecting success: test "$(test-path-utils normalize_path_copy '/dir//')" = '/dir/'
ok 36 - normalize path: /dir// => /dir/
ok 243 - existing untracked file in subdir a/ not ignored with --no-index -v -n
ok 8 - lookup with single duplicate value
expecting success:
expect ':: a/not-ignored' &&
test_check_ignore 'a/not-ignored' 1
expecting success: test "$(test-path-utils normalize_path_copy '/./dir')" = '/dir'
# passed all 8 test(s)
1..8
ok 37 - normalize path: /./dir => /dir
expecting success: test "$(test-path-utils normalize_path_copy '/dir/.')" = '/dir/'
ok 244 - existing untracked file in subdir a/ not ignored with --no-index -v --non-matching
expecting success:
expect '' &&
test_check_ignore 'a/not-ignored' 1
*** t0070-fundamental.sh ***
ok 38 - normalize path: /dir/. => /dir/
expecting success: test "$(test-path-utils normalize_path_copy '/dir///./')" = '/dir/'
ok 245 - existing untracked file in subdir a/ not ignored with --no-index --verbose
expecting success:
expect ':: a/not-ignored' &&
test_check_ignore 'a/not-ignored' 1
ok 39 - normalize path: /dir///./ => /dir/
expecting success: test "$(test-path-utils normalize_path_copy '/dir//sub/..')" = '/dir/'
ok 246 - existing untracked file in subdir a/ not ignored with --no-index --verbose -n
expecting success:
expect ':: a/not-ignored' &&
test_check_ignore 'a/not-ignored' 1
ok 40 - normalize path: /dir//sub/.. => /dir/
ok 9 - test remove_duplicates
expecting success: test "$(test-path-utils normalize_path_copy '/dir/sub/../')" = '/dir/'
# passed all 9 test(s)
1..9
ok 41 - normalize path: /dir/sub/../ => /dir/
ok 247 - existing untracked file in subdir a/ not ignored with --no-index --verbose --non-matching
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0070-fundamental/.git/
expecting success: test "$(test-path-utils normalize_path_copy '//dir/sub/../.')" = '/dir/'
expecting success:
expect "$expect" &&
eval "$code"
*** t0081-line-buffer.sh ***
expecting success:
test-ctype
ok 42 - normalize path: //dir/sub/../. => /dir/
expecting success: test "$(test-path-utils normalize_path_copy '/dir/s1/../s2/')" = '/dir/s2/'
ok 1 - character classes (isspace, isalpha etc.)
expecting success:
test_must_fail test-mktemp doesnotexist/testXXXXXX 2>err &&
grep "doesnotexist/test" err
ok 43 - normalize path: /dir/s1/../s2/ => /dir/s2/
ok 248 - existing tracked file in subdir a/ not ignored
fatal: Unable to create temporary file '/«PKGBUILDDIR»/t/trash directory.t0070-fundamental/doesnotexist/testjiXANf': No such file or directory
ok 2 - mktemp to nonexistent directory prints filename
expecting success:
expect '' &&
test_check_ignore 'a/ignored-but-in-index' 1
expecting success: test "$(test-path-utils normalize_path_copy '/d1/s1///s2/..//../s3/')" = '/d1/s3/'
checking prerequisite: SANITY
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
mkdir SANETESTD.1 SANETESTD.2 &&
chmod +w SANETESTD.1 SANETESTD.2 &&
>SANETESTD.1/x 2>SANETESTD.2/x &&
chmod -w SANETESTD.1 &&
chmod -rx SANETESTD.2 ||
error "bug in test sript: cannot prepare SANETESTD"
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
error "bug in test sript: cannot clean SANETESTD"
return $status
)
ok 44 - normalize path: /d1/s1///s2/..//../s3/ => /d1/s3/
expecting success: test "$(test-path-utils normalize_path_copy '/d1/s1//../s2/../../d2')" = '/d2'
rm: cannot remove 'SANETESTD.1/x': Permission denied
ok 249 - existing tracked file in subdir a/ not ignored with -q
expecting success:
expect '' &&
test_check_ignore 'a/ignored-but-in-index' 1
ok 45 - normalize path: /d1/s1//../s2/../../d2 => /d2
expecting success: test "$(test-path-utils normalize_path_copy '/d1/.../d2')" = '/d1/.../d2'
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0081-line-buffer/.git/
prerequisite SANITY ok
expecting success:
mkdir cannotwrite &&
chmod -w cannotwrite &&
test_when_finished "chmod +w cannotwrite" &&
test_must_fail test-mktemp cannotwrite/testXXXXXX 2>err &&
grep "cannotwrite/test" err
ok 46 - normalize path: /d1/.../d2 => /d1/.../d2
ok 250 - existing tracked file in subdir a/ not ignored with --quiet
expecting success:
expect '' &&
test_check_ignore 'a/ignored-but-in-index' 1
expecting success:
echo ">HELLO" >expect &&
test-line-buffer <<-\EOF >actual &&
binary 6
HELLO
EOF
test_cmp expect actual
expecting success: test "$(test-path-utils normalize_path_copy '/d1/..././../d2')" = '/d1/d2'
fatal: Unable to create temporary file '/«PKGBUILDDIR»/t/trash directory.t0070-fundamental/cannotwrite/testxolwhp': Permission denied
ok 47 - normalize path: /d1/..././../d2 => /d1/d2
expecting success: actual=$(test-path-utils longest_ancestor_length '/' '/') &&
test "$actual" = '-1'
ok 1 - hello world
expecting success:
echo ">HELLO" >expect &&
test-line-buffer <<-\EOF >actual &&
binary 0
copy 6
HELLO
EOF
test_cmp expect actual
ok 3 - mktemp to unwritable directory prints filename
expecting success:
git commit --allow-empty -m message <&-
ok 251 - existing tracked file in subdir a/ not ignored with -v
expecting success:
expect ':: a/ignored-but-in-index' &&
test_check_ignore 'a/ignored-but-in-index' 1
ok 48 - longest ancestor: / / => -1
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo' '/') &&
test "$actual" = '0'
ok 2 - 0-length read, send along greeting
expecting success:
rm -f input &&
echo hello >expect &&
echo hello >input &&
echo copy 6 |
test-line-buffer "&4" 4<input >actual &&
test_cmp expect actual
ok 49 - longest ancestor: /foo / => 0
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo' '/fo') &&
test "$actual" = '-1'
[master (root-commit) c4e959d] message
Author: A U Thor <author@example.com>
ok 4 - git_mkstemps_mode does not fail if fd 0 is not open
expecting success:
# if this test fails, re-build git with NO_REGEX=1
test-regex
ok 252 - existing tracked file in subdir a/ not ignored with -v -n
expecting success:
expect ':: a/ignored-but-in-index' &&
test_check_ignore 'a/ignored-but-in-index' 1
ok 50 - longest ancestor: /foo /fo => -1
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo' '/foo') &&
test "$actual" = '-1'
ok 5 - check for a bug in the regex routines
ok 51 - longest ancestor: /foo /foo => -1
ok 3 - read from file descriptor
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo' '/bar') &&
test "$actual" = '-1'
expecting success:
echo Q | q_to_nul >expect &&
q_to_nul <<-\EOF | test-line-buffer >actual &&
skip 2
Q
copy 2
Q
EOF
test_cmp expect actual
# passed all 5 test(s)
1..5
ok 52 - longest ancestor: /foo /bar => -1
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo' '/foo/bar') &&
test "$actual" = '-1'
ok 253 - existing tracked file in subdir a/ not ignored with -v --non-matching
expecting success:
expect '' &&
test_check_ignore 'a/ignored-but-in-index' 1
ok 53 - longest ancestor: /foo /foo/bar => -1
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo' '/foo:/bar') &&
test "$actual" = '-1'
ok 4 - skip, copy null byte
expecting success:
echo ">QhelloQ" | q_to_nul >expect &&
q_to_nul <<-\EOF | test-line-buffer >actual &&
binary 8
QhelloQ
EOF
test_cmp expect actual
*** t0090-cache-tree.sh ***
ok 54 - longest ancestor: /foo /foo:/bar => -1
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo' '/:/foo:/bar') &&
test "$actual" = '0'
ok 254 - existing tracked file in subdir a/ not ignored with --verbose
expecting success:
expect ':: a/ignored-but-in-index' &&
test_check_ignore 'a/ignored-but-in-index' 1
ok 55 - longest ancestor: /foo /:/foo:/bar => 0
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo' '/foo:/:/bar') &&
test "$actual" = '0'
ok 56 - longest ancestor: /foo /foo:/:/bar => 0
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo' '/:/bar:/foo') &&
test "$actual" = '0'
ok 5 - read null byte
expecting success:
echo ">foo" >expect &&
test-line-buffer <<-\EOF >actual &&
binary 5
foo
EOF
test_cmp expect actual
ok 255 - existing tracked file in subdir a/ not ignored with --verbose -n
expecting success:
expect ':: a/ignored-but-in-index' &&
test_check_ignore 'a/ignored-but-in-index' 1
ok 57 - longest ancestor: /foo /:/bar:/foo => 0
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo/bar' '/') &&
test "$actual" = '0'
ok 6 - long reads are truncated
expecting success:
printf "%s\n" ">" foo >expect &&
test-line-buffer <<-\EOF >actual &&
binary 1
copy 5
foo
EOF
test_cmp expect actual
ok 58 - longest ancestor: /foo/bar / => 0
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo/bar' '/fo') &&
test "$actual" = '-1'
ok 256 - existing tracked file in subdir a/ not ignored with --verbose --non-matching
ok 59 - longest ancestor: /foo/bar /fo => -1
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo/bar' '/foo') &&
test "$actual" = '4'
ok 7 - long copies are truncated
expecting success:
echo ">foo" >expect &&
test-line-buffer <<-\EOF >actual &&
binary 5
foo
EOF
test_cmp expect actual
ok 60 - longest ancestor: /foo/bar /foo => 4
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo/bar' '/foo/ba') &&
test "$actual" = '-1'
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0090-cache-tree/.git/
expecting success:
expect "$expect" &&
eval "$code"
ok 8 - long binary reads are truncated
ok 61 - longest ancestor: /foo/bar /foo/ba => -1
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo/bar' '/:/fo') &&
test "$actual" = '0'
expecting success:
test_commit foo &&
test_cache_tree
# passed all 8 test(s)
1..8
ok 62 - longest ancestor: /foo/bar /:/fo => 0
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo/bar' '/foo:/foo/ba') &&
test "$actual" = '4'
ok 63 - longest ancestor: /foo/bar /foo:/foo/ba => 4
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo/bar' '/bar') &&
test "$actual" = '-1'
ok 257 - existing tracked file in subdir a/ shown as ignored with --no-index
expecting success:
expect '' &&
test_check_ignore 'a/ignored-but-in-index'
ok 64 - longest ancestor: /foo/bar /bar => -1
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo/bar' '/fo') &&
test "$actual" = '-1'
*** t0100-previous.sh ***
[master (root-commit) ddd63c9] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
ok 65 - longest ancestor: /foo/bar /fo => -1
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo/bar' '/foo:/bar') &&
test "$actual" = '4'
ok 66 - longest ancestor: /foo/bar /foo:/bar => 4
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo/bar' '/:/foo:/bar') &&
test "$actual" = '4'
ok 258 - existing tracked file in subdir a/ shown as ignored with --no-index -q
expecting success:
expect '' &&
test_check_ignore 'a/ignored-but-in-index'
ok 67 - longest ancestor: /foo/bar /:/foo:/bar => 4
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo/bar' '/foo:/:/bar') &&
test "$actual" = '4'
ok 68 - longest ancestor: /foo/bar /foo:/:/bar => 4
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo/bar' '/:/bar:/fo') &&
test "$actual" = '0'
ok 259 - existing tracked file in subdir a/ shown as ignored with --no-index --quiet
expecting success:
expect '.gitignore:2:ignored-* a/ignored-but-in-index' &&
test_check_ignore 'a/ignored-but-in-index'
ok 69 - longest ancestor: /foo/bar /:/bar:/fo => 0
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo/bar' '/:/bar') &&
test "$actual" = '0'
ok 70 - longest ancestor: /foo/bar /:/bar => 0
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo/bar' '/foo') &&
test "$actual" = '4'
ok 71 - longest ancestor: /foo/bar /foo => 4
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo/bar' '/foo:/bar') &&
test "$actual" = '4'
ok 260 - existing tracked file in subdir a/ shown as ignored with --no-index -v
expecting success:
expect '.gitignore:2:ignored-* a/ignored-but-in-index' &&
test_check_ignore 'a/ignored-but-in-index'
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0100-previous/.git/
ok 1 - initial commit has cache-tree
expecting success:
git read-tree HEAD &&
test_cache_tree
ok 72 - longest ancestor: /foo/bar /foo:/bar => 4
expecting success: actual=$(test-path-utils longest_ancestor_length '/foo/bar' '/bar') &&
test "$actual" = '-1'
expecting success:
test_commit A &&
git checkout -b junk &&
git checkout - &&
test "$(git symbolic-ref HEAD)" = refs/heads/master &&
git branch -d @{-1} &&
test_must_fail git rev-parse --verify refs/heads/junk
ok 73 - longest ancestor: /foo/bar /bar => -1
expecting success:
test c:/msysgit = $(test-path-utils strip_path_suffix \
c:/msysgit/libexec//git-core libexec/git-core)
ok 74 - strip_path_suffix
expecting success:
test_must_fail test-path-utils absolute_path ""
ok 261 - existing tracked file in subdir a/ shown as ignored with --no-index -v -n
expecting success:
expect '.gitignore:2:ignored-* a/ignored-but-in-index' &&
test_check_ignore 'a/ignored-but-in-index'
fatal: The empty string is not a valid path
ok 75 - absolute path rejects the empty string
expecting success:
test_must_fail test-path-utils real_path ""
fatal: The empty string is not a valid path
ok 76 - real path rejects the empty string
expecting success:
nopath="hopefully-absent-path" &&
test "/" = "$(test-path-utils real_path "/")" &&
test "/$nopath" = "$(test-path-utils real_path "/$nopath")"
[master (root-commit) 0ddfaf1] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
ok 262 - existing tracked file in subdir a/ shown as ignored with --no-index -v --non-matching
expecting success:
expect '.gitignore:2:ignored-* a/ignored-but-in-index' &&
test_check_ignore 'a/ignored-but-in-index'
ok 77 - real path works on absolute paths 1
expecting success:
nopath="hopefully-absent-path" &&
# Find an existing top-level directory for the remaining tests:
d=$(pwd -P | sed -e "s|^\([^/]*/[^/]*\)/.*|\1|") &&
test "$d" = "$(test-path-utils real_path "$d")" &&
test "$d/$nopath" = "$(test-path-utils real_path "$d/$nopath")"
ok 2 - read-tree HEAD establishes cache-tree
expecting success:
test_when_finished "git reset --hard; git read-tree HEAD" &&
echo "I changed this file" >foo &&
git add foo &&
test_invalid_cache_tree
ok 263 - existing tracked file in subdir a/ shown as ignored with --no-index --verbose
expecting success:
expect '.gitignore:2:ignored-* a/ignored-but-in-index' &&
test_check_ignore 'a/ignored-but-in-index'
Switched to a new branch 'junk'
ok 78 - real path works on absolute paths 2
expecting success:
nopath="hopefully-absent-path" &&
test "/" = "$(test-path-utils real_path "///")" &&
test "/$nopath" = "$(test-path-utils real_path "///$nopath")" &&
# Find an existing top-level directory for the remaining tests:
d=$(pwd -P | sed -e "s|^\([^/]*/[^/]*\)/.*|\1|") &&
test "$d" = "$(test-path-utils real_path "//$d")" &&
test "$d/$nopath" = "$(test-path-utils real_path "//$d/$nopath")"
Switched to branch 'master'
ok 264 - existing tracked file in subdir a/ shown as ignored with --no-index --verbose -n
expecting success:
expect '.gitignore:2:ignored-* a/ignored-but-in-index' &&
test_check_ignore 'a/ignored-but-in-index'
HEAD is now at ddd63c9 foo
Deleted branch junk (was 0ddfaf1).
ok 3 - git-add invalidates cache-tree
expecting success:
test_when_finished "git reset --hard; git read-tree HEAD" &&
mkdir dirx &&
echo "I changed this file" >dirx/foo &&
git add dirx/foo &&
test_invalid_cache_tree
ok 265 - existing tracked file in subdir a/ shown as ignored with --no-index --verbose --non-matching
ok 79 - real path removes extra leading slashes
expecting success:
nopath="hopefully-absent-path" &&
# Find an existing top-level directory for the remaining tests:
d=$(pwd -P | sed -e "s|^\([^/]*/[^/]*\)/.*|\1|") &&
test "$d" = "$(test-path-utils real_path "$d///")" &&
test "$d/$nopath" = "$(test-path-utils real_path "$d///$nopath")"
fatal: Needed a single revision
ok 1 - branch -d @{-1}
expecting success:
git reflog expire --expire=now &&
git checkout -b junk2 &&
git checkout - &&
test "$(git symbolic-ref HEAD)" = refs/heads/master &&
test_must_fail git branch -d @{-12} &&
git rev-parse --verify refs/heads/master
expecting success:
expect "$expect" &&
eval "$code"
error: invalid object 040000 59d259507ddf2acc00997a8b70c61d7bdc240440 for 'dirx'
ok 80 - real path removes other extra slashes
checking prerequisite: SYMLINKS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# test whether the filesystem supports symbolic links
ln -s x y && test -h y
)
Switched to a new branch 'junk2'
ok 266 - existing untracked file in subdir a/ ignored
HEAD is now at ddd63c9 foo
expecting success:
expect '' &&
test_check_ignore 'a/ignored-and-untracked'
prerequisite SYMLINKS ok
expecting success:
mkdir first &&
ln -s ../.git first/.git &&
mkdir second &&
ln -s ../first second/other &&
mkdir third &&
dir="$(cd .git; pwd -P)" &&
dir2=third/../second/other/.git &&
test "$dir" = "$(test-path-utils real_path $dir2)" &&
file="$dir"/index &&
test "$file" = "$(test-path-utils real_path $dir2/index)" &&
basename=blub &&
test "$dir/$basename" = "$(cd .git && test-path-utils real_path "$basename")" &&
ln -s ../first/file .git/syml &&
sym="$(cd first; pwd -P)"/file &&
test "$sym" = "$(test-path-utils real_path "$dir2/syml")"
Switched to branch 'master'
ok 4 - git-add in subdir invalidates cache-tree
expecting success:
git tag no-children &&
test_when_finished "git reset --hard no-children; git read-tree HEAD" &&
mkdir dir1 dir2 &&
test_commit dir1/a &&
test_commit dir2/b &&
echo "I changed this file" >dir1/a &&
cmp_cache_tree before &&
echo "I changed this file" >dir1/a &&
git add dir1/a &&
cmp_cache_tree expect
ok 267 - existing untracked file in subdir a/ ignored with -q
expecting success:
expect '' &&
test_check_ignore 'a/ignored-and-untracked'
error: branch '@{-12}' not found.
0ddfaf193ff13d6ab39b7cbd9eed645e3ee2f050
ok 2 - branch -d @{-12} when there is not enough switches yet
expecting success:
git checkout A &&
test_commit B &&
git checkout A &&
test_commit C &&
test_commit D &&
git branch -f master B &&
git branch -f other &&
git checkout other &&
git checkout master &&
git merge @{-1} &&
git cat-file commit HEAD | grep "Merge branch 'other'"
ok 268 - existing untracked file in subdir a/ ignored with --quiet
expecting success:
expect '.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore 'a/ignored-and-untracked'
ok 81 - real path works on symlinks
Note: checking out 'A'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 0ddfaf1... A
expecting success:
ln -s target symlink &&
test "$(test-path-utils prefix_path prefix "$(pwd)/symlink")" = "symlink"
[master 365c8fc] dir1/a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 dir1/a.t
ok 82 - prefix_path works with absolute paths to work tree symlinks
expecting success:
echo "" >expected &&
test-path-utils prefix_path prefix "$(pwd)" >actual &&
test_cmp expected actual
ok 269 - existing untracked file in subdir a/ ignored with -v
expecting success:
expect '.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore 'a/ignored-and-untracked'
ok 83 - prefix_path works with only absolute path to work tree
expecting success:
test_must_fail test-path-utils prefix_path prefix "$(pwd)a"
[detached HEAD d9df450] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B.t
fatal: '/«PKGBUILDDIR»/t/trash directory.t0060-path-utilsa' is outside repository
ok 270 - existing untracked file in subdir a/ ignored with -v -n
ok 84 - prefix_path rejects absolute path to dir with same beginning as work tree
expecting success:
expect '.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore 'a/ignored-and-untracked'
expecting success:
git init repo &&
ln -s repo repolink &&
test "a" = "$(cd repo && test-path-utils prefix_path prefix "$(pwd)/../repolink/a")"
[master 8be4607] dir2/b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 dir2/b.t
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0060-path-utils/repo/.git/
Previous HEAD position was d9df450... B
HEAD is now at 0ddfaf1... A
ok 271 - existing untracked file in subdir a/ ignored with -v --non-matching
expecting success:
expect '.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore 'a/ignored-and-untracked'
ok 85 - prefix_path works with absolute path to a symlink to work tree having same beginning as work tree
expecting success: test "$(test-path-utils relative_path '/foo/a/b/c/' '/foo/a/b/')" = 'c/'
ok 272 - existing untracked file in subdir a/ ignored with --verbose
expecting success:
expect '.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore 'a/ignored-and-untracked'
ok 86 - relative path: /foo/a/b/c/ /foo/a/b/ => c/
[detached HEAD 5dee784] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 C.t
expecting success: test "$(test-path-utils relative_path '/foo/a/b/c/' '/foo/a/b')" = 'c/'
error: invalid object 040000 3b5b859722b671676295bf3795f34b8c6f2393f5 for 'dir1'
ok 87 - relative path: /foo/a/b/c/ /foo/a/b => c/
ok 273 - existing untracked file in subdir a/ ignored with --verbose -n
expecting success:
expect '.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore 'a/ignored-and-untracked'
expecting success: test "$(test-path-utils relative_path '/foo/a//b//c/' '///foo/a/b//')" = 'c/'
ok 88 - relative path: /foo/a//b//c/ ///foo/a/b// => c/
expecting success: test "$(test-path-utils relative_path '/foo/a/b' '/foo/a/b')" = './'
ok 274 - existing untracked file in subdir a/ ignored with --verbose --non-matching
[detached HEAD 12bd07b] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 D.t
HEAD is now at ddd63c9 foo
ok 89 - relative path: /foo/a/b /foo/a/b => ./
expecting success:
expect "$expect" &&
eval "$code"
expecting success: test "$(test-path-utils relative_path '/foo/a/b/' '/foo/a/b')" = './'
ok 5 - git-add in subdir does not invalidate sibling cache-tree
expecting success:
test_when_finished "git reset --hard; git read-tree HEAD" &&
echo "I changed this file" >foo &&
git update-index --add foo &&
test_invalid_cache_tree
ok 90 - relative path: /foo/a/b/ /foo/a/b => ./
expecting success: test "$(test-path-utils relative_path '/foo/a' '/foo/a/b')" = '../'
ok 275 - existing untracked file in subdir a/ ignored with --no-index
expecting success:
expect '' &&
test_check_ignore 'a/ignored-and-untracked'
ok 91 - relative path: /foo/a /foo/a/b => ../
expecting success: test "$(test-path-utils relative_path '/' '/foo/a/b/')" = '../../../'
Switched to branch 'other'
ok 92 - relative path: / /foo/a/b/ => ../../../
ok 276 - existing untracked file in subdir a/ ignored with --no-index -q
expecting success:
expect '' &&
test_check_ignore 'a/ignored-and-untracked'
HEAD is now at ddd63c9 foo
expecting success: test "$(test-path-utils relative_path '/foo/a/c' '/foo/a/b/')" = '../c'
Switched to branch 'master'
ok 93 - relative path: /foo/a/c /foo/a/b/ => ../c
ok 6 - update-index invalidates cache-tree
expecting success:
test-scrap-cache-tree &&
git write-tree &&
test_cache_tree
expecting success: test "$(test-path-utils relative_path '/foo/a/c' '/foo/a/b')" = '../c'
ok 277 - existing untracked file in subdir a/ ignored with --no-index --quiet
expecting success:
expect '.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore 'a/ignored-and-untracked'
Merging:
d9df450 B
virtual @{-1}
found 1 common ancestor:
0ddfaf1 A
Merge made by the 'recursive' strategy.
ok 94 - relative path: /foo/a/c /foo/a/b => ../c
expecting success: test "$(test-path-utils relative_path '/foo/x/y' '/foo/a/b/')" = '../../x/y'
64fd3796c57084e7b8cbae358ce37970b8e954f6
C.t | 1 +
D.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 C.t
create mode 100644 D.t
ok 278 - existing untracked file in subdir a/ ignored with --no-index -v
expecting success:
expect '.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore 'a/ignored-and-untracked'
ok 95 - relative path: /foo/x/y /foo/a/b/ => ../../x/y
Merge branch 'other'
ok 3 - merge @{-1}
expecting success:
git checkout master &&
git reset --hard B &&
git checkout other &&
git checkout master &&
git merge @{-1}~1 &&
git cat-file commit HEAD >actual &&
grep "Merge branch 'other'" actual
expecting success: test "$(test-path-utils relative_path '/foo/a/b' '<empty>')" = '/foo/a/b'
ok 96 - relative path: /foo/a/b <empty> => /foo/a/b
Already on 'master'
ok 279 - existing untracked file in subdir a/ ignored with --no-index -v -n
expecting success:
expect '.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore 'a/ignored-and-untracked'
expecting success: test "$(test-path-utils relative_path '/foo/a/b' '<null>')" = '/foo/a/b'
HEAD is now at d9df450 B
ok 97 - relative path: /foo/a/b <null> => /foo/a/b
ok 7 - write-tree establishes cache-tree
expecting success:
git read-tree HEAD &&
test-scrap-cache-tree &&
test_no_cache_tree
expecting success: test "$(test-path-utils relative_path 'foo/a/b/c/' 'foo/a/b/')" = 'c/'
ok 280 - existing untracked file in subdir a/ ignored with --no-index -v --non-matching
expecting success:
expect '.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore 'a/ignored-and-untracked'
Switched to branch 'other'
ok 98 - relative path: foo/a/b/c/ foo/a/b/ => c/
expecting success: test "$(test-path-utils relative_path 'foo/a/b/c/' 'foo/a/b')" = 'c/'
Switched to branch 'master'
ok 99 - relative path: foo/a/b/c/ foo/a/b => c/
ok 281 - existing untracked file in subdir a/ ignored with --no-index --verbose
expecting success:
expect '.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore 'a/ignored-and-untracked'
expecting success: test "$(test-path-utils relative_path 'foo/a/b//c' 'foo/a//b')" = 'c'
ok 8 - test-scrap-cache-tree works
expecting success:
test_commit bar &&
test_cache_tree
ok 100 - relative path: foo/a/b//c foo/a//b => c
Merging:
d9df450 B
virtual @{-1}~1
found 1 common ancestor:
0ddfaf1 A
Merge made by the 'recursive' strategy.
expecting success: test "$(test-path-utils relative_path 'foo/a/b/' 'foo/a/b/')" = './'
C.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 C.t
ok 282 - existing untracked file in subdir a/ ignored with --no-index --verbose -n
expecting success:
expect '.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore 'a/ignored-and-untracked'
ok 101 - relative path: foo/a/b/ foo/a/b/ => ./
expecting success: test "$(test-path-utils relative_path 'foo/a/b/' 'foo/a/b')" = './'
Merge branch 'other' (early part)
ok 4 - merge @{-1}~1
expecting success:
git reflog expire --expire=now &&
git checkout -f master &&
git reset --hard B &&
git branch -f other C &&
git checkout other &&
git checkout master &&
test_must_fail git merge @{-100}
[master eeeeed8] bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar.t
ok 102 - relative path: foo/a/b/ foo/a/b => ./
ok 283 - existing untracked file in subdir a/ ignored with --no-index --verbose --non-matching
expecting success: test "$(test-path-utils relative_path 'foo/a' 'foo/a/b')" = '../'
Already on 'master'
ok 103 - relative path: foo/a foo/a/b => ../
expecting success:
expect "$expect" &&
eval "$code"
expecting success: test "$(test-path-utils relative_path 'foo/x/y' 'foo/a/b')" = '../../x/y'
ok 104 - relative path: foo/x/y foo/a/b => ../../x/y
HEAD is now at d9df450 B
ok 284 - mix of file types in subdir a/
expecting success: test "$(test-path-utils relative_path 'foo/a/c' 'foo/a/b')" = '../c'
ok 9 - second commit has cache-tree
expecting success:
expect '.gitignore:1:one a/one
.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore '
a/non-existent
a/one
a/not-ignored
a/ignored-but-in-index
a/ignored-and-untracked'
expecting success:
cat <<-\EOT >foo.c &&
int foo()
{
return 42;
}
int bar()
{
return 42;
}
EOT
git add foo.c &&
test_invalid_cache_tree &&
git commit -m "add a file" &&
test_cache_tree &&
cat <<-\EOT >foo.c &&
int foo()
{
return 43;
}
int bar()
{
return 44;
}
EOT
(echo p; echo 1; echo; echo s; echo n; echo y; echo q) |
git commit --interactive -m foo &&
test_cache_tree
ok 105 - relative path: foo/a/c foo/a/b => ../c
expecting success: test "$(test-path-utils relative_path 'foo/a/b' '/foo/x/y')" = 'foo/a/b'
ok 106 - relative path: foo/a/b /foo/x/y => foo/a/b
ok 285 - mix of file types in subdir a/ with -v
expecting success:
expect ':: a/non-existent
.gitignore:1:one a/one
:: a/not-ignored
:: a/ignored-but-in-index
.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore '
a/non-existent
a/one
a/not-ignored
a/ignored-but-in-index
a/ignored-and-untracked'
Switched to branch 'other'
expecting success: test "$(test-path-utils relative_path '/foo/a/b' 'foo/x/y')" = '/foo/a/b'
Switched to branch 'master'
ok 107 - relative path: /foo/a/b foo/x/y => /foo/a/b
ok 286 - mix of file types in subdir a/ with -v -n
expecting success:
expect ':: a/non-existent
.gitignore:1:one a/one
:: a/not-ignored
:: a/ignored-but-in-index
.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore '
a/non-existent
a/one
a/not-ignored
a/ignored-but-in-index
a/ignored-and-untracked'
skipping test: relative path: d:/a/b D:/a/c => ../b test "$(test-path-utils relative_path 'd:/a/b' 'D:/a/c')" = '../b'
ok 108 # skip relative path: d:/a/b D:/a/c => ../b (missing MINGW)
[master d1075a6] add a file
Author: A U Thor <author@example.com>
1 file changed, 8 insertions(+)
create mode 100644 foo.c
merge: @{-100} - not something we can merge
ok 5 - merge @{-100} before checking out that many branches yet
skipping test: relative path: C:/a/b D:/a/c => C:/a/b test "$(test-path-utils relative_path 'C:/a/b' 'D:/a/c')" = 'C:/a/b'
ok 109 # skip relative path: C:/a/b D:/a/c => C:/a/b (missing MINGW)
# passed all 5 test(s)
1..5
expecting success: test "$(test-path-utils relative_path 'foo/a/b' '<empty>')" = 'foo/a/b'
ok 287 - mix of file types in subdir a/ with -v --non-matching
expecting success:
expect '.gitignore:1:one a/one
.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore '
a/non-existent
a/one
a/not-ignored
a/ignored-but-in-index
a/ignored-and-untracked'
ok 110 - relative path: foo/a/b <empty> => foo/a/b
expecting success: test "$(test-path-utils relative_path 'foo/a/b' '<null>')" = 'foo/a/b'
ok 111 - relative path: foo/a/b <null> => foo/a/b
ok 288 - mix of file types in subdir a/ with --verbose
expecting success:
expect ':: a/non-existent
.gitignore:1:one a/one
:: a/not-ignored
:: a/ignored-but-in-index
.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore '
a/non-existent
a/one
a/not-ignored
a/ignored-but-in-index
a/ignored-and-untracked'
*** t0101-at-syntax.sh ***
expecting success: test "$(test-path-utils relative_path '<empty>' '/foo/a/b')" = './'
ok 112 - relative path: <empty> /foo/a/b => ./
expecting success: test "$(test-path-utils relative_path '<empty>' '<empty>')" = './'
ok 289 - mix of file types in subdir a/ with --verbose -n
expecting success:
expect ':: a/non-existent
.gitignore:1:one a/one
:: a/not-ignored
:: a/ignored-but-in-index
.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore '
a/non-existent
a/one
a/not-ignored
a/ignored-but-in-index
a/ignored-and-untracked'
ok 113 - relative path: <empty> <empty> => ./
expecting success: test "$(test-path-utils relative_path '<empty>' '<null>')" = './'
ok 290 - mix of file types in subdir a/ with --verbose --non-matching
ok 114 - relative path: <empty> <null> => ./
expecting success: test "$(test-path-utils relative_path '<null>' '<empty>')" = './'
expecting success:
expect "$expect" &&
eval "$code"
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0101-at-syntax/.git/
ok 115 - relative path: <null> <empty> => ./
expecting success: test "$(test-path-utils relative_path '<null>' '<null>')" = './'
expecting success:
test_commit one &&
test_commit two
ok 291 - mix of file types in subdir a/ with --no-index
ok 116 - relative path: <null> <null> => ./
expecting success:
expect '.gitignore:1:one a/one
.gitignore:2:ignored-* a/ignored-but-in-index
.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore '
a/non-existent
a/one
a/not-ignored
a/ignored-but-in-index
a/ignored-and-untracked'
expecting success: test "$(test-path-utils relative_path '<null>' '/foo/a/b')" = './'
ok 117 - relative path: <null> /foo/a/b => ./
expecting success:
A=B git rev-parse --git-path info/grafts >actual &&
echo .git/info/grafts >expect &&
test_cmp expect actual
ok 292 - mix of file types in subdir a/ with --no-index -v
expecting success:
expect ':: a/non-existent
.gitignore:1:one a/one
:: a/not-ignored
.gitignore:2:ignored-* a/ignored-but-in-index
.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore '
a/non-existent
a/one
a/not-ignored
a/ignored-but-in-index
a/ignored-and-untracked'
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
ok 118 - git-path A=B info/grafts => .git/info/grafts
expecting success:
GIT_GRAFT_FILE=foo git rev-parse --git-path info/grafts >actual &&
echo foo >expect &&
test_cmp expect actual
ok 119 - git-path GIT_GRAFT_FILE=foo info/grafts => foo
expecting success:
GIT_GRAFT_FILE=foo git rev-parse --git-path info/////grafts >actual &&
echo foo >expect &&
test_cmp expect actual
ok 293 - mix of file types in subdir a/ with --no-index -v -n
expecting success:
expect ':: a/non-existent
.gitignore:1:one a/one
:: a/not-ignored
.gitignore:2:ignored-* a/ignored-but-in-index
.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore '
a/non-existent
a/one
a/not-ignored
a/ignored-but-in-index
a/ignored-and-untracked'
ok 120 - git-path GIT_GRAFT_FILE=foo info/////grafts => foo
expecting success:
GIT_INDEX_FILE=foo git rev-parse --git-path index >actual &&
echo foo >expect &&
test_cmp expect actual
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
ok 294 - mix of file types in subdir a/ with --no-index -v --non-matching
expecting success:
expect '.gitignore:1:one a/one
.gitignore:2:ignored-* a/ignored-but-in-index
.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore '
a/non-existent
a/one
a/not-ignored
a/ignored-but-in-index
a/ignored-and-untracked'
ok 121 - git-path GIT_INDEX_FILE=foo index => foo
expecting success:
GIT_INDEX_FILE=foo git rev-parse --git-path index/foo >actual &&
echo .git/index/foo >expect &&
test_cmp expect actual
ok 1 - setup
expecting success:
check_at @{0} two
ok 122 - git-path GIT_INDEX_FILE=foo index/foo => .git/index/foo
expecting success:
GIT_INDEX_FILE=foo git rev-parse --git-path index2 >actual &&
echo .git/index2 >expect &&
test_cmp expect actual
ok 2 - @{0} shows current
expecting success:
check_at @{1} one
ok 295 - mix of file types in subdir a/ with --no-index --verbose
expecting success:
expect ':: a/non-existent
.gitignore:1:one a/one
:: a/not-ignored
.gitignore:2:ignored-* a/ignored-but-in-index
.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore '
a/non-existent
a/one
a/not-ignored
a/ignored-but-in-index
a/ignored-and-untracked'
ok 123 - git-path GIT_INDEX_FILE=foo index2 => .git/index2
expecting success: mkdir foo
ok 3 - @{1} shows old
expecting success:
check_at @{now} two
ok 124 - setup fake objects directory foo
expecting success:
GIT_OBJECT_DIRECTORY=foo git rev-parse --git-path objects >actual &&
echo foo >expect &&
test_cmp expect actual
ok 296 - mix of file types in subdir a/ with --no-index --verbose -n
expecting success:
expect ':: a/non-existent
.gitignore:1:one a/one
:: a/not-ignored
.gitignore:2:ignored-* a/ignored-but-in-index
.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore '
a/non-existent
a/one
a/not-ignored
a/ignored-but-in-index
a/ignored-and-untracked'
ok 125 - git-path GIT_OBJECT_DIRECTORY=foo objects => foo
expecting success:
GIT_OBJECT_DIRECTORY=foo git rev-parse --git-path objects/foo >actual &&
echo foo/foo >expect &&
test_cmp expect actual
ok 4 - @{now} shows current
expecting success:
check_at @{2001-09-17} one
warning: Log for 'master' only goes back to Thu, 7 Apr 2005 15:13:13 -0700.
ok 126 - git-path GIT_OBJECT_DIRECTORY=foo objects/foo => foo/foo
expecting success:
GIT_OBJECT_DIRECTORY=foo git rev-parse --git-path objects2 >actual &&
echo .git/objects2 >expect &&
test_cmp expect actual
ok 297 - mix of file types in subdir a/ with --no-index --verbose --non-matching
expecting success:
expect "a/3-three" &&
test_check_ignore "a/3-three a/three-not-this-one"
ok 5 - @{2001-09-17} (before the first commit) shows old
expecting success:
check_at @{3.hot.dogs.on.2001-09-17} one
ok 127 - git-path GIT_OBJECT_DIRECTORY=foo objects2 => .git/objects2
expecting success: git --git-dir=bar init
warning: Log for 'master' only goes back to Thu, 7 Apr 2005 15:13:13 -0700.
ok 298 - sub-directory local ignore
ok 6 - silly approxidates work
expecting success:
test_must_fail git log -1 --format=%s @{usptream}
expecting success:
expect "a/.gitignore:2:*three a/3-three" &&
test_check_ignore "--verbose a/3-three a/three-not-this-one"
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0060-path-utils/bar/
ok 128 - setup common repository
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path index >actual &&
echo .git/index >expect &&
test_cmp expect actual
fatal: ambiguous argument '@{usptream}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
ok 7 - notice misspelled upstream
expecting success:
test_must_fail git log -1 --format=%s @{utter.bogosity}
ok 299 - sub-directory local ignore with --verbose
expecting success:
expect "3-three" &&
(
cd a &&
test_check_ignore "3-three three-not-this-one"
)
fatal: ambiguous argument '@{utter.bogosity}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
ok 129 - git-path GIT_COMMON_DIR=bar index => .git/index
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path HEAD >actual &&
echo .git/HEAD >expect &&
test_cmp expect actual
ok 8 - complain about total nonsense
# passed all 8 test(s)
1..8
ok 130 - git-path GIT_COMMON_DIR=bar HEAD => .git/HEAD
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path logs/HEAD >actual &&
echo .git/logs/HEAD >expect &&
test_cmp expect actual
ok 300 - local ignore inside a sub-directory
expecting success:
expect "a/.gitignore:2:*three 3-three" &&
(
cd a &&
test_check_ignore "--verbose 3-three three-not-this-one"
)
ok 131 - git-path GIT_COMMON_DIR=bar logs/HEAD => .git/logs/HEAD
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path objects >actual &&
echo bar/objects >expect &&
test_cmp expect actual
*** t0110-urlmatch-normalization.sh ***
ok 132 - git-path GIT_COMMON_DIR=bar objects => bar/objects
ok 301 - local ignore inside a sub-directory with --verbose
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path objects/bar >actual &&
echo bar/objects/bar >expect &&
test_cmp expect actual
expecting success:
expect "$expect" &&
eval "$code"
ok 133 - git-path GIT_COMMON_DIR=bar objects/bar => bar/objects/bar
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path info/exclude >actual &&
echo bar/info/exclude >expect &&
test_cmp expect actual
ok 134 - git-path GIT_COMMON_DIR=bar info/exclude => bar/info/exclude
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path info/grafts >actual &&
echo bar/info/grafts >expect &&
test_cmp expect actual
ok 302 - nested include
expecting success:
expect '' &&
test_check_ignore "a/b/one"
ok 135 - git-path GIT_COMMON_DIR=bar info/grafts => bar/info/grafts
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path info/sparse-checkout >actual &&
echo .git/info/sparse-checkout >expect &&
test_cmp expect actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0110-urlmatch-normalization/.git/
ok 136 - git-path GIT_COMMON_DIR=bar info/sparse-checkout => .git/info/sparse-checkout
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path remotes/bar >actual &&
echo bar/remotes/bar >expect &&
test_cmp expect actual
expecting success:
! test-urlmatch-normalization "" &&
! test-urlmatch-normalization "_" &&
! test-urlmatch-normalization "scheme" &&
! test-urlmatch-normalization "scheme:" &&
! test-urlmatch-normalization "scheme:/" &&
! test-urlmatch-normalization "scheme://" &&
! test-urlmatch-normalization "file" &&
! test-urlmatch-normalization "file:" &&
! test-urlmatch-normalization "file:/" &&
test-urlmatch-normalization "file://" &&
! test-urlmatch-normalization "://acme.co" &&
! test-urlmatch-normalization "x_test://acme.co" &&
! test-urlmatch-normalization "-test://acme.co" &&
! test-urlmatch-normalization "0test://acme.co" &&
! test-urlmatch-normalization "+test://acme.co" &&
! test-urlmatch-normalization ".test://acme.co" &&
! test-urlmatch-normalization "schem%6e://" &&
test-urlmatch-normalization "x-Test+v1.0://acme.co" &&
test "$(test-urlmatch-normalization -p "AbCdeF://x.Y")" = "abcdef://x.y/"
staged unstaged path
1: unchanged +2/-2 foo.c
*** Commands ***
1: [s]tatus 2: [u]pdate 3: [r]evert 4: [a]dd untracked
5: [p]atch 6: [d]iff 7: [q]uit 8: [h]elp
What now> ok 303 - nested include with -q
expecting success:
expect '' &&
test_check_ignore "a/b/one"
ok 137 - git-path GIT_COMMON_DIR=bar remotes/bar => bar/remotes/bar
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path branches/bar >actual &&
echo bar/branches/bar >expect &&
test_cmp expect actual
ok 138 - git-path GIT_COMMON_DIR=bar branches/bar => bar/branches/bar
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path logs/refs/heads/master >actual &&
echo bar/logs/refs/heads/master >expect &&
test_cmp expect actual
ok 304 - nested include with --quiet
expecting success:
expect 'a/b/.gitignore:8:!on* a/b/one' &&
test_check_ignore "a/b/one"
staged unstaged path
1: unchanged +2/-2 [f]oo.c
Patch update>> staged unstaged path
* 1: unchanged +2/-2 [f]oo.c
Patch update>> ok 139 - git-path GIT_COMMON_DIR=bar logs/refs/heads/master => bar/logs/refs/heads/master
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path refs/heads/master >actual &&
echo bar/refs/heads/master >expect &&
test_cmp expect actual
diff --git a/foo.c b/foo.c
index 75522e2..3f7f049 100644
--- a/foo.c
+++ b/foo.c
@@ -1,8 +1,8 @@
int foo()
{
-return 42;
+return 43;
}
int bar()
{
-return 42;
+return 44;
}
Stage this hunk [y,n,q,a,d,/,s,e,?]? Split into 2 hunks.
@@ -1,6 +1,6 @@
int foo()
{
-return 42;
+return 43;
}
int bar()
{
Stage this hunk [y,n,q,a,d,/,j,J,g,e,?]? @@ -4,5 +4,5 @@
}
int bar()
{
-return 42;
+return 44;
}
Stage this hunk [y,n,q,a,d,/,K,g,e,?]? ok 140 - git-path GIT_COMMON_DIR=bar refs/heads/master => bar/refs/heads/master
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path hooks/me >actual &&
echo bar/hooks/me >expect &&
test_cmp expect actual
ok 305 - nested include with -v
expecting success:
expect 'a/b/.gitignore:8:!on* a/b/one' &&
test_check_ignore "a/b/one"
*** Commands ***
1: [s]tatus 2: [u]pdate 3: [r]evert 4: [a]dd untracked
5: [p]atch 6: [d]iff 7: [q]uit 8: [h]elp
What now> Bye.
ok 141 - git-path GIT_COMMON_DIR=bar hooks/me => bar/hooks/me
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path config >actual &&
echo bar/config >expect &&
test_cmp expect actual
ok 306 - nested include with -v -n
expecting success:
expect 'a/b/.gitignore:8:!on* a/b/one' &&
test_check_ignore "a/b/one"
[master 65d7dde] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 142 - git-path GIT_COMMON_DIR=bar config => bar/config
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path packed-refs >actual &&
echo bar/packed-refs >expect &&
test_cmp expect actual
ok 143 - git-path GIT_COMMON_DIR=bar packed-refs => bar/packed-refs
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path shallow >actual &&
echo bar/shallow >expect &&
test_cmp expect actual
ok 307 - nested include with -v --non-matching
expecting success:
expect 'a/b/.gitignore:8:!on* a/b/one' &&
test_check_ignore "a/b/one"
ok 144 - git-path GIT_COMMON_DIR=bar shallow => bar/shallow
# passed all 144 test(s)
1..144
ok 308 - nested include with --verbose
expecting success:
expect 'a/b/.gitignore:8:!on* a/b/one' &&
test_check_ignore "a/b/one"
ok 10 - commit --interactive gives cache-tree on partial commit
expecting success:
mkdir dir &&
>dir/child.t &&
git add dir/child.t &&
git commit -m dir/child.t &&
test_cache_tree
ok 309 - nested include with --verbose -n
expecting success:
expect 'a/b/.gitignore:8:!on* a/b/one' &&
test_check_ignore "a/b/one"
ok 1 - url scheme
expecting success:
! test-urlmatch-normalization "scheme://user:pass@" &&
! test-urlmatch-normalization "scheme://?" &&
! test-urlmatch-normalization "scheme://#" &&
! test-urlmatch-normalization "scheme:///" &&
! test-urlmatch-normalization "scheme://:" &&
! test-urlmatch-normalization "scheme://:555" &&
test-urlmatch-normalization "file://user:pass@" &&
test-urlmatch-normalization "file://?" &&
test-urlmatch-normalization "file://#" &&
test-urlmatch-normalization "file:///" &&
test-urlmatch-normalization "file://:" &&
! test-urlmatch-normalization "file://:555" &&
test-urlmatch-normalization "scheme://user:pass@host" &&
test-urlmatch-normalization "scheme://@host" &&
test-urlmatch-normalization "scheme://%00@host" &&
! test-urlmatch-normalization "scheme://%%@host" &&
! test-urlmatch-normalization "scheme://host_" &&
test-urlmatch-normalization "scheme://user:pass@host/" &&
test-urlmatch-normalization "scheme://@host/" &&
test-urlmatch-normalization "scheme://host/" &&
test-urlmatch-normalization "scheme://host?x" &&
test-urlmatch-normalization "scheme://host#x" &&
test-urlmatch-normalization "scheme://host/@" &&
test-urlmatch-normalization "scheme://host?@x" &&
test-urlmatch-normalization "scheme://host#@x" &&
test-urlmatch-normalization "scheme://[::1]" &&
test-urlmatch-normalization "scheme://[::1]/" &&
! test-urlmatch-normalization "scheme://hos%41/" &&
test-urlmatch-normalization "scheme://[invalid....:/" &&
test-urlmatch-normalization "scheme://invalid....:]/" &&
! test-urlmatch-normalization "scheme://invalid....:[/" &&
! test-urlmatch-normalization "scheme://invalid....:["
*** t0200-gettext-basic.sh ***
[master 0cd4af7] dir/child.t
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 dir/child.t
ok 310 - nested include with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 311 - ignored sub-directory
expecting success:
expect '' &&
test_check_ignore "a/b/ignored-dir"
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0200-gettext-basic/.git/
ok 11 - commit in child dir has cache-tree
expecting success:
test-scrap-cache-tree &&
git reset --hard &&
test_cache_tree
ok 312 - ignored sub-directory with -q
expecting success:
expect '' &&
test_check_ignore "a/b/ignored-dir"
# lib-gettext: No is_IS UTF-8 locale available
# lib-gettext: No is_IS ISO-8859-1 locale available
expecting success:
test -n "$GIT_INTERNAL_GETTEXT_SH_SCHEME"
ok 1 - sanity: $GIT_INTERNAL_GETTEXT_SH_SCHEME is set (to gnu)
expecting success:
test $TEXTDOMAIN = "git"
ok 2 - sanity: $TEXTDOMAIN is git
expecting success:
! grep "A Perl string xgettext will not get" "$GIT_PO_PATH"/is.po
HEAD is now at 0cd4af7 dir/child.t
ok 3 - xgettext sanity: Perl _() strings are not extracted
expecting success:
grep "TRANSLATORS: This is a test" "$TEST_DIRECTORY"/t0200/* | wc -l >expect &&
grep "TRANSLATORS: This is a test" "$GIT_PO_PATH"/is.po | wc -l >actual &&
test_cmp expect actual
ok 313 - ignored sub-directory with --quiet
expecting success:
expect 'a/b/.gitignore:5:ignored-dir/ a/b/ignored-dir' &&
test_check_ignore "a/b/ignored-dir"
ok 4 - xgettext sanity: Comment extraction with --add-comments
expecting success:
! grep "This is a phony" "$GIT_PO_PATH"/is.po &&
! grep "the above comment" "$GIT_PO_PATH"/is.po
ok 5 - xgettext sanity: Comment extraction with --add-comments stops at statements
expecting success:
test -d "$TEXTDOMAINDIR" &&
test "$TEXTDOMAINDIR" = "$GIT_TEXTDOMAINDIR"
ok 314 - ignored sub-directory with -v
expecting success:
expect 'a/b/.gitignore:5:ignored-dir/ a/b/ignored-dir' &&
test_check_ignore "a/b/ignored-dir"
ok 6 - sanity: $TEXTDOMAINDIR exists without NO_GETTEXT=YesPlease
expecting success:
test -f "$TEXTDOMAINDIR/is/LC_MESSAGES/git.mo"
ok 7 - sanity: Icelandic locale was compiled
skipping test: sanity: gettext("") metadata is OK
# Return value may be non-zero
LANGUAGE=is LC_ALL="$is_IS_locale" gettext "" >zero-expect &&
grep "Project-Id-Version: Git" zero-expect &&
grep "Git Mailing List <git@vger.kernel.org>" zero-expect &&
grep "Content-Type: text/plain; charset=UTF-8" zero-expect &&
grep "Content-Transfer-Encoding: 8bit" zero-expect
ok 8 # skip sanity: gettext("") metadata is OK (missing GETTEXT_LOCALE)
skipping test: sanity: gettext(unknown) is passed through
printf "This is not a translation string" >expect &&
gettext "This is not a translation string" >actual &&
eval_gettext "This is not a translation string" >actual &&
test_cmp expect actual
ok 9 # skip sanity: gettext(unknown) is passed through (missing GETTEXT_LOCALE)
skipping test: xgettext: C extraction of _() and N_() strings
printf "TILRAUN: C tilraunastrengur" >expect &&
printf "\n" >>expect &&
printf "Sjá 'git help SKIPUN' til að sjá hjálp fyrir tiltekna skipun." >>expect &&
LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A C test string" >actual &&
printf "\n" >>actual &&
LANGUAGE=is LC_ALL="$is_IS_locale" gettext "See 'git help COMMAND' for more information on a specific command." >>actual &&
test_cmp expect actual
ok 10 # skip xgettext: C extraction of _() and N_() strings (missing GETTEXT_LOCALE)
skipping test: xgettext: C extraction with %s
printf "TILRAUN: C tilraunastrengur %%s" >expect &&
LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A C test string %s" >actual &&
test_cmp expect actual
ok 11 # skip xgettext: C extraction with %s (missing GETTEXT_LOCALE)
ok 315 - ignored sub-directory with -v -n
expecting success:
expect 'a/b/.gitignore:5:ignored-dir/ a/b/ignored-dir' &&
test_check_ignore "a/b/ignored-dir"
skipping test: xgettext: Shell extraction
printf "TILRAUN: Skeljartilraunastrengur" >expect &&
LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A Shell test string" >actual &&
test_cmp expect actual
ok 12 # skip xgettext: Shell extraction (missing GETTEXT_LOCALE)
skipping test: xgettext: Shell extraction with $variable
printf "TILRAUN: Skeljartilraunastrengur með breytunni a var i able" >x-expect &&
LANGUAGE=is LC_ALL="$is_IS_locale" variable="a var i able" eval_gettext "TEST: A Shell test \$variable" >x-actual &&
test_cmp x-expect x-actual
ok 13 # skip xgettext: Shell extraction with $variable (missing GETTEXT_LOCALE)
skipping test: xgettext: Perl extraction
printf "TILRAUN: Perl tilraunastrengur" >expect &&
LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A Perl test string" >actual &&
test_cmp expect actual
ok 14 # skip xgettext: Perl extraction (missing GETTEXT_LOCALE)
skipping test: xgettext: Perl extraction with %s
printf "TILRAUN: Perl tilraunastrengur með breytunni %%s" >expect &&
LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: A Perl test variable %s" >actual &&
test_cmp expect actual
ok 15 # skip xgettext: Perl extraction with %s (missing GETTEXT_LOCALE)
skipping test: sanity: Some gettext("") data for real locale
LANGUAGE=is LC_ALL="$is_IS_locale" gettext "" >real-locale &&
test -s real-locale
ok 16 # skip sanity: Some gettext("") data for real locale (missing GETTEXT_LOCALE)
ok 12 - reset --hard gives cache-tree
expecting success:
rm -f .git/index &&
git reset --hard &&
test_cache_tree
# passed all 16 test(s)
1..16
ok 316 - ignored sub-directory with -v --non-matching
expecting success:
expect 'a/b/.gitignore:5:ignored-dir/ a/b/ignored-dir' &&
test_check_ignore "a/b/ignored-dir"
ok 2 - url authority
expecting success:
test-urlmatch-normalization "xyz://q@some.host:" &&
test-urlmatch-normalization "xyz://q@some.host:456/" &&
! test-urlmatch-normalization "xyz://q@some.host:0" &&
! test-urlmatch-normalization "xyz://q@some.host:0000000" &&
test-urlmatch-normalization "xyz://q@some.host:0000001?" &&
test-urlmatch-normalization "xyz://q@some.host:065535#" &&
test-urlmatch-normalization "xyz://q@some.host:65535" &&
! test-urlmatch-normalization "xyz://q@some.host:65536" &&
! test-urlmatch-normalization "xyz://q@some.host:99999" &&
! test-urlmatch-normalization "xyz://q@some.host:100000" &&
! test-urlmatch-normalization "xyz://q@some.host:100001" &&
test-urlmatch-normalization "http://q@some.host:80" &&
test-urlmatch-normalization "https://q@some.host:443" &&
test-urlmatch-normalization "http://q@some.host:80/" &&
test-urlmatch-normalization "https://q@some.host:443?" &&
! test-urlmatch-normalization "http://q@:8008" &&
! test-urlmatch-normalization "http://:8080" &&
! test-urlmatch-normalization "http://:" &&
test-urlmatch-normalization "xyz://q@some.host:456/" &&
test-urlmatch-normalization "xyz://[::1]:456/" &&
test-urlmatch-normalization "xyz://[::1]:/" &&
! test-urlmatch-normalization "xyz://[::1]:000/" &&
! test-urlmatch-normalization "xyz://[::1]:0%300/" &&
! test-urlmatch-normalization "xyz://[::1]:0x80/" &&
! test-urlmatch-normalization "xyz://[::1]:4294967297/" &&
! test-urlmatch-normalization "xyz://[::1]:030f/"
HEAD is now at 0cd4af7 dir/child.t
*** t0201-gettext-fallbacks.sh ***
ok 317 - ignored sub-directory with --verbose
expecting success:
expect 'a/b/.gitignore:5:ignored-dir/ a/b/ignored-dir' &&
test_check_ignore "a/b/ignored-dir"
ok 318 - ignored sub-directory with --verbose -n
expecting success:
expect 'a/b/.gitignore:5:ignored-dir/ a/b/ignored-dir' &&
test_check_ignore "a/b/ignored-dir"
ok 319 - ignored sub-directory with --verbose --non-matching
expecting success:
expect_from_stdin <<-\EOF &&
a/b/ignored-dir/foo
a/b/ignored-dir/twoooo
a/b/ignored-dir/seven
EOF
test_check_ignore "a/b/ignored-dir/foo a/b/ignored-dir/twoooo a/b/ignored-dir/seven"
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0201-gettext-fallbacks/.git/
ok 13 - reset --hard without index gives cache-tree
expecting success:
git tag current &&
git checkout HEAD^ &&
test_cache_tree
ok 320 - multiple files inside ignored sub-directory
expecting success:
expect_from_stdin <<-\EOF &&
a/b/.gitignore:5:ignored-dir/ a/b/ignored-dir/foo
a/b/.gitignore:5:ignored-dir/ a/b/ignored-dir/twoooo
a/b/.gitignore:5:ignored-dir/ a/b/ignored-dir/seven
EOF
test_check_ignore "-v a/b/ignored-dir/foo a/b/ignored-dir/twoooo a/b/ignored-dir/seven"
# lib-gettext: No is_IS UTF-8 locale available
# lib-gettext: No is_IS ISO-8859-1 locale available
expecting success:
test -n "$GIT_INTERNAL_GETTEXT_SH_SCHEME"
ok 1 - sanity: $GIT_INTERNAL_GETTEXT_SH_SCHEME is set (to fallthrough)
expecting success:
test -n "$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS"
ok 2 - sanity: $GIT_INTERNAL_GETTEXT_TEST_FALLBACKS is set
Note: checking out 'HEAD^'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 65d7dde... foo
expecting success:
echo fallthrough >expect &&
echo $GIT_INTERNAL_GETTEXT_SH_SCHEME >actual &&
test_cmp expect actual
ok 321 - multiple files inside ignored sub-directory with -v
expecting success:
expect_from_stdin <<-\EOF &&
foo
twoooo
../one
seven
../../one
EOF
(
cd a/b/ignored-dir &&
test_check_ignore "foo twoooo ../one seven ../../one"
)
ok 3 - sanity: $GIT_INTERNAL_GETTEXT_SH_SCHEME" is fallthrough
expecting success:
printf "test" >expect &&
gettext "test" >actual &&
test_i18ncmp expect actual &&
printf "test more words" >expect &&
gettext "test more words" >actual &&
test_i18ncmp expect actual
ok 4 - gettext: our gettext() fallback has pass-through semantics
expecting success:
printf "test" >expect &&
eval_gettext "test" >actual &&
test_i18ncmp expect actual &&
printf "test more words" >expect &&
eval_gettext "test more words" >actual &&
test_i18ncmp expect actual
ok 322 - cd to ignored sub-directory
expecting success:
expect_from_stdin <<-\EOF &&
a/b/.gitignore:5:ignored-dir/ foo
a/b/.gitignore:5:ignored-dir/ twoooo
a/b/.gitignore:8:!on* ../one
a/b/.gitignore:5:ignored-dir/ seven
.gitignore:1:one ../../one
EOF
(
cd a/b/ignored-dir &&
test_check_ignore "-v foo twoooo ../one seven ../../one"
)
ok 14 - checkout gives cache-tree
expecting success:
git checkout current &&
git checkout -b prev HEAD^ &&
test_cache_tree
ok 323 - cd to ignored sub-directory with -v
ok 3 - url port checks
expecting success:
test "$(test-urlmatch-normalization -p "http://x:800")" = "http://x:800/" &&
test "$(test-urlmatch-normalization -p "http://x:0800")" = "http://x:800/" &&
test "$(test-urlmatch-normalization -p "http://x:00000800")" = "http://x:800/" &&
test "$(test-urlmatch-normalization -p "http://x:065535")" = "http://x:65535/" &&
test "$(test-urlmatch-normalization -p "http://x:1")" = "http://x:1/" &&
test "$(test-urlmatch-normalization -p "http://x:80")" = "http://x/" &&
test "$(test-urlmatch-normalization -p "http://x:080")" = "http://x/" &&
test "$(test-urlmatch-normalization -p "http://x:000000080")" = "http://x/" &&
test "$(test-urlmatch-normalization -p "https://x:443")" = "https://x/" &&
test "$(test-urlmatch-normalization -p "https://x:0443")" = "https://x/" &&
test "$(test-urlmatch-normalization -p "https://x:000000443")" = "https://x/"
Previous HEAD position was 65d7dde... foo
HEAD is now at 0cd4af7... dir/child.t
expecting success:
expect "$expect" &&
eval "$code"
ok 5 - eval_gettext: our eval_gettext() fallback has pass-through semantics
expecting success:
printf "test YesPlease" >expect &&
GIT_INTERNAL_GETTEXT_TEST_FALLBACKS=YesPlease eval_gettext "test \$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS" >actual &&
test_i18ncmp expect actual
Previous HEAD position was 0cd4af7... dir/child.t
Switched to a new branch 'prev'
ok 324 - symlink
expecting success:
expect '' &&
test_check_ignore "a/symlink" 1
ok 6 - eval_gettext: our eval_gettext() fallback can interpolate variables
expecting success:
cmdline="git am" &&
export cmdline &&
printf "When you have resolved this problem, run git am --resolved." >expect &&
eval_gettext "When you have resolved this problem, run \$cmdline --resolved." >actual &&
test_i18ncmp expect actual
ok 325 - symlink with -q
ok 15 - checkout -b gives cache-tree
expecting success:
git checkout current &&
git checkout -B prev HEAD^ &&
test_cache_tree
expecting success:
expect '' &&
test_check_ignore "a/symlink" 1
ok 7 - eval_gettext: our eval_gettext() fallback can interpolate variables with spaces
expecting success:
cmdline="git am" &&
export cmdline &&
printf "When you have resolved this problem, run \"git am --resolved\"." >expect &&
eval_gettext "When you have resolved this problem, run \"\$cmdline --resolved\"." >actual &&
test_i18ncmp expect actual
ok 4 - url port normalization
expecting success:
! test-urlmatch-normalization "http://x.y?%fg" &&
test "$(test-urlmatch-normalization -p "X://W/%7e%41^%3a")" = "x://w/~A%5E%3A" &&
test "$(test-urlmatch-normalization -p "X://W/:/?#[]@")" = "x://w/:/?#[]@" &&
test "$(test-urlmatch-normalization -p "X://W/$&()*+,;=")" = "x://w/$&()*+,;=" &&
test "$(test-urlmatch-normalization -p "X://W/'")" = "x://w/'" &&
test "$(test-urlmatch-normalization -p "X://W?!")" = "x://w/?!"
Note: checking out 'current'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 0cd4af7... dir/child.t
ok 326 - symlink with --quiet
expecting success:
expect '' &&
test_check_ignore "a/symlink" 1
Previous HEAD position was 0cd4af7... dir/child.t
Switched to and reset branch 'prev'
ok 8 - eval_gettext: our eval_gettext() fallback can interpolate variables with spaces and quotes
ok 327 - symlink with -v
expecting success:
expect ':: a/symlink' &&
test_check_ignore "a/symlink" 1
# passed all 8 test(s)
1..8
ok 5 - url general escapes
expecting success:
test "$(test-urlmatch-normalization -p "$(cat "$tu-1")")" = "x://q/%01%02%03%04%05%06%07%08%0E%0F%10%11%12" &&
test "$(test-urlmatch-normalization -p "$(cat "$tu-2")")" = "x://q/%13%14%15%16%17%18%19%1B%1C%1D%1E%1F%7F" &&
test "$(test-urlmatch-normalization -p "$(cat "$tu-3")")" = "x://q/%80%81%82%83%84%85%86%87%88%89%8A%8B%8C%8D%8E%8F" &&
test "$(test-urlmatch-normalization -p "$(cat "$tu-4")")" = "x://q/%90%91%92%93%94%95%96%97%98%99%9A%9B%9C%9D%9E%9F" &&
test "$(test-urlmatch-normalization -p "$(cat "$tu-5")")" = "x://q/%A0%A1%A2%A3%A4%A5%A6%A7%A8%A9%AA%AB%AC%AD%AE%AF" &&
test "$(test-urlmatch-normalization -p "$(cat "$tu-6")")" = "x://q/%B0%B1%B2%B3%B4%B5%B6%B7%B8%B9%BA%BB%BC%BD%BE%BF" &&
test "$(test-urlmatch-normalization -p "$(cat "$tu-7")")" = "x://q/%C0%C1%C2%C3%C4%C5%C6%C7%C8%C9%CA%CB%CC%CD%CE%CF" &&
test "$(test-urlmatch-normalization -p "$(cat "$tu-8")")" = "x://q/%D0%D1%D2%D3%D4%D5%D6%D7%D8%D9%DA%DB%DC%DD%DE%DF" &&
test "$(test-urlmatch-normalization -p "$(cat "$tu-9")")" = "x://q/%E0%E1%E2%E3%E4%E5%E6%E7%E8%E9%EA%EB%EC%ED%EE%EF" &&
test "$(test-urlmatch-normalization -p "$(cat "$tu-10")")" = "x://q/%F0%F1%F2%F3%F4%F5%F6%F7%F8%F9%FA%FB%FC%FD%FE%FF"
ok 328 - symlink with -v -n
*** t0202-gettext-perl.sh ***
expecting success:
expect ':: a/symlink' &&
test_check_ignore "a/symlink" 1
ok 16 - checkout -B gives cache-tree
expecting success:
git checkout current &&
git checkout -b changes &&
test_commit llamas &&
test_commit pachyderm &&
test_cache_tree &&
git checkout current &&
test_cache_tree &&
git merge --ff-only changes &&
test_cache_tree
ok 329 - symlink with -v --non-matching
expecting success:
expect '' &&
test_check_ignore "a/symlink" 1
Note: checking out 'current'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 0cd4af7... dir/child.t
ok 330 - symlink with --verbose
expecting success:
expect ':: a/symlink' &&
test_check_ignore "a/symlink" 1
Switched to a new branch 'changes'
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0202-gettext-perl/.git/
ok 331 - symlink with --verbose -n
expecting success:
expect ':: a/symlink' &&
test_check_ignore "a/symlink" 1
# lib-gettext: No is_IS UTF-8 locale available
# lib-gettext: No is_IS ISO-8859-1 locale available
[changes 7bafa16] llamas
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 llamas.t
ok 332 - symlink with --verbose --non-matching
ok 6 - url high-bit escapes
expecting success:
test "$(test-urlmatch-normalization -p "$(cat "$tu-11")")" = "x://q/%C2%80%DF%BF%E0%A0%80%EF%BF%BD%F0%90%80%80%F0%AF%BF%BD"
expecting success:
expect "$expect" &&
eval "$code"
ok 7 - url utf-8 escapes
expecting success:
test "$(test-urlmatch-normalization -p "x://%41%62(^):%70+d@foo")" = "x://Ab(%5E):p+d@foo/"
ok 8 - url username/password escapes
expecting success:
test "$(test-urlmatch-normalization -l "Http://%4d%65:%4d^%70@The.Host")" = 25 &&
test "$(test-urlmatch-normalization -l "http://%41:%42@x.y/%61/")" = 17 &&
test "$(test-urlmatch-normalization -l "http://@x.y/^")" = 15
[changes 94f8364] pachyderm
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 pachyderm.t
ok 333 - beyond a symlink
expecting success:
expect '' &&
test_check_ignore "a/symlink/foo" 128 &&
test_stderr "fatal: pathspec 'a/symlink/foo' is beyond a symbolic link"
ok 9 - url normalized lengths
expecting success:
test "$(test-urlmatch-normalization -p "x://y/.")" = "x://y/" &&
test "$(test-urlmatch-normalization -p "x://y/./")" = "x://y/" &&
test "$(test-urlmatch-normalization -p "x://y/a/.")" = "x://y/a" &&
test "$(test-urlmatch-normalization -p "x://y/a/./")" = "x://y/a/" &&
test "$(test-urlmatch-normalization -p "x://y/.?")" = "x://y/?" &&
test "$(test-urlmatch-normalization -p "x://y/./?")" = "x://y/?" &&
test "$(test-urlmatch-normalization -p "x://y/a/.?")" = "x://y/a?" &&
test "$(test-urlmatch-normalization -p "x://y/a/./?")" = "x://y/a/?" &&
test "$(test-urlmatch-normalization -p "x://y/a/./b/.././../c")" = "x://y/c" &&
test "$(test-urlmatch-normalization -p "x://y/a/./b/../.././c/")" = "x://y/c/" &&
test "$(test-urlmatch-normalization -p "x://y/a/./b/.././../c/././.././.")" = "x://y/" &&
! test-urlmatch-normalization "x://y/a/./b/.././../c/././.././.." &&
test "$(test-urlmatch-normalization -p "x://y/a/./?/././..")" = "x://y/a/?/././.." &&
test "$(test-urlmatch-normalization -p "x://y/%2e/")" = "x://y/" &&
test "$(test-urlmatch-normalization -p "x://y/%2E/")" = "x://y/" &&
test "$(test-urlmatch-normalization -p "x://y/a/%2e./")" = "x://y/" &&
test "$(test-urlmatch-normalization -p "x://y/b/.%2E/")" = "x://y/" &&
test "$(test-urlmatch-normalization -p "x://y/c/%2e%2E/")" = "x://y/"
ok 334 - beyond a symlink with -q
expecting success:
expect '' &&
test_check_ignore "a/symlink/foo" 128 &&
test_stderr "fatal: pathspec 'a/symlink/foo' is beyond a symbolic link"
ok 335 - beyond a symlink with --quiet
expecting success:
expect '' &&
test_check_ignore "a/symlink/foo" 128 &&
test_stderr "fatal: pathspec 'a/symlink/foo' is beyond a symbolic link"
ok 336 - beyond a symlink with -v
Note: checking out 'current'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 0cd4af7... dir/child.t
expecting success:
expect '' &&
test_check_ignore "a/symlink/foo" 128 &&
test_stderr "fatal: pathspec 'a/symlink/foo' is beyond a symbolic link"
# run 0: Perl Git::I18N API (perl /«PKGBUILDDIR»/t/t0202/test.pl)
ok 337 - beyond a symlink with -v -n
expecting success:
expect '' &&
test_check_ignore "a/symlink/foo" 128 &&
test_stderr "fatal: pathspec 'a/symlink/foo' is beyond a symbolic link"
ok 338 - beyond a symlink with -v --non-matching
expecting success:
expect '' &&
test_check_ignore "a/symlink/foo" 128 &&
test_stderr "fatal: pathspec 'a/symlink/foo' is beyond a symbolic link"
ok 10 - url . and .. segments
expecting success:
test-urlmatch-normalization "httP://x" "Http://X/" &&
test-urlmatch-normalization "Http://%4d%65:%4d^%70@The.Host" "hTTP://Me:%4D^p@the.HOST:80/" &&
! test-urlmatch-normalization "https://@x.y/^" "httpS://x.y:443/^" &&
test-urlmatch-normalization "https://@x.y/^" "httpS://@x.y:0443/^" &&
test-urlmatch-normalization "https://@x.y/^/../abc" "httpS://@x.y:0443/abc" &&
test-urlmatch-normalization "https://@x.y/^/.." "httpS://@x.y:0443/"
ok 339 - beyond a symlink with --verbose
expecting success:
expect '' &&
test_check_ignore "a/symlink/foo" 128 &&
test_stderr "fatal: pathspec 'a/symlink/foo' is beyond a symbolic link"
Updating 0cd4af7..94f8364
Fast-forward
llamas.t | 1 +
pachyderm.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 llamas.t
create mode 100644 pachyderm.t
ok 11 - url equivalents
ok 340 - beyond a symlink with --verbose -n
expecting success:
expect '' &&
test_check_ignore "a/symlink/foo" 128 &&
test_stderr "fatal: pathspec 'a/symlink/foo' is beyond a symbolic link"
# passed all 11 test(s)
1..11
*** t0203-gettext-setlocale-sanity.sh ***
ok 341 - beyond a symlink with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 17 - merge --ff-only maintains cache-tree
expecting success:
git checkout current &&
git checkout -b changes2 &&
test_commit alpacas &&
test_cache_tree &&
git checkout current &&
test_commit struthio &&
test_cache_tree &&
git merge changes2 &&
test_cache_tree
ok 342 - beyond a symlink from subdirectory
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0203-gettext-setlocale-sanity/.git/
Previous HEAD position was 94f8364... pachyderm
HEAD is now at 0cd4af7... dir/child.t
expecting success:
expect '' &&
(
cd a &&
test_check_ignore "symlink/foo" 128
) &&
test_stderr "fatal: pathspec 'symlink/foo' is beyond a symbolic link"
Switched to a new branch 'changes2'
1..8
ok 343 - beyond a symlink from subdirectory with -q
expecting success:
expect '' &&
(
cd a &&
test_check_ignore "symlink/foo" 128
) &&
test_stderr "fatal: pathspec 'symlink/foo' is beyond a symbolic link"
# lib-gettext: No is_IS UTF-8 locale available
# lib-gettext: No is_IS ISO-8859-1 locale available
expecting success:
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
test_commit "iso-c-commit" iso-under-c &&
git show >out 2>err &&
! test -s err &&
grep -q "iso-c-commit" out
ok 1 - Testing Git::I18N with NO Perl gettext library
[changes2 d94e838] alpacas
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 alpacas.t
ok 2 - Git::I18N is located at /«PKGBUILDDIR»/t/../perl/blib/lib/Git/I18N.pm
ok 3 - sanity: Git::I18N has 1 export(s)
ok 4 - sanity: Git::I18N exports everything by default
ok 5 - sanity: __ has a $ prototype
ok 6 - Passing a string through __() in the C locale works
ok 7 # skip GETTEXT_LOCALE must be set by lib-gettext.sh for exhaustive Git::I18N tests
ok 8 # skip GETTEXT_LOCALE must be set by lib-gettext.sh for exhaustive Git::I18N tests
Warning: commit message did not conform to UTF-8.
You may want to amend it after fixing the message, or set the config
variable i18n.commitencoding to the encoding your project uses.
ok 344 - beyond a symlink from subdirectory with --quiet
# test_external test Perl Git::I18N API was ok
# expecting no stderr from previous command
expecting success:
expect '' &&
(
cd a &&
test_check_ignore "symlink/foo" 128
) &&
test_stderr "fatal: pathspec 'symlink/foo' is beyond a symbolic link"
[master (root-commit) f2030b4] iso-c-commit
Author: Áéí óú <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 iso-under-c
# test_external_without_stderr test no stderr: Perl Git::I18N API was ok
ok 345 - beyond a symlink from subdirectory with -v
expecting success:
expect '' &&
(
cd a &&
test_check_ignore "symlink/foo" 128
) &&
test_stderr "fatal: pathspec 'symlink/foo' is beyond a symbolic link"
*** t0204-gettext-reencode-sanity.sh ***
ok 1 - git show a ISO-8859-1 commit under C locale
skipping test: git show a ISO-8859-1 commit under a UTF-8 locale
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
test_commit "iso-utf8-commit" iso-under-utf8 &&
LANGUAGE=is LC_ALL="$is_IS_locale" git show >out 2>err &&
! test -s err &&
grep -q "iso-utf8-commit" out
ok 2 # skip git show a ISO-8859-1 commit under a UTF-8 locale (missing GETTEXT_LOCALE)
# passed all 2 test(s)
1..2
ok 346 - beyond a symlink from subdirectory with -v -n
expecting success:
expect '' &&
(
cd a &&
test_check_ignore "symlink/foo" 128
) &&
test_stderr "fatal: pathspec 'symlink/foo' is beyond a symbolic link"
*** t0205-gettext-poison.sh ***
ok 347 - beyond a symlink from subdirectory with -v --non-matching
Note: checking out 'current'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
expecting success:
expect '' &&
(
HEAD is now at 0cd4af7... dir/child.t
cd a &&
test_check_ignore "symlink/foo" 128
) &&
test_stderr "fatal: pathspec 'symlink/foo' is beyond a symbolic link"
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0204-gettext-reencode-sanity/.git/
ok 348 - beyond a symlink from subdirectory with --verbose
expecting success:
expect '' &&
(
cd a &&
test_check_ignore "symlink/foo" 128
) &&
test_stderr "fatal: pathspec 'symlink/foo' is beyond a symbolic link"
[detached HEAD 8c0a55f] struthio
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 struthio.t
# lib-gettext: No is_IS UTF-8 locale available
# lib-gettext: No is_IS ISO-8859-1 locale available
skipping test: gettext: Emitting UTF-8 from our UTF-8 *.mo files / Icelandic
printf "TILRAUN: Halló Heimur!" >expect &&
LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: Hello World!" >actual &&
test_cmp expect actual
ok 1 # skip gettext: Emitting UTF-8 from our UTF-8 *.mo files / Icelandic (missing GETTEXT_LOCALE)
skipping test: gettext: Emitting UTF-8 from our UTF-8 *.mo files / Runes
printf "%s" "$RUNES" >expect &&
LANGUAGE=is LC_ALL="$is_IS_locale" gettext "$MSGKEY" >actual &&
test_cmp expect actual
ok 2 # skip gettext: Emitting UTF-8 from our UTF-8 *.mo files / Runes (missing GETTEXT_LOCALE)
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0205-gettext-poison/.git/
skipping test: gettext: Emitting ISO-8859-1 from our UTF-8 *.mo files / Icelandic
printf "TILRAUN: Halló Heimur!" | iconv -f UTF-8 -t ISO8859-1 >expect &&
LANGUAGE=is LC_ALL="$is_IS_iso_locale" gettext "TEST: Hello World!" >actual &&
test_cmp expect actual
ok 3 # skip gettext: Emitting ISO-8859-1 from our UTF-8 *.mo files / Icelandic (missing GETTEXT_ISO_LOCALE)
skipping test: gettext: impossible ISO-8859-1 output
LANGUAGE=is LC_ALL="$is_IS_iso_locale" gettext "$MSGKEY" >runes &&
case "$(cat runes)" in
"$MSGKEY")
say "Your system gives back the key to message catalog"
;;
"$PUNTS")
say "Your system replaces an impossible character with ?"
;;
"$RUNES")
say "Your system gives back the raw message for an impossible request"
;;
*)
say "We never saw the error behaviour your system exhibits"
false
;;
esac
ok 4 # skip gettext: impossible ISO-8859-1 output (missing GETTEXT_ISO_LOCALE)
ok 349 - beyond a symlink from subdirectory with --verbose -n
skipping test: gettext: Fetching a UTF-8 msgid -> UTF-8
printf "TILRAUN: ‚einfaldar‘ og „tvöfaldar“ gæsalappir" >expect &&
LANGUAGE=is LC_ALL="$is_IS_locale" gettext "TEST: ‘single’ and “double” quotes" >actual &&
test_cmp expect actual
ok 5 # skip gettext: Fetching a UTF-8 msgid -> UTF-8 (missing GETTEXT_LOCALE)
expecting success:
expect '' &&
(
cd a &&
test_check_ignore "symlink/foo" 128
) &&
test_stderr "fatal: pathspec 'symlink/foo' is beyond a symbolic link"
skipping test: gettext: Fetching a UTF-8 msgid -> ISO-8859-1
LANGUAGE=is LC_ALL="$is_IS_iso_locale" gettext "TEST: ‘single’ and “double” quotes" >actual &&
grep "einfaldar" actual &&
grep "$(echo tvöfaldar | iconv -f UTF-8 -t ISO8859-1)" actual
ok 6 # skip gettext: Fetching a UTF-8 msgid -> ISO-8859-1 (missing GETTEXT_ISO_LOCALE)
skipping test: gettext.c: git init UTF-8 -> UTF-8
printf "Bjó til tóma Git lind" >expect &&
LANGUAGE=is LC_ALL="$is_IS_locale" git init repo >actual &&
test_when_finished "rm -rf repo" &&
grep "^$(cat expect) " actual
ok 7 # skip gettext.c: git init UTF-8 -> UTF-8 (missing GETTEXT_LOCALE)
skipping test: gettext.c: git init UTF-8 -> ISO-8859-1
printf "Bjó til tóma Git lind" >expect &&
LANGUAGE=is LC_ALL="$is_IS_iso_locale" git init repo >actual &&
test_when_finished "rm -rf repo" &&
grep "^$(cat expect | iconv -f UTF-8 -t ISO8859-1) " actual
ok 8 # skip gettext.c: git init UTF-8 -> ISO-8859-1 (missing GETTEXT_ISO_LOCALE)
# passed all 8 test(s)
1..8
# lib-gettext: No is_IS UTF-8 locale available
# lib-gettext: No is_IS ISO-8859-1 locale available
skipping test: sanity: $GIT_INTERNAL_GETTEXT_SH_SCHEME is set (to gnu)
test -n "$GIT_INTERNAL_GETTEXT_SH_SCHEME"
ok 1 # skip sanity: $GIT_INTERNAL_GETTEXT_SH_SCHEME is set (to gnu) (missing GETTEXT_POISON)
skipping test: sanity: $GIT_INTERNAL_GETTEXT_SH_SCHEME" is poison
test "$GIT_INTERNAL_GETTEXT_SH_SCHEME" = "poison"
ok 2 # skip sanity: $GIT_INTERNAL_GETTEXT_SH_SCHEME" is poison (missing GETTEXT_POISON)
ok 350 - beyond a symlink from subdirectory with --verbose --non-matching
skipping test: gettext: our gettext() fallback has poison semantics
printf "# GETTEXT POISON #" >expect &&
gettext "test" >actual &&
test_cmp expect actual &&
printf "# GETTEXT POISON #" >expect &&
gettext "test more words" >actual &&
test_cmp expect actual
ok 3 # skip gettext: our gettext() fallback has poison semantics (missing GETTEXT_POISON)
skipping test: eval_gettext: our eval_gettext() fallback has poison semantics
printf "# GETTEXT POISON #" >expect &&
eval_gettext "test" >actual &&
test_cmp expect actual &&
printf "# GETTEXT POISON #" >expect &&
eval_gettext "test more words" >actual &&
test_cmp expect actual
ok 4 # skip eval_gettext: our eval_gettext() fallback has poison semantics (missing GETTEXT_POISON)
*** t0300-credentials.sh ***
# passed all 4 test(s)
1..4
expecting success:
expect "$expect" &&
eval "$code"
*** t0301-credential-cache.sh ***
ok 351 - submodule
expecting success:
expect '' &&
test_check_ignore "a/submodule/one" 128 &&
test_stderr "fatal: Pathspec 'a/submodule/one' is in submodule 'a/submodule'"
Merging:
8c0a55f struthio
virtual changes2
found 1 common ancestor:
0cd4af7 dir/child.t
Merge made by the 'recursive' strategy.
alpacas.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 alpacas.t
ok 352 - submodule with -q
expecting success:
expect '' &&
test_check_ignore "a/submodule/one" 128 &&
test_stderr "fatal: Pathspec 'a/submodule/one' is in submodule 'a/submodule'"
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0300-credentials/.git/
expecting success:
cat >dump <<-\EOF &&
whoami=$(echo $0 | sed s/.*git-credential-//)
echo >&2 "$whoami: $*"
OIFS=$IFS
IFS==
while read key value; do
echo >&2 "$whoami: $key=$value"
eval "$key=$value"
done
IFS=$OIFS
EOF
write_script git-credential-useless <<-\EOF &&
. ./dump
exit 0
EOF
write_script git-credential-verbatim <<-\EOF &&
user=$1; shift
pass=$1; shift
. ./dump
test -z "$user" || echo username=$user
test -z "$pass" || echo password=$pass
EOF
PATH="$PWD:$PATH"
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0301-credential-cache/.git/
ok 353 - submodule with --quiet
expecting success:
expect '' &&
test_check_ignore "a/submodule/one" 128 &&
test_stderr "fatal: Pathspec 'a/submodule/one' is in submodule 'a/submodule'"
ok 1 - setup helper scripts
expecting success:
check fill "verbatim foo bar" <<-\EOF
--
username=foo
password=bar
--
verbatim: get
EOF
expecting success:
check fill $HELPER <<-\EOF
protocol=https
host=example.com
--
protocol=https
host=example.com
username=askpass-username
password=askpass-password
--
askpass: Username for 'https://example.com':
askpass: Password for 'https://askpass-username@example.com':
EOF
ok 354 - submodule with -v
expecting success:
expect '' &&
test_check_ignore "a/submodule/one" 128 &&
test_stderr "fatal: Pathspec 'a/submodule/one' is in submodule 'a/submodule'"
ok 18 - merge maintains cache-tree
expecting success:
git checkout -b partial no-children &&
test_commit one &&
test_commit two &&
echo "some change" >one.t &&
git add one.t &&
echo "some other change" >two.t &&
git commit two.t -m partial &&
test_cache_tree
ok 2 - credential_fill invokes helper
expecting success:
check fill useless "verbatim foo bar" <<-\EOF
--
username=foo
password=bar
--
useless: get
verbatim: get
EOF
ok 355 - submodule with -v -n
expecting success:
expect '' &&
test_check_ignore "a/submodule/one" 128 &&
test_stderr "fatal: Pathspec 'a/submodule/one' is in submodule 'a/submodule'"
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
83846e7 Merge branch 'changes2' into HEAD
If you want to keep it by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> 83846e7
Switched to a new branch 'partial'
ok 1 - helper (cache) has no existing data
expecting success:
check approve $HELPER <<-\EOF
protocol=https
host=example.com
username=store-user
password=store-pass
EOF
ok 356 - submodule with -v --non-matching
expecting success:
expect '' &&
test_check_ignore "a/submodule/one" 128 &&
test_stderr "fatal: Pathspec 'a/submodule/one' is in submodule 'a/submodule'"
[partial 6771940] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
ok 357 - submodule with --verbose
expecting success:
expect '' &&
test_check_ignore "a/submodule/one" 128 &&
test_stderr "fatal: Pathspec 'a/submodule/one' is in submodule 'a/submodule'"
ok 2 - helper (cache) stores password
expecting success:
check fill $HELPER <<-\EOF
protocol=https
host=example.com
--
protocol=https
host=example.com
username=store-user
password=store-pass
--
EOF
ok 3 - credential_fill invokes multiple helpers
expecting success:
check fill "verbatim one two" "verbatim three four" <<-\EOF
--
username=one
password=two
--
verbatim: get
EOF
ok 358 - submodule with --verbose -n
expecting success:
expect '' &&
test_check_ignore "a/submodule/one" 128 &&
test_stderr "fatal: Pathspec 'a/submodule/one' is in submodule 'a/submodule'"
ok 3 - helper (cache) can retrieve password
expecting success:
check fill $HELPER <<-\EOF
protocol=http
host=example.com
--
protocol=http
host=example.com
username=askpass-username
password=askpass-password
--
askpass: Username for 'http://example.com':
askpass: Password for 'http://askpass-username@example.com':
EOF
[partial cd7fad9] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
ok 359 - submodule with --verbose --non-matching
ok 4 - credential_fill stops when we get a full response
expecting success:
check fill "verbatim one \"\"" "verbatim two three" <<-\EOF
--
username=two
password=three
--
verbatim: get
verbatim: get
verbatim: username=one
EOF
expecting success:
expect "$expect" &&
eval "$code"
ok 360 - submodule from subdirectory
[partial f24c7c2] partial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
expecting success:
expect '' &&
(
cd a &&
test_check_ignore "submodule/one" 128
) &&
test_stderr "fatal: Pathspec 'submodule/one' is in submodule 'a/submodule'"
ok 4 - helper (cache) requires matching protocol
expecting success:
check fill $HELPER <<-\EOF
protocol=https
host=other.tld
--
protocol=https
host=other.tld
username=askpass-username
password=askpass-password
--
askpass: Username for 'https://other.tld':
askpass: Password for 'https://askpass-username@other.tld':
EOF
ok 5 - credential_fill continues through partial response
expecting success:
check fill "verbatim one two" <<-\EOF
protocol=ftp
host=example.com
path=foo.git
--
protocol=ftp
host=example.com
path=foo.git
username=one
password=two
--
verbatim: get
verbatim: protocol=ftp
verbatim: host=example.com
verbatim: path=foo.git
EOF
ok 361 - submodule from subdirectory with -q
expecting success:
expect '' &&
(
cd a &&
test_check_ignore "submodule/one" 128
) &&
test_stderr "fatal: Pathspec 'submodule/one' is in submodule 'a/submodule'"
ok 19 - partial commit gives cache-tree
expecting success:
mkdir newdir &&
>newdir/one &&
git add newdir/one &&
git checkout 2>errors &&
! test -s errors
ok 362 - submodule from subdirectory with --quiet
expecting success:
expect '' &&
(
cd a &&
test_check_ignore "submodule/one" 128
) &&
test_stderr "fatal: Pathspec 'submodule/one' is in submodule 'a/submodule'"
ok 5 - helper (cache) requires matching host
expecting success:
check fill $HELPER <<-\EOF
protocol=https
host=example.com
username=other
--
protocol=https
host=example.com
username=other
password=askpass-password
--
askpass: Password for 'https://other@example.com':
EOF
ok 6 - credential_fill passes along metadata
expecting success:
check approve useless "verbatim one two" <<-\EOF
username=foo
password=bar
--
--
useless: store
useless: username=foo
useless: password=bar
verbatim: store
verbatim: username=foo
verbatim: password=bar
EOF
ok 363 - submodule from subdirectory with -v
expecting success:
expect '' &&
(
cd a &&
test_check_ignore "submodule/one" 128
) &&
test_stderr "fatal: Pathspec 'submodule/one' is in submodule 'a/submodule'"
A newdir/one
M one.t
ok 20 - no phantom error when switching trees
expecting success:
git update-index --split-index &&
>split &&
git add split &&
test-dump-split-index .git/index | grep -v ^own >before &&
git commit -m "as-is" &&
test-dump-split-index .git/index | grep -v ^own >after &&
test_cmp before after
ok 364 - submodule from subdirectory with -v -n
expecting success:
expect '' &&
(
cd a &&
test_check_ignore "submodule/one" 128
) &&
test_stderr "fatal: Pathspec 'submodule/one' is in submodule 'a/submodule'"
ok 6 - helper (cache) requires matching username
expecting success:
test_config credential.usehttppath true &&
check approve $HELPER <<-\EOF &&
protocol=http
host=path.tld
path=foo.git
username=user
password=pass
EOF
check fill $HELPER <<-\EOF
protocol=http
host=path.tld
path=bar.git
--
protocol=http
host=path.tld
path=bar.git
username=askpass-username
password=askpass-password
--
askpass: Username for 'http://path.tld/bar.git':
askpass: Password for 'http://askpass-username@path.tld/bar.git':
EOF
ok 365 - submodule from subdirectory with -v --non-matching
expecting success:
expect '' &&
(
cd a &&
test_check_ignore "submodule/one" 128
) &&
test_stderr "fatal: Pathspec 'submodule/one' is in submodule 'a/submodule'"
ok 7 - credential_approve calls all helpers
expecting success:
check approve useless <<-\EOF
username=foo
--
--
EOF
[partial dc7a831] as-is
Author: A U Thor <author@example.com>
3 files changed, 1 insertion(+), 1 deletion(-)
create mode 100644 newdir/one
create mode 100644 split
ok 21 - switching trees does not invalidate shared index
ok 8 - do not bother storing password-less credential
expecting success:
check reject useless "verbatim one two" <<-\EOF
username=foo
password=bar
--
--
useless: erase
useless: username=foo
useless: password=bar
verbatim: erase
verbatim: username=foo
verbatim: password=bar
EOF
# passed all 21 test(s)
1..21
ok 366 - submodule from subdirectory with --verbose
expecting success:
expect '' &&
(
cd a &&
test_check_ignore "submodule/one" 128
) &&
test_stderr "fatal: Pathspec 'submodule/one' is in submodule 'a/submodule'"
ok 367 - submodule from subdirectory with --verbose -n
expecting success:
expect '' &&
(
cd a &&
test_check_ignore "submodule/one" 128
) &&
test_stderr "fatal: Pathspec 'submodule/one' is in submodule 'a/submodule'"
ok 9 - credential_reject calls all helpers
expecting success:
check fill "verbatim \"\" three" <<-\EOF
username=one
--
username=one
password=three
--
verbatim: get
verbatim: username=one
EOF
ok 7 - helper (cache) requires matching path
expecting success:
check reject $HELPER <<-\EOF &&
protocol=https
host=example.com
EOF
check fill $HELPER <<-\EOF
protocol=https
host=example.com
--
protocol=https
host=example.com
username=askpass-username
password=askpass-password
--
askpass: Username for 'https://example.com':
askpass: Password for 'https://askpass-username@example.com':
EOF
ok 368 - submodule from subdirectory with --verbose --non-matching
expecting success:
expect_from_stdin <<-\EOF &&
.git/info/exclude:7:per-repo per-repo
a/.gitignore:2:*three a/globalthree
.git/info/exclude:7:per-repo a/per-repo
EOF
test_check_ignore "-v globalone per-repo a/globalthree a/per-repo not-ignored a/globaltwo"
*** t0302-credential-store.sh ***
ok 369 - global ignore not yet enabled
expecting success:
enable_global_excludes &&
expect_from_stdin <<-\EOF &&
globalone
per-repo
globalthree
a/globalthree
a/per-repo
globaltwo
EOF
test_check_ignore "globalone per-repo globalthree a/globalthree a/per-repo not-ignored globaltwo"
ok 10 - usernames can be preserved
expecting success:
check fill "verbatim two three" <<-\EOF
username=one
--
username=two
password=three
--
verbatim: get
verbatim: username=one
EOF
ok 370 - global ignore
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0302-credential-store/.git/
expecting success:
enable_global_excludes &&
expect_from_stdin <<-EOF &&
$global_excludes:1:globalone globalone
.git/info/exclude:7:per-repo per-repo
$global_excludes:3:globalthree globalthree
a/.gitignore:2:*three a/globalthree
.git/info/exclude:7:per-repo a/per-repo
$global_excludes:2:!globaltwo globaltwo
EOF
test_check_ignore "-v globalone per-repo globalthree a/globalthree a/per-repo not-ignored globaltwo"
ok 11 - usernames can be overridden
expecting success:
check fill "verbatim three four" <<-\EOF
username=one
password=two
--
username=one
password=two
--
EOF
expecting success:
check fill $HELPER <<-\EOF
protocol=https
host=example.com
--
protocol=https
host=example.com
username=askpass-username
password=askpass-password
--
askpass: Username for 'https://example.com':
askpass: Password for 'https://askpass-username@example.com':
EOF
ok 12 - do not bother completing already-full credential
expecting success:
check fill <<-\EOF
--
username=askpass-username
password=askpass-password
--
askpass: Username:
askpass: Password:
EOF
ok 8 - helper (cache) can forget host
expecting success:
check approve $HELPER <<-\EOF &&
protocol=https
host=example.com
username=user1
password=pass1
EOF
check approve $HELPER <<-\EOF &&
protocol=https
host=example.com
username=user2
password=pass2
EOF
check fill $HELPER <<-\EOF &&
protocol=https
host=example.com
username=user1
--
protocol=https
host=example.com
username=user1
password=pass1
EOF
check fill $HELPER <<-\EOF
protocol=https
host=example.com
username=user2
--
protocol=https
host=example.com
username=user2
password=pass2
EOF
ok 371 - global ignore with -v
ok 13 - empty helper list falls back to internal getpass
expecting success:
check fill <<-\EOF
username=foo
--
username=foo
password=askpass-password
--
askpass: Password:
EOF
ok 1 - helper (store) has no existing data
expecting success:
check approve $HELPER <<-\EOF
protocol=https
host=example.com
username=store-user
password=store-pass
EOF
expecting success:
expect_from_stdin <expected-default &&
test_check_ignore "--stdin" <stdin
ok 14 - internal getpass does not ask for known username
expecting success:
test_config credential.helper "$HELPER" &&
check fill <<-\EOF
--
username=foo
password=bar
--
EOF
ok 2 - helper (store) stores password
expecting success:
check fill $HELPER <<-\EOF
protocol=https
host=example.com
--
protocol=https
host=example.com
username=store-user
password=store-pass
--
EOF
ok 372 - --stdin
expecting success:
expect "" &&
test_check_ignore "-q --stdin" <stdin
ok 373 - --stdin -q
expecting success:
expect_from_stdin <expected-verbose &&
test_check_ignore "-v --stdin" <stdin
ok 15 - respect configured credentials
expecting success:
test_config credential.https://example.com.helper "$HELPER" &&
check fill <<-\EOF
protocol=https
host=example.com
path=repo.git
--
protocol=https
host=example.com
username=foo
password=bar
--
EOF
ok 3 - helper (store) can retrieve password
expecting success:
check fill $HELPER <<-\EOF
protocol=http
host=example.com
--
protocol=http
host=example.com
username=askpass-username
password=askpass-password
--
askpass: Username for 'http://example.com':
askpass: Password for 'http://askpass-username@example.com':
EOF
ok 9 - helper (cache) can store multiple users
expecting success:
check reject $HELPER <<-\EOF &&
protocol=https
host=example.com
username=user1
EOF
check fill $HELPER <<-\EOF
protocol=https
host=example.com
username=user1
--
protocol=https
host=example.com
username=user1
password=askpass-password
--
askpass: Password for 'https://user1@example.com':
EOF
ok 374 - --stdin -v
expecting success:
expect_from_stdin <expected-default0 &&
test_check_ignore '--stdin -z' <stdin0
ok 16 - match configured credential
expecting success:
test_config credential.https://foo.helper "$HELPER" &&
check fill <<-\EOF
protocol=https
host=bar
--
protocol=https
host=bar
username=askpass-username
password=askpass-password
--
askpass: Username for 'https://bar':
askpass: Password for 'https://askpass-username@bar':
EOF
ok 375 - --stdin -z
expecting success:
expect &&
test_check_ignore '-q --stdin -z' <stdin0
ok 4 - helper (store) requires matching protocol
expecting success:
check fill $HELPER <<-\EOF
protocol=https
host=other.tld
--
protocol=https
host=other.tld
username=askpass-username
password=askpass-password
--
askpass: Username for 'https://other.tld':
askpass: Password for 'https://askpass-username@other.tld':
EOF
ok 376 - --stdin -z -q
expecting success:
expect_from_stdin <expected-verbose0 &&
test_check_ignore '-v --stdin -z' <stdin0
ok 10 - helper (cache) can forget user
expecting success:
check fill $HELPER <<-\EOF
protocol=https
host=example.com
username=user2
--
protocol=https
host=example.com
username=user2
password=pass2
EOF
ok 377 - --stdin -z -v
expecting success:
expect_from_stdin <expected-default0 &&
test_check_ignore '-z --stdin' <stdin0
ok 17 - do not match configured credential
expecting success:
test_config credential.https://example.com.username foo &&
check fill <<-\EOF
protocol=https
host=example.com
--
protocol=https
host=example.com
username=foo
password=askpass-password
--
askpass: Password for 'https://foo@example.com':
EOF
ok 5 - helper (store) requires matching host
expecting success:
check fill $HELPER <<-\EOF
protocol=https
host=example.com
username=other
--
protocol=https
host=example.com
username=other
password=askpass-password
--
askpass: Password for 'https://other@example.com':
EOF
ok 11 - helper (cache) remembers other user
expecting success:
check approve "$HELPER" <<-\EOF &&
protocol=https
host=timeout.tld
username=user
password=pass
EOF
sleep 2 &&
check fill "$HELPER" <<-\EOF
protocol=https
host=timeout.tld
--
protocol=https
host=timeout.tld
username=askpass-username
password=askpass-password
--
askpass: Username for 'https://timeout.tld':
askpass: Password for 'https://askpass-username@timeout.tld':
EOF
ok 378 - -z --stdin
expecting success:
expect &&
test_check_ignore '-q -z --stdin' <stdin0
ok 18 - pull username from config
expecting success:
check fill "verbatim foo bar" <<-\EOF &&
protocol=https
host=example.com
path=foo.git
--
protocol=https
host=example.com
username=foo
password=bar
--
verbatim: get
verbatim: protocol=https
verbatim: host=example.com
EOF
test_config credential.https://example.com.useHttpPath true &&
check fill "verbatim foo bar" <<-\EOF
protocol=https
host=example.com
path=foo.git
--
protocol=https
host=example.com
path=foo.git
username=foo
password=bar
--
verbatim: get
verbatim: protocol=https
verbatim: host=example.com
verbatim: path=foo.git
EOF
ok 379 - -z --stdin -q
expecting success:
expect_from_stdin <expected-verbose0 &&
test_check_ignore '-v -z --stdin' <stdin0
ok 6 - helper (store) requires matching username
expecting success:
test_config credential.usehttppath true &&
check approve $HELPER <<-\EOF &&
protocol=http
host=path.tld
path=foo.git
username=user
password=pass
EOF
check fill $HELPER <<-\EOF
protocol=http
host=path.tld
path=bar.git
--
protocol=http
host=path.tld
path=bar.git
username=askpass-username
password=askpass-password
--
askpass: Username for 'http://path.tld/bar.git':
askpass: Password for 'http://askpass-username@path.tld/bar.git':
EOF
ok 380 - -z --stdin -v
expecting success:
expect_from_stdin <expected-default &&
(
cd a &&
test_check_ignore "--stdin" <../stdin
)
ok 19 - http paths can be part of context
expecting success:
test_must_fail git \
-c credential.helper="!f() { echo quit=1; }; f" \
-c credential.helper="verbatim foo bar" \
credential fill >stdout &&
>expect &&
test_cmp expect stdout
ok 381 - --stdin from subdirectory
expecting success:
expect_from_stdin <expected-verbose &&
(
cd a &&
test_check_ignore "--stdin -v" <../stdin
)
fatal: credential helper '!f() { echo quit=1; }; f' told us to quit
ok 7 - helper (store) requires matching path
expecting success:
check reject $HELPER <<-\EOF &&
protocol=https
host=example.com
EOF
check fill $HELPER <<-\EOF
protocol=https
host=example.com
--
protocol=https
host=example.com
username=askpass-username
password=askpass-password
--
askpass: Username for 'https://example.com':
askpass: Password for 'https://askpass-username@example.com':
EOF
ok 20 - helpers can abort the process
# passed all 20 test(s)
1..20
ok 382 - --stdin from subdirectory with -v
expecting success:
expect_from_stdin <expected-all &&
(
cd a &&
test_check_ignore "--stdin -v -n" <../stdin
)
*** t0303-credential-external.sh ***
ok 383 - --stdin from subdirectory with -v -n
expecting success:
expect_from_stdin <expected-default0 &&
(
cd a &&
test_check_ignore "--stdin -z" <../stdin0
)
ok 384 - --stdin -z from subdirectory
expecting success:
expect_from_stdin <expected-verbose0 &&
(
cd a &&
test_check_ignore "--stdin -z -v" <../stdin0
)
ok 8 - helper (store) can forget host
expecting success:
check approve $HELPER <<-\EOF &&
protocol=https
host=example.com
username=user1
password=pass1
EOF
check approve $HELPER <<-\EOF &&
protocol=https
host=example.com
username=user2
password=pass2
EOF
check fill $HELPER <<-\EOF &&
protocol=https
host=example.com
username=user1
--
protocol=https
host=example.com
username=user1
password=pass1
EOF
check fill $HELPER <<-\EOF
protocol=https
host=example.com
username=user2
--
protocol=https
host=example.com
username=user2
password=pass2
EOF
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t0303-credential-external/.git/
ok 385 - --stdin -z from subdirectory with -v
expecting success:
expect_from_stdin <expected-default0 &&
(
cd a &&
test_check_ignore "-z --stdin" <../stdin0
)
1..0 # SKIP used to test external credential helpers
*** t1000-read-tree-m-3way.sh ***
ok 386 - -z --stdin from subdirectory
expecting success:
expect_from_stdin <expected-verbose0 &&
(
cd a &&
test_check_ignore "-z --stdin -v" <../stdin0
)
ok 387 - -z --stdin from subdirectory with -v
checking prerequisite: PIPE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# test whether the filesystem supports FIFOs
case $(uname -s) in
CYGWIN*)
false
;;
*)
rm -f testfifo && mkfifo testfifo
;;
esac
)
prerequisite PIPE ok
expecting success:
mkfifo in out &&
(git check-ignore -n -v --stdin <in >out &) &&
# We cannot just "echo >in" because check-ignore would get EOF
# after echo exited; instead we open the descriptor in our
# shell, and then echo to the fd. We make sure to close it at
# the end, so that the subprocess does get EOF and dies
# properly.
#
# Similarly, we must keep "out" open so that check-ignore does
# not ever get SIGPIPE trying to write to us. Not only would that
# produce incorrect results, but then there would be no writer on the
# other end of the pipe, and we would potentially block forever trying
# to open it.
exec 9>in &&
exec 8<out &&
test_when_finished "exec 9>&-" &&
test_when_finished "exec 8<&-" &&
echo >&9 one &&
read response <&8 &&
echo "$response" | grep "^\.gitignore:1:one one" &&
echo >&9 two &&
read response <&8 &&
echo "$response" | grep "^:: two"
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1000-read-tree-m-3way/.git/
ok 9 - helper (store) can store multiple users
expecting success:
check reject $HELPER <<-\EOF &&
protocol=https
host=example.com
username=user1
EOF
check fill $HELPER <<-\EOF
protocol=https
host=example.com
username=user1
--
protocol=https
host=example.com
username=user1
password=askpass-password
--
askpass: Password for 'https://user1@example.com':
EOF
expecting success: git update-index --add $p &&
git update-index --add Z/$p
.gitignore:1:one one
:: two
ok 388 - streaming support for --stdin
expecting success:
mkdir whitespace &&
>whitespace/trailing &&
>whitespace/untracked &&
echo "whitespace/trailing " >ignore &&
cat >expect <<EOF &&
whitespace/untracked
EOF
: >err.expect &&
git ls-files -o -X ignore whitespace >actual 2>err &&
test_cmp expect actual &&
test_cmp err.expect err
ok 1 - adding test file NN and Z/NN
expecting success: git update-index --add $p &&
git update-index --add Z/$p
ok 389 - trailing whitespace is ignored
expecting success:
rm -rf whitespace &&
mkdir whitespace &&
>"whitespace/trailing " &&
>whitespace/untracked &&
echo "whitespace/trailing\\ \\ " >ignore &&
echo whitespace/untracked >expect &&
: >err.expect &&
git ls-files -o -X ignore whitespace >actual 2>err &&
test_cmp expect actual &&
test_cmp err.expect err
ok 2 - adding test file ND and Z/ND
expecting success: git update-index --add $p &&
git update-index --add Z/$p
ok 390 - quoting allows trailing whitespace
ok 10 - helper (store) can forget user
expecting success:
check fill $HELPER <<-\EOF
protocol=https
host=example.com
username=user2
--
protocol=https
host=example.com
username=user2
password=pass2
EOF
expecting success:
rm -rf whitespace &&
mkdir whitespace &&
>"whitespace/trailing 1 " &&
>"whitespace/trailing 2 \\\\" &&
>"whitespace/trailing 3 \\\\" &&
>"whitespace/trailing 4 \\ " &&
>"whitespace/trailing 5 \\ \\ " &&
>"whitespace/trailing 6 \\a\\" &&
>whitespace/untracked &&
sed -e "s/Z$//" >ignore <<-\EOF &&
whitespace/trailing 1 \ Z
whitespace/trailing 2 \\\\Z
whitespace/trailing 3 \\\\ Z
whitespace/trailing 4 \\\ Z
whitespace/trailing 5 \\ \\\ Z
whitespace/trailing 6 \\a\\Z
EOF
echo whitespace/untracked >expect &&
>err.expect &&
git ls-files -o -X ignore whitespace >actual 2>err &&
test_cmp expect actual &&
test_cmp err.expect err
ok 3 - adding test file NM and Z/NM
expecting success: git update-index --add $p &&
git update-index --add Z/$p
ok 391 - correct handling of backslashes
ok 11 - helper (store) remembers other user
expecting success:
test_path_is_missing "$HOME/.config/git/credentials" &&
test -s "$HOME/.git-credentials"
expecting success:
echo >>global-excludes usually-ignored &&
echo >>.git/info/exclude "!usually-ignored" &&
>usually-ignored &&
echo "?? usually-ignored" >expect &&
git status --porcelain usually-ignored >actual &&
test_cmp expect actual
ok 4 - adding test file DN and Z/DN
expecting success: git update-index --add $p &&
git update-index --add Z/$p
ok 12 - when xdg file does not exist, xdg file not created
expecting success:
rm -f "$HOME/.git-credentials" &&
mkdir -p "$HOME/.config/git" &&
>"$HOME/.config/git/credentials"
ok 13 - setup xdg file
expecting success:
check fill $HELPER <<-\EOF
protocol=https
host=example.com
--
protocol=https
host=example.com
username=askpass-username
password=askpass-password
--
askpass: Username for 'https://example.com':
askpass: Password for 'https://askpass-username@example.com':
EOF
ok 392 - info/exclude trumps core.excludesfile
# passed all 392 test(s)
1..392
ok 5 - adding test file DD and Z/DD
expecting success: git update-index --add $p &&
git update-index --add Z/$p
ok 6 - adding test file DM and Z/DM
expecting success: git update-index --add $p &&
git update-index --add Z/$p
ok 14 - helper (store) has no existing data
expecting success:
check approve $HELPER <<-\EOF
protocol=https
host=example.com
username=store-user
password=store-pass
EOF
*** t1001-read-tree-m-2way.sh ***
ok 7 - adding test file MN and Z/MN
expecting success: git update-index --add $p &&
git update-index --add Z/$p
ok 15 - helper (store) stores password
expecting success:
check fill $HELPER <<-\EOF
protocol=https
host=example.com
--
protocol=https
host=example.com
username=store-user
password=store-pass
--
EOF
ok 8 - adding test file MD and Z/MD
expecting success: git update-index --add $p &&
git update-index --add Z/$p
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1001-read-tree-m-2way/.git/
ok 16 - helper (store) can retrieve password
expecting success:
check fill $HELPER <<-\EOF
protocol=http
host=example.com
--
protocol=http
host=example.com
username=askpass-username
password=askpass-password
--
askpass: Username for 'http://example.com':
askpass: Password for 'http://askpass-username@example.com':
EOF
ok 9 - adding test file MM and Z/MM
expecting success: git update-index --add SS
expecting success: echo frotz >frotz &&
echo nitfol >nitfol &&
cat bozbar-old >bozbar &&
echo rezrov >rezrov &&
echo yomin >yomin &&
git update-index --add nitfol bozbar rezrov &&
treeH=$(git write-tree) &&
echo treeH $treeH &&
git ls-tree $treeH &&
cat bozbar-new >bozbar &&
git update-index --add frotz bozbar --force-remove rezrov &&
git ls-files --stage >M.out &&
treeM=$(git write-tree) &&
echo treeM $treeM &&
git ls-tree $treeM &&
git diff-tree $treeH $treeM
ok 10 - adding test file SS
expecting success: git update-index --add TT
ok 11 - adding test file TT
expecting success: tree_O=$(git write-tree)
treeH ca3aa9e6ee09349df7db6f0de15016afcdf5d9e4
ok 12 - prepare initial tree
ok 17 - helper (store) requires matching protocol
expecting success:
check fill $HELPER <<-\EOF
protocol=https
host=other.tld
--
protocol=https
host=other.tld
username=askpass-username
password=askpass-password
--
askpass: Username for 'https://other.tld':
askpass: Password for 'https://askpass-username@other.tld':
EOF
expecting success: git update-index --remove $to_remove
100644 blob 3e8d9abb979a4fbdc93309f457a5496bc41ba6ab bozbar
100644 blob dca6b92303befc93086aa025d90a5facd7eb2812 nitfol
100644 blob 766498d93a4b06057a8e49d23f4068f1170ff38f rezrov
ok 13 - change in branch A (removal)
expecting success: git update-index MD
ok 14 - change in branch A (modification)
expecting success: git update-index MM
treeM d2c045ead2ecb56f2632385a395918bf21816c12
ok 15 - change in branch A (modification)
expecting success: git update-index MN
100644 blob 346d4e61f111336a1443ef6b2e834aa5b1a7f91a bozbar
100644 blob 8e4020bb5a8d8c873b25de15933e75cc0fc275df frotz
100644 blob dca6b92303befc93086aa025d90a5facd7eb2812 nitfol
ok 18 - helper (store) requires matching host
expecting success:
check fill $HELPER <<-\EOF
protocol=https
host=example.com
username=other
--
protocol=https
host=example.com
username=other
password=askpass-password
--
askpass: Password for 'https://other@example.com':
EOF
ok 16 - change in branch A (modification)
expecting success: git update-index Z/MD
:100644 100644 3e8d9abb979a4fbdc93309f457a5496bc41ba6ab 346d4e61f111336a1443ef6b2e834aa5b1a7f91a M bozbar
:000000 100644 0000000000000000000000000000000000000000 8e4020bb5a8d8c873b25de15933e75cc0fc275df A frotz
:100644 000000 766498d93a4b06057a8e49d23f4068f1170ff38f 0000000000000000000000000000000000000000 D rezrov
ok 1 - setup
expecting success: rm -f .git/index &&
read_tree_twoway $treeH $treeM &&
git ls-files --stage >1-3.out &&
test_cmp M.out 1-3.out &&
check_cache_at bozbar dirty &&
check_cache_at frotz dirty &&
check_cache_at nitfol dirty
ok 17 - change in branch A (modification)
expecting success: git update-index Z/MM
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 dca6b92303befc93086aa025d90a5facd7eb2812 0 nitfol
ok 18 - change in branch A (modification)
expecting success: git update-index Z/MN
ok 19 - helper (store) requires matching username
expecting success:
test_config credential.usehttppath true &&
check approve $HELPER <<-\EOF &&
protocol=http
host=path.tld
path=foo.git
username=user
password=pass
EOF
check fill $HELPER <<-\EOF
protocol=http
host=path.tld
path=bar.git
--
protocol=http
host=path.tld
path=bar.git
username=askpass-username
password=askpass-password
--
askpass: Username for 'http://path.tld/bar.git':
askpass: Password for 'http://askpass-username@path.tld/bar.git':
EOF
ok 19 - change in branch A (modification)
expecting success: git update-index --add AN
bozbar: dirty
ok 20 - change in branch A (addition)
expecting success: git update-index --add AA
frotz: dirty
nitfol: dirty
ok 2 - 1, 2, 3 - no carry forward
expecting success: rm -f .git/index &&
read_tree_must_succeed $treeH &&
git checkout-index -u -f -q -a &&
git update-index --add yomin &&
read_tree_twoway $treeH $treeM &&
git ls-files --stage >4.out &&
test_must_fail git diff --no-index M.out 4.out >4diff.out &&
compare_change 4diff.out expected &&
check_cache_at yomin clean
ok 21 - change in branch A (addition)
expecting success: git update-index --add Z/AN
ok 22 - change in branch A (addition)
expecting success: git update-index --add Z/AA
ok 23 - change in branch A (addition)
expecting success: git update-index --add LL &&
git update-index SS
ok 24 - change in branch A (addition)
ok 20 - helper (store) requires matching path
expecting success:
check reject $HELPER <<-\EOF &&
protocol=https
host=example.com
EOF
check fill $HELPER <<-\EOF
protocol=https
host=example.com
--
protocol=https
host=example.com
username=askpass-username
password=askpass-password
--
askpass: Username for 'https://example.com':
askpass: Password for 'https://askpass-username@example.com':
EOF
expecting success: git update-index TT
ok 25 - change in branch A (edit)
expecting success: git update-index --add DF/DF
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 dca6b92303befc93086aa025d90a5facd7eb2812 0 nitfol
100644 0a41e115ab61be0328a19b29f18cdcb49338d516 0 yomin
ok 26 - change in branch A (change file to directory)
expecting success: tree_A=$(git write-tree)
ok 27 - recording branch A tree
yomin: clean
ok 3 - 4 - carry forward local addition.
expecting success: rm -f .git/index &&
read_tree_must_succeed $treeH &&
git checkout-index -u -f -q -a &&
echo yomin >yomin &&
git update-index --add yomin &&
echo yomin yomin >yomin &&
read_tree_twoway $treeH $treeM &&
git ls-files --stage >5.out &&
test_must_fail git diff --no-index M.out 5.out >5diff.out &&
compare_change 5diff.out expected &&
check_cache_at yomin dirty
expecting success: git read-tree $tree_O &&
git checkout-index -a
ok 21 - helper (store) can forget host
expecting success:
check approve $HELPER <<-\EOF &&
protocol=https
host=example.com
username=user1
password=pass1
EOF
check approve $HELPER <<-\EOF &&
protocol=https
host=example.com
username=user2
password=pass2
EOF
check fill $HELPER <<-\EOF &&
protocol=https
host=example.com
username=user1
--
protocol=https
host=example.com
username=user1
password=pass1
EOF
check fill $HELPER <<-\EOF
protocol=https
host=example.com
username=user2
--
protocol=https
host=example.com
username=user2
password=pass2
EOF
ok 28 - reading original tree and checking out
expecting success: git update-index --remove DD MD ND Z/DD Z/MD Z/ND
ok 29 - change in branch B (removal)
expecting success: git update-index DM
ok 30 - change in branch B (modification)
expecting success: git update-index MM
ok 31 - change in branch B (modification)
expecting success: git update-index NM
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 dca6b92303befc93086aa025d90a5facd7eb2812 0 nitfol
100644 0a41e115ab61be0328a19b29f18cdcb49338d516 0 yomin
ok 32 - change in branch B (modification)
expecting success: git update-index Z/DM
ok 33 - change in branch B (modification)
expecting success: git update-index Z/MM
ok 34 - change in branch B (modification)
expecting success: git update-index Z/NM
yomin: dirty
ok 4 - 5 - carry forward local addition.
expecting success: rm -f .git/index &&
read_tree_must_succeed $treeH &&
git checkout-index -u -f -q -a &&
git update-index --add frotz &&
read_tree_twoway $treeH $treeM &&
git ls-files --stage >6.out &&
test_cmp M.out 6.out &&
check_cache_at frotz clean
ok 35 - change in branch B (modification)
expecting success: git update-index --add NA
ok 22 - helper (store) can store multiple users
expecting success:
check reject $HELPER <<-\EOF &&
protocol=https
host=example.com
username=user1
EOF
check fill $HELPER <<-\EOF
protocol=https
host=example.com
username=user1
--
protocol=https
host=example.com
username=user1
password=askpass-password
--
askpass: Password for 'https://user1@example.com':
EOF
ok 36 - change in branch B (addition)
expecting success: git update-index --add AA
ok 37 - change in branch B (addition)
expecting success: git update-index --add Z/NA
ok 12 - helper (cache --timeout=1) times out
ok 38 - change in branch B (addition)
expecting success: git update-index --add Z/AA
# passed all 12 test(s)
1..12
ok 39 - change in branch B (addition)
expecting success: git update-index --add LL &&
git update-index SS
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 dca6b92303befc93086aa025d90a5facd7eb2812 0 nitfol
ok 40 - change in branch B (addition and modification)
*** t1002-read-tree-m-u-2way.sh ***
ok 23 - helper (store) can forget user
expecting success:
check fill $HELPER <<-\EOF
protocol=https
host=example.com
username=user2
--
protocol=https
host=example.com
username=user2
password=pass2
EOF
frotz: clean
expecting success: git update-index TT
ok 5 - 6 - local addition already has the same.
expecting success: rm -f .git/index &&
read_tree_must_succeed $treeH &&
git checkout-index -u -f -q -a &&
echo frotz >frotz &&
git update-index --add frotz &&
echo frotz frotz >frotz &&
read_tree_twoway $treeH $treeM &&
git ls-files --stage >7.out &&
test_cmp M.out 7.out &&
check_cache_at frotz dirty
ok 41 - change in branch B (modification)
expecting success: git update-index --add DF
ok 24 - helper (store) remembers other user
expecting success:
test -s "$HOME/.config/git/credentials" &&
test_path_is_missing "$HOME/.git-credentials"
ok 25 - when xdg file exists, home file not created
ok 42 - change in branch B (addition of a file to conflict with directory)
expecting success:
rm -f "$HOME/.git-credentials" &&
rm -f "$HOME/.config/git/credentials" &&
mkdir -p "$HOME/xdg/git" &&
>"$HOME/xdg/git/credentials"
expecting success: tree_B=$(git write-tree)
ok 26 - setup custom xdg file
expecting success:
check fill $HELPER <<-\EOF
protocol=https
host=example.com
--
protocol=https
host=example.com
username=askpass-username
password=askpass-password
--
askpass: Username for 'https://example.com':
askpass: Password for 'https://askpass-username@example.com':
EOF
ok 43 - recording branch B tree
expecting success: rm -f .git/index &&
git read-tree $tree_O &&
mkdir .orig-O &&
git checkout-index --prefix=.orig-O/ -f -q -a &&
rm -f .git/index &&
git read-tree $tree_A &&
mkdir .orig-A &&
git checkout-index --prefix=.orig-A/ -f -q -a &&
rm -f .git/index &&
git read-tree $tree_B &&
mkdir .orig-B &&
git checkout-index --prefix=.orig-B/ -f -q -a
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1002-read-tree-m-u-2way/.git/
expecting success: echo frotz >frotz &&
echo nitfol >nitfol &&
echo bozbar >bozbar &&
echo rezrov >rezrov &&
git update-index --add nitfol bozbar rezrov &&
treeH=$(git write-tree) &&
echo treeH $treeH &&
git ls-tree $treeH &&
echo gnusto >bozbar &&
git update-index --add frotz bozbar --force-remove rezrov &&
git ls-files --stage >M.out &&
treeM=$(git write-tree) &&
echo treeM $treeM &&
git ls-tree $treeM &&
sum bozbar frotz nitfol >M.sum &&
git diff-tree $treeH $treeM
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 dca6b92303befc93086aa025d90a5facd7eb2812 0 nitfol
ok 27 - helper (store) has no existing data
expecting success:
check approve $HELPER <<-\EOF
protocol=https
host=example.com
username=store-user
password=store-pass
EOF
treeH 661afa9096b7e2d4b9a28a6e43736cd0b06d1308
100644 blob 78d812a2124ff980a1a70f8cca493698d643d242 bozbar
100644 blob dca6b92303befc93086aa025d90a5facd7eb2812 nitfol
100644 blob 766498d93a4b06057a8e49d23f4068f1170ff38f rezrov
frotz: dirty
ok 6 - 7 - local addition already has the same.
expecting success: rm -f .git/index &&
read_tree_must_succeed $treeH &&
git checkout-index -u -f -q -a &&
echo frotz frotz >frotz &&
git update-index --add frotz &&
if read_tree_twoway $treeH $treeM; then false; else :; fi
ok 28 - helper (store) stores password
expecting success:
check fill $HELPER <<-\EOF
protocol=https
host=example.com
--
protocol=https
host=example.com
username=store-user
password=store-pass
--
EOF
treeM 05bf9652e9b06473d6ca2f32ff60e2401e59bfa6
100644 blob bb3b2cd2e136e1e4e7ecdf10068e246196dd8294 bozbar
100644 blob 8e4020bb5a8d8c873b25de15933e75cc0fc275df frotz
100644 blob dca6b92303befc93086aa025d90a5facd7eb2812 nitfol
ok 29 - helper (store) can retrieve password
expecting success:
check fill $HELPER <<-\EOF
protocol=http
host=example.com
--
protocol=http
host=example.com
username=askpass-username
password=askpass-password
--
askpass: Username for 'http://example.com':
askpass: Password for 'http://askpass-username@example.com':
EOF
ok 44 - keep contents of 3 trees for easy access
:100644 100644 78d812a2124ff980a1a70f8cca493698d643d242 bb3b2cd2e136e1e4e7ecdf10068e246196dd8294 M bozbar
:000000 100644 0000000000000000000000000000000000000000 8e4020bb5a8d8c873b25de15933e75cc0fc275df A frotz
:100644 000000 766498d93a4b06057a8e49d23f4068f1170ff38f 0000000000000000000000000000000000000000 D rezrov
ok 1 - setup
expecting success: rm -f .git/index nitfol bozbar rezrov frotz &&
read_tree_u_must_succeed --reset -u $treeH &&
read_tree_u_must_succeed -m -u $treeH $treeM &&
git ls-files --stage >1-3.out &&
cmp M.out 1-3.out &&
sum bozbar frotz nitfol >actual3.sum &&
cmp M.sum actual3.sum &&
check_cache_at bozbar clean &&
check_cache_at frotz clean &&
check_cache_at nitfol clean
expecting success: rm -fr [NDMALTS][NDMALTSF] Z &&
rm .git/index &&
read_tree_must_succeed -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226 &&
check_result
error: Entry 'frotz' would be overwritten by merge. Cannot merge.
ok 7 - 8 - conflicting addition.
expecting success: rm -f .git/index &&
read_tree_must_succeed $treeH &&
git checkout-index -u -f -q -a &&
echo frotz frotz >frotz &&
git update-index --add frotz &&
echo frotz >frotz &&
if read_tree_twoway $treeH $treeM; then false; else :; fi
ok 30 - helper (store) requires matching protocol
expecting success:
check fill $HELPER <<-\EOF
protocol=https
host=other.tld
--
protocol=https
host=other.tld
username=askpass-username
password=askpass-password
--
askpass: Username for 'https://other.tld':
askpass: Password for 'https://askpass-username@other.tld':
EOF
ok 45 - 3-way merge with git read-tree -m, empty cache
expecting success: rm -fr [NDMALTS][NDMALTSF] Z &&
rm .git/index &&
read_tree_must_succeed 997bbc4a0a51e0574168a4f637739380edebe4d7 &&
git checkout-index -f -u -a &&
read_tree_must_succeed -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226 &&
check_result
ok 31 - helper (store) requires matching host
expecting success:
check fill $HELPER <<-\EOF
protocol=https
host=example.com
username=other
--
protocol=https
host=example.com
username=other
password=askpass-password
--
askpass: Password for 'https://other@example.com':
EOF
error: Entry 'frotz' would be overwritten by merge. Cannot merge.
ok 8 - 9 - conflicting addition.
expecting success: rm -f .git/index &&
read_tree_must_succeed $treeH &&
git checkout-index -u -f -q -a &&
echo rezrov >rezrov &&
git update-index --add rezrov &&
read_tree_twoway $treeH $treeM &&
git ls-files --stage >10.out &&
test_cmp M.out 10.out
ok 32 - helper (store) requires matching username
expecting success:
test_config credential.usehttppath true &&
check approve $HELPER <<-\EOF &&
protocol=http
host=path.tld
path=foo.git
username=user
password=pass
EOF
check fill $HELPER <<-\EOF
protocol=http
host=path.tld
path=bar.git
--
protocol=http
host=path.tld
path=bar.git
username=askpass-username
password=askpass-password
--
askpass: Username for 'http://path.tld/bar.git':
askpass: Password for 'http://askpass-username@path.tld/bar.git':
EOF
bozbar: clean
frotz: clean
nitfol: clean
ok 2 - 1, 2, 3 - no carry forward
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 dca6b92303befc93086aa025d90a5facd7eb2812 0 nitfol
expecting success: rm -f .git/index nitfol bozbar rezrov frotz &&
read_tree_u_must_succeed --reset -u $treeH &&
echo "+100644 X 0 yomin" >expected &&
echo yomin >yomin &&
git update-index --add yomin &&
read_tree_u_must_succeed -m -u $treeH $treeM &&
git ls-files --stage >4.out &&
test_might_fail git diff -U0 --no-index M.out 4.out >4diff.out &&
compare_change 4diff.out expected &&
check_cache_at yomin clean &&
sum bozbar frotz nitfol >actual4.sum &&
cmp M.sum actual4.sum &&
echo yomin >yomin1 &&
diff yomin yomin1 &&
rm -f yomin1
ok 9 - 10 - path removed.
expecting success: rm -f .git/index &&
read_tree_must_succeed $treeH &&
git checkout-index -u -f -q -a &&
echo rezrov >rezrov &&
git update-index --add rezrov &&
echo rezrov rezrov >rezrov &&
if read_tree_twoway $treeH $treeM; then false; else :; fi
ok 46 - 3-way merge with git read-tree -m, match H
expecting success:
rm -f .git/index XX &&
echo XX >XX &&
git update-index --add XX &&
read_tree_must_fail -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
error: Entry 'XX' would be overwritten by merge. Cannot merge.
ok 33 - helper (store) requires matching path
expecting success:
check reject $HELPER <<-\EOF &&
protocol=https
host=example.com
EOF
check fill $HELPER <<-\EOF
protocol=https
host=example.com
--
protocol=https
host=example.com
username=askpass-username
password=askpass-password
--
askpass: Username for 'https://example.com':
askpass: Password for 'https://askpass-username@example.com':
EOF
error: Entry 'XX' would be overwritten by merge. Cannot merge.
ok 47 - 1 - must not have an entry not in A.
expecting success: rm -f .git/index NA &&
cp .orig-B/NA NA &&
git update-index --add NA &&
read_tree_must_succeed -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
error: Entry 'rezrov' not uptodate. Cannot merge.
ok 10 - 11 - dirty path removed.
expecting success: rm -f .git/index &&
read_tree_must_succeed $treeH &&
git checkout-index -u -f -q -a &&
echo rezrov rezrov >rezrov &&
git update-index --add rezrov &&
if read_tree_twoway $treeH $treeM; then false; else :; fi
ok 34 - helper (store) can forget host
expecting success:
check approve $HELPER <<-\EOF &&
protocol=https
host=example.com
username=user1
password=pass1
EOF
check approve $HELPER <<-\EOF &&
protocol=https
host=example.com
username=user2
password=pass2
EOF
check fill $HELPER <<-\EOF &&
protocol=https
host=example.com
username=user1
--
protocol=https
host=example.com
username=user1
password=pass1
EOF
check fill $HELPER <<-\EOF
protocol=https
host=example.com
username=user2
--
protocol=https
host=example.com
username=user2
password=pass2
EOF
ok 48 - 2 - must match B in !O && !A && B case.
expecting success: rm -f .git/index NA &&
cp .orig-B/NA NA &&
git update-index --add NA &&
echo extra >>NA &&
read_tree_must_succeed -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
error: Entry 'rezrov' would be overwritten by merge. Cannot merge.
ok 11 - 12 - unmatching local changes being removed.
expecting success: rm -f .git/index &&
read_tree_must_succeed $treeH &&
git checkout-index -u -f -q -a &&
echo rezrov rezrov >rezrov &&
git update-index --add rezrov &&
echo rezrov >rezrov &&
if read_tree_twoway $treeH $treeM; then false; else :; fi
yomin: clean
ok 49 - 2 - matching B alone is OK in !O && !A && B case.
expecting success: rm -f .git/index AN &&
cp .orig-A/AN AN &&
git update-index --add AN &&
read_tree_must_succeed -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226 &&
check_result
ok 3 - 4 - carry forward local addition.
expecting success: rm -f .git/index nitfol bozbar rezrov frotz &&
read_tree_u_must_succeed --reset -u $treeH &&
read_tree_u_must_succeed -m -u $treeH &&
echo yomin >yomin &&
git update-index --add yomin &&
echo yomin yomin >yomin &&
read_tree_u_must_succeed -m -u $treeH $treeM &&
git ls-files --stage >5.out &&
test_might_fail git diff -U0 --no-index M.out 5.out >5diff.out &&
compare_change 5diff.out expected &&
check_cache_at yomin dirty &&
sum bozbar frotz nitfol >actual5.sum &&
cmp M.sum actual5.sum &&
: dirty index should have prevented -u from checking it out. &&
echo yomin yomin >yomin1 &&
diff yomin yomin1 &&
rm -f yomin1
ok 35 - helper (store) can store multiple users
expecting success:
check reject $HELPER <<-\EOF &&
protocol=https
host=example.com
username=user1
EOF
check fill $HELPER <<-\EOF
protocol=https
host=example.com
username=user1
--
protocol=https
host=example.com
username=user1
password=askpass-password
--
askpass: Password for 'https://user1@example.com':
EOF
error: Entry 'rezrov' would be overwritten by merge. Cannot merge.
ok 12 - 13 - unmatching local changes being removed.
expecting success: rm -f .git/index &&
read_tree_must_succeed $treeH &&
git checkout-index -u -f -q -a &&
echo nitfol nitfol >nitfol &&
git update-index --add nitfol &&
read_tree_twoway $treeH $treeM &&
git ls-files --stage >14.out &&
test_must_fail git diff --no-index M.out 14.out >14diff.out &&
compare_change 14diff.out expected &&
check_cache_at nitfol clean
ok 50 - 3 - must match A in !O && A && !B case.
expecting success: rm -f .git/index AN &&
cp .orig-A/AN AN &&
git update-index --add AN &&
echo extra >>AN &&
read_tree_must_succeed -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
ok 36 - helper (store) can forget user
expecting success:
check fill $HELPER <<-\EOF
protocol=https
host=example.com
username=user2
--
protocol=https
host=example.com
username=user2
password=pass2
EOF
ok 51 - 3 - matching A alone is OK in !O && A && !B case.
expecting success:
rm -f .git/index AN &&
cp .orig-A/AN AN &&
echo extra >>AN &&
git update-index --add AN &&
read_tree_must_fail -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 7e1bf714fb103c778a21dd67411666901222425a 0 nitfol
ok 37 - helper (store) remembers other user
expecting success:
test_when_finished "rm -f $HOME/xdg/git/credentials" &&
test -s "$HOME/xdg/git/credentials" &&
test_path_is_missing "$HOME/.git-credentials" &&
test_path_is_missing "$HOME/.config/git/credentials"
ok 38 - if custom xdg file exists, home and xdg files not created
expecting success:
echo "https://home-user:home-pass@example.com" >"$HOME/.git-credentials" &&
mkdir -p "$HOME/.config/git" &&
echo "https://xdg-user:xdg-pass@example.com" >"$HOME/.config/git/credentials" &&
check fill store <<-\EOF
protocol=https
host=example.com
--
protocol=https
host=example.com
username=home-user
password=home-pass
--
EOF
nitfol: clean
ok 13 - 14 - unchanged in two heads.
expecting success: rm -f .git/index &&
read_tree_must_succeed $treeH &&
git checkout-index -u -f -q -a &&
echo nitfol nitfol >nitfol &&
git update-index --add nitfol &&
echo nitfol nitfol nitfol >nitfol &&
read_tree_twoway $treeH $treeM &&
git ls-files --stage >15.out &&
test_must_fail git diff --no-index M.out 15.out >15diff.out &&
compare_change 15diff.out expected &&
check_cache_at nitfol dirty
error: Entry 'AN' would be overwritten by merge. Cannot merge.
error: Entry 'AN' would be overwritten by merge. Cannot merge.
ok 52 - 3 (fail) - must match A in !O && A && !B case.
expecting success: rm -f .git/index AA &&
cp .orig-A/AA AA &&
git update-index --add AA &&
read_tree_must_succeed -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226 &&
check_result
ok 39 - get: use home file if both home and xdg files have matches
expecting success:
>"$HOME/.git-credentials" &&
mkdir -p "$HOME/.config/git" &&
echo "https://xdg-user:xdg-pass@example.com" >"$HOME/.config/git/credentials" &&
check fill store <<-\EOF
protocol=https
host=example.com
--
protocol=https
host=example.com
username=xdg-user
password=xdg-pass
--
EOF
ok 40 - get: use xdg file if home file has no matches
yomin: dirty
checking prerequisite: SANITY
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
mkdir SANETESTD.1 SANETESTD.2 &&
chmod +w SANETESTD.1 SANETESTD.2 &&
>SANETESTD.1/x 2>SANETESTD.2/x &&
chmod -w SANETESTD.1 &&
chmod -rx SANETESTD.2 ||
error "bug in test sript: cannot prepare SANETESTD"
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
error "bug in test sript: cannot clean SANETESTD"
return $status
)
ok 4 - 5 - carry forward local addition.
expecting success: rm -f .git/index nitfol bozbar rezrov frotz &&
read_tree_u_must_succeed --reset -u $treeH &&
echo frotz >frotz &&
git update-index --add frotz &&
read_tree_u_must_succeed -m -u $treeH $treeM &&
git ls-files --stage >6.out &&
test_cmp M.out 6.out &&
check_cache_at frotz clean &&
sum bozbar frotz nitfol >actual3.sum &&
cmp M.sum actual3.sum &&
echo frotz >frotz1 &&
diff frotz frotz1 &&
rm -f frotz1
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 7e1bf714fb103c778a21dd67411666901222425a 0 nitfol
rm: cannot remove 'SANETESTD.1/x': Permission denied
prerequisite SANITY ok
expecting success:
echo "https://home-user:home-pass@example.com" >"$HOME/.git-credentials" &&
chmod -r "$HOME/.git-credentials" &&
mkdir -p "$HOME/.config/git" &&
echo "https://xdg-user:xdg-pass@example.com" >"$HOME/.config/git/credentials" &&
check fill store <<-\EOF
protocol=https
host=example.com
--
protocol=https
host=example.com
username=xdg-user
password=xdg-pass
--
EOF
ok 53 - 4 - must match and be up-to-date in !O && A && B && A!=B case.
expecting success:
rm -f .git/index AA &&
cp .orig-A/AA AA &&
git update-index --add AA &&
echo extra >>AA &&
read_tree_must_fail -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
nitfol: dirty
ok 14 - 15 - unchanged in two heads.
expecting success: rm -f .git/index &&
read_tree_must_succeed $treeH &&
git checkout-index -u -f -q -a &&
echo bozbar bozbar >bozbar &&
git update-index --add bozbar &&
if read_tree_twoway $treeH $treeM; then false; else :; fi
ok 41 - get: use xdg file if home file is unreadable
expecting success:
>"$HOME/.git-credentials" &&
mkdir -p "$HOME/.config/git" &&
>"$HOME/.config/git/credentials" &&
check approve store <<-\EOF &&
protocol=https
host=example.com
username=store-user
password=store-pass
EOF
echo "https://store-user:store-pass@example.com" >expected &&
test_cmp expected "$HOME/.git-credentials" &&
test_must_be_empty "$HOME/.config/git/credentials"
error: Entry 'AA' not uptodate. Cannot merge.
error: Entry 'AA' not uptodate. Cannot merge.
ok 54 - 4 (fail) - must match and be up-to-date in !O && A && B && A!=B case.
expecting success:
rm -f .git/index AA &&
cp .orig-A/AA AA &&
echo extra >>AA &&
git update-index --add AA &&
read_tree_must_fail -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
ok 42 - store: if both xdg and home files exist, only store in home file
expecting success:
echo "https://home-user:home-pass@example.com" >"$HOME/.git-credentials" &&
mkdir -p "$HOME/.config/git" &&
echo "https://xdg-user:xdg-pass@example.com" >"$HOME/.config/git/credentials" &&
check reject store <<-\EOF &&
protocol=https
host=example.com
EOF
test_must_be_empty "$HOME/.git-credentials" &&
test_must_be_empty "$HOME/.config/git/credentials"
error: Entry 'bozbar' would be overwritten by merge. Cannot merge.
error: Entry 'AA' would be overwritten by merge. Cannot merge.
ok 15 - 16 - conflicting local change.
expecting success: rm -f .git/index &&
read_tree_must_succeed $treeH &&
git checkout-index -u -f -q -a &&
echo bozbar bozbar >bozbar &&
git update-index --add bozbar &&
echo bozbar bozbar bozbar >bozbar &&
if read_tree_twoway $treeH $treeM; then false; else :; fi
ok 43 - erase: erase matching credentials from both xdg and home files
# passed all 43 test(s)
1..43
error: Entry 'AA' would be overwritten by merge. Cannot merge.
ok 55 - 4 (fail) - must match and be up-to-date in !O && A && B && A!=B case.
expecting success: rm -f .git/index LL &&
cp .orig-A/LL LL &&
git update-index --add LL &&
read_tree_must_succeed -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226 &&
check_result
frotz: clean
*** t1003-read-tree-prefix.sh ***
ok 5 - 6 - local addition already has the same.
expecting success: rm -f .git/index nitfol bozbar rezrov frotz &&
read_tree_u_must_succeed --reset -u $treeH &&
echo frotz >frotz &&
git update-index --add frotz &&
echo frotz frotz >frotz &&
read_tree_u_must_succeed -m -u $treeH $treeM &&
git ls-files --stage >7.out &&
test_cmp M.out 7.out &&
check_cache_at frotz dirty &&
sum bozbar frotz nitfol >actual7.sum &&
if cmp M.sum actual7.sum; then false; else :; fi &&
: dirty index should have prevented -u from checking it out. &&
echo frotz frotz >frotz1 &&
diff frotz frotz1 &&
rm -f frotz1
error: Entry 'bozbar' would be overwritten by merge. Cannot merge.
ok 16 - 17 - conflicting local change.
expecting success: rm -f .git/index &&
read_tree_must_succeed $treeH &&
git checkout-index -u -f -q -a &&
cat bozbar-new >bozbar &&
git update-index --add bozbar &&
read_tree_twoway $treeH $treeM &&
git ls-files --stage >18.out &&
test_cmp M.out 18.out &&
check_cache_at bozbar clean
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1003-read-tree-prefix/.git/
expecting success:
echo hello >one &&
git update-index --add one &&
tree=$(git write-tree) &&
echo tree is $tree
ok 56 - 5 - must match in !O && A && B && A==B case.
expecting success: rm -f .git/index LL &&
cp .orig-A/LL LL &&
git update-index --add LL &&
echo extra >>LL &&
read_tree_must_succeed -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226 &&
check_result
tree is 700196ec4e5b1c75e9f5481e5b545d78533ff917
ok 1 - setup
expecting success:
git read-tree --prefix=two/ $tree &&
git ls-files >actual &&
cmp expect actual
ok 2 - read-tree --prefix
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 dca6b92303befc93086aa025d90a5facd7eb2812 0 nitfol
# passed all 2 test(s)
1..2
bozbar: clean
ok 17 - 18 - local change already having a good result.
expecting success: rm -f .git/index &&
read_tree_must_succeed $treeH &&
git checkout-index -u -f -q -a &&
cat bozbar-new >bozbar &&
git update-index --add bozbar &&
echo gnusto gnusto >bozbar &&
read_tree_twoway $treeH $treeM &&
git ls-files --stage >19.out &&
test_cmp M.out 19.out &&
check_cache_at bozbar dirty
*** t1004-read-tree-m-u-wf.sh ***
ok 57 - 5 - must match in !O && A && B && A==B case.
expecting success:
rm -f .git/index LL &&
cp .orig-A/LL LL &&
echo extra >>LL &&
git update-index --add LL &&
read_tree_must_fail -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
frotz: dirty
error: Entry 'LL' would be overwritten by merge. Cannot merge.
M.sum actual7.sum differ: char 20, line 2
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1004-read-tree-m-u-wf/.git/
ok 6 - 7 - local addition already has the same.
expecting success: rm -f .git/index nitfol bozbar rezrov frotz &&
read_tree_u_must_succeed --reset -u $treeH &&
echo frotz frotz >frotz &&
git update-index --add frotz &&
if read_tree_u_must_succeed -m -u $treeH $treeM; then false; else :; fi
expecting success:
mkdir subdir &&
echo >file1 file one &&
echo >file2 file two &&
echo >subdir/file1 file one in subdirectory &&
echo >subdir/file2 file two in subdirectory &&
git update-index --add file1 file2 subdir/file1 subdir/file2 &&
git commit -m initial &&
git branch side &&
git tag -f branch-point &&
echo file2 is not tracked on the master anymore &&
rm -f file2 subdir/file2 &&
git update-index --remove file2 subdir/file2 &&
git commit -a -m "master removes file2 and subdir/file2"
error: Entry 'LL' would be overwritten by merge. Cannot merge.
ok 58 - 5 (fail) - must match A in !O && A && B && A==B case.
expecting success:
rm -f .git/index DD &&
echo DD >DD &&
git update-index --add DD &&
read_tree_must_fail -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 dca6b92303befc93086aa025d90a5facd7eb2812 0 nitfol
[master (root-commit) 47d3572] initial
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 file1
create mode 100644 file2
create mode 100644 subdir/file1
create mode 100644 subdir/file2
bozbar: dirty
ok 18 - 19 - local change already having a good result, further modified.
expecting success: rm -f .git/index &&
read_tree_must_succeed $treeH &&
git checkout-index -u -f -q -a &&
cat bozbar-old >bozbar &&
git update-index --add bozbar &&
read_tree_twoway $treeH $treeM &&
git ls-files --stage >20.out &&
test_cmp M.out 20.out &&
check_cache_at bozbar dirty
error: Entry 'DD' would be overwritten by merge. Cannot merge.
file2 is not tracked on the master anymore
error: Entry 'DD' would be overwritten by merge. Cannot merge.
ok 59 - 6 - must not exist in O && !A && !B case
expecting success:
rm -f .git/index DM &&
cp .orig-B/DM DM &&
git update-index --add DM &&
read_tree_must_fail -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
[master 78aa062] master removes file2 and subdir/file2
Author: A U Thor <author@example.com>
2 files changed, 2 deletions(-)
error: Entry 'frotz' would be overwritten by merge. Cannot merge.
delete mode 100644 file2
delete mode 100644 subdir/file2
ok 7 - 8 - conflicting addition.
expecting success: rm -f .git/index nitfol bozbar rezrov frotz &&
read_tree_u_must_succeed --reset -u $treeH &&
echo frotz frotz >frotz &&
git update-index --add frotz &&
echo frotz >frotz &&
if read_tree_u_must_succeed -m -u $treeH $treeM; then false; else :; fi
ok 1 - two-way setup
expecting success:
echo >file2 master creates untracked file2 &&
echo >subdir/file2 master creates untracked subdir/file2 &&
if err=$(read_tree_u_must_succeed -m -u master side 2>&1)
then
echo should have complained
false
else
echo "happy to see $err"
fi
error: Entry 'DM' would be overwritten by merge. Cannot merge.
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 dca6b92303befc93086aa025d90a5facd7eb2812 0 nitfol
happy to see error: Untracked working tree file 'file2' would be overwritten by merge.
ok 2 - two-way not clobbering
expecting success:
if err=$(read_tree_u_must_succeed -m --exclude-per-directory=.gitignore master side 2>&1)
then
echo should have complained
false
else
echo "happy to see $err"
fi
error: Entry 'DM' would be overwritten by merge. Cannot merge.
ok 60 - 7 - must not exist in O && !A && B && O!=B case
expecting success:
rm -f .git/index DN &&
cp .orig-B/DN DN &&
git update-index --add DN &&
read_tree_must_fail -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
bozbar: dirty
ok 19 - 20 - no local change, use new tree.
expecting success: rm -f .git/index &&
read_tree_must_succeed $treeH &&
git checkout-index -u -f -q -a &&
cat bozbar-old >bozbar &&
git update-index --add bozbar &&
echo gnusto gnusto >bozbar &&
if read_tree_twoway $treeH $treeM; then false; else :; fi
happy to see fatal: --exclude-per-directory is meaningless unless -u
ok 3 - two-way with incorrect --exclude-per-directory (1)
expecting success:
if err=$(read_tree_u_must_succeed -m -u --exclude-per-directory=foo --exclude-per-directory=.gitignore master side 2>&1)
then
echo should have complained
false
else
echo "happy to see $err"
fi
error: Entry 'DN' would be overwritten by merge. Cannot merge.
happy to see fatal: more than one --exclude-per-directory given.
ok 4 - two-way with incorrect --exclude-per-directory (2)
expecting success:
read_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore master side
error: Entry 'DN' would be overwritten by merge. Cannot merge.
ok 61 - 8 - must not exist in O && !A && B && O==B case
expecting success: rm -f .git/index MD &&
cp .orig-A/MD MD &&
git update-index --add MD &&
read_tree_must_succeed -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226 &&
check_result
error: Entry 'frotz' would be overwritten by merge. Cannot merge.
ok 8 - 9 - conflicting addition.
expecting success: rm -f .git/index nitfol bozbar rezrov frotz &&
read_tree_u_must_succeed --reset -u $treeH &&
echo rezrov >rezrov &&
git update-index --add rezrov &&
read_tree_u_must_succeed -m -u $treeH $treeM &&
git ls-files --stage >10.out &&
cmp M.out 10.out &&
sum bozbar frotz nitfol >actual10.sum &&
cmp M.sum actual10.sum
error: Entry 'bozbar' not uptodate. Cannot merge.
ok 20 - 21 - no local change, dirty cache.
expecting success: rm -f .git/index &&
read_tree_must_succeed $treeH &&
git checkout-index -u -f -q -a &&
sed -e "s/such as/SUCH AS/" bozbar-old >bozbar &&
git update-index --add bozbar &&
if read_tree_twoway $treeH $treeM; then false; else :; fi
ok 5 - two-way clobbering a ignored file
expecting success:
rm -f file2 subdir/file2 &&
git checkout side &&
echo >file3 file three &&
echo >subdir/file3 file three &&
git update-index --add file3 subdir/file3 &&
git commit -a -m "side adds file3 and removes file2" &&
git checkout master &&
echo >file2 file two is untracked on the master side &&
echo >subdir/file2 file two is untracked on the master side &&
read_tree_u_must_succeed -m -u branch-point master side
ok 62 - 9 - must match and be up-to-date in O && A && !B && O!=A case
expecting success:
rm -f .git/index MD &&
cp .orig-A/MD MD &&
git update-index --add MD &&
echo extra >>MD &&
read_tree_must_fail -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
Switched to branch 'side'
D file2
D subdir/file2
error: Entry 'bozbar' would be overwritten by merge. Cannot merge.
ok 21 - 22 - local change cache updated.
expecting success: rm -f .git/index &&
echo DF >DF &&
git update-index --add DF &&
treeDF=$(git write-tree) &&
echo treeDF $treeDF &&
git ls-tree $treeDF &&
rm -f DF &&
mkdir DF &&
echo DF/DF >DF/DF &&
git update-index --add --remove DF DF/DF &&
treeDFDF=$(git write-tree) &&
echo treeDFDF $treeDFDF &&
git ls-tree $treeDFDF &&
git ls-files --stage >DFDF.out
[side 8691cab] side adds file3 and removes file2
Author: A U Thor <author@example.com>
4 files changed, 2 insertions(+), 2 deletions(-)
delete mode 100644 file2
create mode 100644 file3
delete mode 100644 subdir/file2
create mode 100644 subdir/file3
error: Entry 'MD' not uptodate. Cannot merge.
Switched to branch 'master'
treeDF 6bf22db9043f2b5821c019d0ce0f2605421affcb
error: Entry 'MD' not uptodate. Cannot merge.
ok 63 - 9 (fail) - must match and be up-to-date in O && A && !B && O!=A case
expecting success:
rm -f .git/index MD &&
cp .orig-A/MD MD &&
echo extra >>MD &&
git update-index --add MD &&
read_tree_must_fail -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
100644 blob 052efc3abbc31348f7abd34535b1953d38273257 DF
ok 9 - 10 - path removed.
expecting success: rm -f .git/index nitfol bozbar rezrov frotz &&
read_tree_u_must_succeed --reset -u $treeH &&
echo rezrov >rezrov &&
git update-index --add rezrov &&
echo rezrov rezrov >rezrov &&
if read_tree_u_must_succeed -m -u $treeH $treeM; then false; else :; fi
treeDFDF c38e296263d024b0f48c4a728d293232ac6c5443
error: Entry 'MD' would be overwritten by merge. Cannot merge.
040000 tree 90bbead36f4d6a7c325fd450e6cfbcc7479d421a DF
ok 6 - three-way not complaining on an untracked path in both
expecting success:
git reset --hard &&
rm -f file2 subdir/file2 file3 subdir/file3 &&
git checkout master &&
echo >file3 file three created in master, untracked &&
echo >subdir/file3 file three created in master, untracked &&
if err=$(read_tree_u_must_succeed -m -u branch-point master side 2>&1)
then
echo should have complained
false
else
echo "happy to see $err"
fi
ok 22 - DF vs DF/DF case setup.
expecting success: rm -f .git/index &&
rm -fr DF &&
echo DF >DF &&
git update-index --add DF &&
read_tree_twoway $treeDF $treeDFDF &&
git ls-files --stage >DFDFcheck.out &&
test_cmp DFDF.out DFDFcheck.out &&
check_cache_at DF/DF dirty &&
:
error: Entry 'MD' would be overwritten by merge. Cannot merge.
ok 64 - 9 (fail) - must match and be up-to-date in O && A && !B && O!=A case
expecting success: rm -f .git/index ND &&
cp .orig-A/ND ND &&
git update-index --add ND &&
read_tree_must_succeed -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226 &&
check_result
HEAD is now at 78aa062 master removes file2 and subdir/file2
100644 b90ea14b2dd74b6f377c10870b3757344bbe077c 0 DF/DF
Already on 'master'
DF/DF: dirty
ok 23 - DF vs DF/DF case test.
expecting success: rm -f .git/index &&
: >a &&
git update-index --add a &&
treeM=$(git write-tree) &&
echo treeM $treeM &&
git ls-tree $treeM &&
git ls-files --stage >treeM.out &&
rm -f a &&
git update-index --remove a &&
mkdir a &&
: >a/b &&
treeH=$(git write-tree) &&
echo treeH $treeH &&
git ls-tree $treeH
error: Entry 'rezrov' not uptodate. Cannot merge.
ok 10 - 11 - dirty path removed.
expecting success: rm -f .git/index nitfol bozbar rezrov frotz &&
read_tree_u_must_succeed --reset -u $treeH &&
echo rezrov rezrov >rezrov &&
git update-index --add rezrov &&
if read_tree_u_must_succeed -m -u $treeH $treeM; then false; else :; fi
happy to see error: Untracked working tree file 'file3' would be overwritten by merge.
ok 7 - three-way not clobbering a working tree file
expecting success:
git reset --hard &&
rm -f file2 subdir/file2 file3 subdir/file3 &&
git checkout master &&
echo >file3 file three created in master, untracked &&
echo >subdir/file3 file three created in master, untracked &&
read_tree_u_must_succeed -m -u --exclude-per-directory=.gitignore branch-point master side
treeM 496d6428b9cf92981dc9495211e6e1120fb6f2ba
HEAD is now at 78aa062 master removes file2 and subdir/file2
100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 a
ok 65 - 10 - must match and be up-to-date in O && A && !B && O==A case
expecting success:
rm -f .git/index ND &&
cp .orig-A/ND ND &&
git update-index --add ND &&
echo extra >>ND &&
read_tree_must_fail -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
Already on 'master'
treeH 4b825dc642cb6eb9a060e54bf8d69288fbee4904
error: Entry 'ND' not uptodate. Cannot merge.
ok 24 - a/b (untracked) vs a case setup.
expecting success: read_tree_u_must_fail -u -m "$treeH" "$treeM" &&
git ls-files --stage &&
test -f a/b
error: Entry 'ND' not uptodate. Cannot merge.
ok 66 - 10 (fail) - must match and be up-to-date in O && A && !B && O==A case
expecting success:
rm -f .git/index ND &&
cp .orig-A/ND ND &&
echo extra >>ND &&
git update-index --add ND &&
read_tree_must_fail -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
error: Updating 'a' would lose untracked files in it
error: Entry 'rezrov' would be overwritten by merge. Cannot merge.
ok 11 - 12 - unmatching local changes being removed.
expecting success: rm -f .git/index nitfol bozbar rezrov frotz &&
read_tree_u_must_succeed --reset -u $treeH &&
echo rezrov rezrov >rezrov &&
git update-index --add rezrov &&
echo rezrov >rezrov &&
if read_tree_u_must_succeed -m -u $treeH $treeM; then false; else :; fi
ok 8 - three-way not complaining on an untracked file
expecting success:
git reset --hard &&
git checkout -b side-a branch-point &&
echo >>file1 "new line to be kept in the merge result" &&
git commit -a -m "side-a changes file1" &&
git checkout -b side-b branch-point &&
echo >>file2 "new line to be kept in the merge result" &&
git commit -a -m "side-b changes file2" &&
git checkout side-a
error: Entry 'ND' would be overwritten by merge. Cannot merge.
HEAD is now at 78aa062 master removes file2 and subdir/file2
error: Updating 'a' would lose untracked files in it
ok 25 - a/b (untracked) vs a, plus c/d case test.
expecting success: rm -f .git/index &&
rm -fr a &&
: >a &&
mkdir c &&
: >c/d &&
git update-index --add a c/d &&
treeM=$(git write-tree) &&
echo treeM $treeM &&
git ls-tree $treeM &&
git ls-files --stage >treeM.out &&
rm -f a &&
mkdir a &&
: >a/b &&
git update-index --add --remove a a/b &&
treeH=$(git write-tree) &&
echo treeH $treeH &&
git ls-tree $treeH
Switched to a new branch 'side-a'
error: Entry 'ND' would be overwritten by merge. Cannot merge.
ok 67 - 10 (fail) - must match and be up-to-date in O && A && !B && O==A case
expecting success: rm -f .git/index MM &&
cp .orig-A/MM MM &&
git update-index --add MM &&
read_tree_must_succeed -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226 &&
check_result
[side-a de60b5c] side-a changes file1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
treeM 3e82e8b9894d6c7982dcd25a6dad66400d52735f
Switched to a new branch 'side-b'
100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 a
040000 tree 2a26db49a6962700da5bd4084ae0e5a22d6583ee c
[side-b 2e3a5a1] side-b changes file2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
error: Entry 'rezrov' would be overwritten by merge. Cannot merge.
ok 12 - 13 - unmatching local changes being removed.
expecting success: rm -f .git/index nitfol bozbar rezrov frotz &&
read_tree_u_must_succeed --reset -u $treeH &&
echo nitfol nitfol >nitfol &&
git update-index --add nitfol &&
read_tree_u_must_succeed -m -u $treeH $treeM &&
git ls-files --stage >14.out &&
test_must_fail git diff -U0 --no-index M.out 14.out >14diff.out &&
compare_change 14diff.out expected &&
sum bozbar frotz >actual14.sum &&
grep -v nitfol M.sum > expected14.sum &&
cmp expected14.sum actual14.sum &&
sum bozbar frotz nitfol >actual14a.sum &&
if cmp M.sum actual14a.sum; then false; else :; fi &&
check_cache_at nitfol clean &&
echo nitfol nitfol >nitfol1 &&
diff nitfol nitfol1 &&
rm -f nitfol1
Switched to branch 'side-a'
ok 68 - 11 - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case
expecting success:
rm -f .git/index MM &&
cp .orig-A/MM MM &&
git update-index --add MM &&
echo extra >>MM &&
read_tree_must_fail -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
ok 9 - 3-way not overwriting local changes (setup)
expecting success:
# At this point, file1 from side-a should be kept as side-b
# did not touch it.
git reset --hard &&
echo >>file1 "local changes" &&
read_tree_u_must_succeed -m -u branch-point side-a side-b &&
grep "new line to be kept" file1 &&
grep "local changes" file1
treeH 02c6f058fb950781e5b773c21e4c237db1ff4d5a
040000 tree 4277b6e69d25e5efa77c455340557b384a4c018a a
040000 tree 2a26db49a6962700da5bd4084ae0e5a22d6583ee c
ok 26 - a/b vs a, plus c/d case setup.
expecting success: read_tree_u_must_succeed -u -m "$treeH" "$treeM" &&
git ls-files --stage | tee >treeMcheck.out &&
test_cmp treeM.out treeMcheck.out
HEAD is now at de60b5c side-a changes file1
error: Entry 'MM' not uptodate. Cannot merge.
error: Entry 'MM' not uptodate. Cannot merge.
ok 69 - 11 (fail) - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case
expecting success:
rm -f .git/index MM &&
cp .orig-A/MM MM &&
echo extra >>MM &&
git update-index --add MM &&
read_tree_must_fail -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
ok 27 - a/b vs a, plus c/d case test.
expecting success:
echo >file-a &&
echo >file-b &&
git add file-a file-b &&
git commit -a -m "test for correct modified tree" &&
git branch initial-mod &&
echo b >file-b &&
git commit -a -m "B" &&
echo a >file-a &&
git add file-a &&
git ls-tree $(git write-tree) file-a >expect &&
read_tree_must_succeed -m HEAD initial-mod &&
git ls-tree $(git write-tree) file-a >actual &&
test_cmp expect actual
new line to be kept in the merge result
local changes
ok 10 - 3-way not overwriting local changes (our side)
expecting success:
# At this point, file2 from side-b should be taken as side-a
# did not touch it.
git reset --hard &&
echo >>file2 "local changes" &&
read_tree_u_must_fail -m -u branch-point side-a side-b &&
! grep "new line to be kept" file2 &&
grep "local changes" file2
error: Entry 'MM' would be overwritten by merge. Cannot merge.
HEAD is now at de60b5c side-a changes file1
[master (root-commit) 40e9558] test for correct modified tree
Author: A U Thor <author@example.com>
4 files changed, 2 insertions(+)
create mode 100644 a
create mode 100644 c/d
create mode 100644 file-a
create mode 100644 file-b
error: Entry 'MM' would be overwritten by merge. Cannot merge.
ok 70 - 11 (fail) - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case
expecting success: rm -f .git/index SS &&
cp .orig-A/SS SS &&
git update-index --add SS &&
read_tree_must_succeed -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226 &&
check_result
error: Entry 'file2' not uptodate. Cannot merge.
[master c92a248] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
M.sum actual14a.sum differ: char 38, line 3
error: Entry 'file2' not uptodate. Cannot merge.
local changes
ok 11 - 3-way not overwriting local changes (their side)
expecting success:
git reset --hard &&
git checkout -b sym-b side-b &&
mkdir -p a &&
>a/b &&
git add a/b &&
git commit -m "side adds a/b" &&
rm -fr a &&
git checkout -b sym-a side-a &&
mkdir -p a &&
test_ln_s_add ../b a/b &&
git commit -m "we add a/b" &&
read_tree_u_must_succeed -m -u sym-a sym-a sym-b
nitfol: clean
ok 71 - 12 - must match A in O && A && B && O!=A && A==B case
expecting success: rm -f .git/index SS &&
cp .orig-A/SS SS &&
git update-index --add SS &&
echo extra >>SS &&
read_tree_must_succeed -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226 &&
check_result
ok 13 - 14 - unchanged in two heads.
expecting success: rm -f .git/index nitfol bozbar rezrov frotz &&
read_tree_u_must_succeed --reset -u $treeH &&
echo nitfol nitfol >nitfol &&
git update-index --add nitfol &&
echo nitfol nitfol nitfol >nitfol &&
read_tree_u_must_succeed -m -u $treeH $treeM &&
git ls-files --stage >15.out &&
test_must_fail git diff -U0 --no-index M.out 15.out >15diff.out &&
compare_change 15diff.out expected &&
check_cache_at nitfol dirty &&
sum bozbar frotz >actual15.sum &&
grep -v nitfol M.sum > expected15.sum &&
cmp expected15.sum actual15.sum &&
sum bozbar frotz nitfol >actual15a.sum &&
if cmp M.sum actual15a.sum; then false; else :; fi &&
echo nitfol nitfol nitfol >nitfol1 &&
diff nitfol nitfol1 &&
rm -f nitfol1
HEAD is now at de60b5c side-a changes file1
Switched to a new branch 'sym-b'
ok 28 - -m references the correct modified tree
# passed all 28 test(s)
1..28
[sym-b 1a396f3] side adds a/b
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a/b
ok 72 - 12 - must match A in O && A && B && O!=A && A==B case
expecting success:
rm -f .git/index SS &&
cp .orig-A/SS SS &&
echo extra >>SS &&
git update-index --add SS &&
read_tree_must_fail -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
Switched to a new branch 'sym-a'
checking prerequisite: SYMLINKS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# test whether the filesystem supports symbolic links
ln -s x y && test -h y
)
prerequisite SYMLINKS ok
*** t1005-read-tree-reset.sh ***
error: Entry 'SS' would be overwritten by merge. Cannot merge.
error: Entry 'SS' would be overwritten by merge. Cannot merge.
ok 73 - 12 (fail) - must match A in O && A && B && O!=A && A==B case
expecting success: rm -f .git/index MN &&
cp .orig-A/MN MN &&
git update-index --add MN &&
read_tree_must_succeed -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226 &&
check_result
[sym-a 4954699] we add a/b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 120000 a/b
nitfol: dirty
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1005-read-tree-reset/.git/
expecting success:
git init &&
mkdir df &&
echo content >df/file &&
git add df/file &&
git commit -m one &&
git ls-files >expect &&
rm -rf df &&
echo content >df &&
git add df &&
echo content >new &&
git add new &&
git commit -m two
M.sum actual15a.sum differ: char 38, line 3
ok 14 - 15 - unchanged in two heads.
expecting success: rm -f .git/index nitfol bozbar rezrov frotz &&
read_tree_u_must_succeed --reset -u $treeH &&
echo bozbar bozbar >bozbar &&
git update-index --add bozbar &&
if read_tree_u_must_succeed -m -u $treeH $treeM; then false; else :; fi
Reinitialized existing Git repository in /«PKGBUILDDIR»/t/trash directory.t1005-read-tree-reset/.git/
ok 12 - funny symlink in work tree
checking prerequisite: SANITY
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
mkdir SANETESTD.1 SANETESTD.2 &&
chmod +w SANETESTD.1 SANETESTD.2 &&
>SANETESTD.1/x 2>SANETESTD.2/x &&
chmod -w SANETESTD.1 &&
chmod -rx SANETESTD.2 ||
error "bug in test sript: cannot prepare SANETESTD"
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
error "bug in test sript: cannot clean SANETESTD"
return $status
)
ok 74 - 13 - must match A in O && A && B && O!=A && O==B case
expecting success: rm -f .git/index MN &&
cp .orig-A/MN MN &&
git update-index --add MN &&
echo extra >>MN &&
read_tree_must_succeed -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226 &&
check_result
rm: cannot remove 'SANETESTD.1/x': Permission denied
[master (root-commit) 9df691f] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 df/file
prerequisite SANITY ok
expecting success:
rm -fr a b &&
git reset --hard &&
git checkout sym-a &&
chmod a-w a &&
test_must_fail git read-tree -m -u sym-a sym-a sym-b
HEAD is now at 4954699 we add a/b
Already on 'sym-a'
ok 75 - 13 - must match A in O && A && B && O!=A && O==B case
expecting success: rm -f .git/index NM &&
cp .orig-A/NM NM &&
git update-index --add NM &&
read_tree_must_succeed -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226 &&
check_result
[master 0ef69a2] two
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
rename df/file => df (100%)
create mode 100644 new
ok 1 - setup
expecting success:
read_tree_u_must_succeed -u --reset HEAD^ &&
git ls-files >actual &&
test_cmp expect actual
error: Entry 'bozbar' would be overwritten by merge. Cannot merge.
error: unable to unlink old 'a/b' (Permission denied)
ok 15 - 16 - conflicting local change.
expecting success: rm -f .git/index nitfol bozbar rezrov frotz &&
read_tree_u_must_succeed --reset -u $treeH &&
echo bozbar bozbar >bozbar &&
git update-index --add bozbar &&
echo bozbar bozbar bozbar >bozbar &&
if read_tree_u_must_succeed -m -u $treeH $treeM; then false; else :; fi
ok 13 - funny symlink in work tree, un-unlink-able
expecting success:
git reset --hard &&
git checkout side-a &&
rm -f subdir/file2 &&
mkdir subdir/file2 &&
echo qfwfq >subdir/file2/another &&
git add subdir/file2/another &&
test_tick &&
git commit -m "side-a changes file2 to directory"
HEAD is now at 4954699 we add a/b
Switched to branch 'side-a'
ok 76 - 14 - must match and be up-to-date in O && A && B && O==A && O!=B case
expecting success: rm -f .git/index NM &&
cp .orig-B/NM NM &&
git update-index --add NM &&
echo extra >>NM &&
read_tree_must_succeed -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226 &&
check_result
ok 2 - reset should work
expecting success:
read_tree_u_must_succeed --reset -u HEAD &&
git ls-files -s >expect &&
sha1=$(git rev-parse :new) &&
(
echo "100644 $sha1 1 old"
echo "100644 $sha1 3 old"
) | git update-index --index-info &&
>old &&
git ls-files -s &&
read_tree_u_must_succeed --reset -u HEAD &&
git ls-files -s >actual &&
! test -f old
[side-a 193c97e] side-a changes file2 to directory
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 1 deletion(-)
delete mode 100644 subdir/file2
create mode 100644 subdir/file2/another
ok 14 - D/F setup
expecting success:
git checkout side-b &&
read_tree_u_must_succeed -m -u branch-point side-b side-a &&
git ls-files -u >actual &&
(
a=$(git rev-parse branch-point:subdir/file2)
b=$(git rev-parse side-a:subdir/file2/another)
echo "100644 $a 1 subdir/file2"
echo "100644 $a 2 subdir/file2"
echo "100644 $b 3 subdir/file2/another"
) >expect &&
test_cmp actual expect
Switched to branch 'side-b'
error: Entry 'bozbar' would be overwritten by merge. Cannot merge.
ok 16 - 17 - conflicting local change.
expecting success: rm -f .git/index nitfol bozbar rezrov frotz &&
read_tree_u_must_succeed --reset -u $treeH &&
echo gnusto >bozbar &&
git update-index --add bozbar &&
read_tree_u_must_succeed -m -u $treeH $treeM &&
git ls-files --stage >18.out &&
test_cmp M.out 18.out &&
check_cache_at bozbar clean &&
sum bozbar frotz nitfol >actual18.sum &&
cmp M.sum actual18.sum
ok 77 - 14 - may match B in O && A && B && O==A && O!=B case
expecting success:
rm -f .git/index NM &&
cp .orig-A/NM NM &&
git update-index --add NM &&
echo extra >>NM &&
read_tree_must_fail -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 df
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 new
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 1 old
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 3 old
error: Entry 'NM' not uptodate. Cannot merge.
error: Entry 'NM' not uptodate. Cannot merge.
ok 15 - D/F
expecting success:
git reset --hard &&
git checkout side-b &&
git merge-resolve branch-point -- side-b side-a
ok 78 - 14 (fail) - must match and be up-to-date in O && A && B && O==A && O!=B case
expecting success:
rm -f .git/index NM &&
cp .orig-A/NM NM &&
echo extra >>NM &&
git update-index --add NM &&
read_tree_must_fail -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
error: 'subdir/file2/another' appears as both a file and as a directory
error: subdir/file2/another: cannot drop to stage #0
HEAD is now at 2e3a5a1 side-b changes file2
Already on 'side-b'
error: Entry 'NM' would be overwritten by merge. Cannot merge.
bozbar: clean
ok 3 - reset should remove remnants from a failed merge
ok 17 - 18 - local change already having a good result.
expecting success:
read_tree_u_must_succeed --reset -u HEAD &&
git ls-files -s >expect &&
sha1=$(git rev-parse :new) &&
(
echo "100644 $sha1 1 old"
echo "100644 $sha1 3 old"
) | git update-index --index-info &&
>old &&
git ls-files -s &&
read_tree_u_must_succeed --reset -u HEAD HEAD &&
git ls-files -s >actual &&
! test -f old
expecting success: rm -f .git/index nitfol bozbar rezrov frotz &&
read_tree_u_must_succeed --reset -u $treeH &&
echo gnusto >bozbar &&
git update-index --add bozbar &&
echo gnusto gnusto >bozbar &&
read_tree_u_must_succeed -m -u $treeH $treeM &&
git ls-files --stage >19.out &&
test_cmp M.out 19.out &&
check_cache_at bozbar dirty &&
sum frotz nitfol >actual19.sum &&
grep -v bozbar M.sum > expected19.sum &&
cmp expected19.sum actual19.sum &&
sum bozbar frotz nitfol >actual19a.sum &&
if cmp M.sum actual19a.sum; then false; else :; fi &&
echo gnusto gnusto >bozbar1 &&
diff bozbar bozbar1 &&
rm -f bozbar1
Trying simple merge.
error: Entry 'NM' would be overwritten by merge. Cannot merge.
ok 79 - 14 (fail) - must match and be up-to-date in O && A && B && O==A && O!=B case
expecting success: rm -f .git/index NN &&
cp .orig-A/NN NN &&
git update-index --add NN &&
read_tree_must_succeed -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226 &&
check_result
Simple merge failed, trying Automatic merge.
Adding subdir/file2/another
ok 16 - D/F resolve
expecting success:
git reset --hard &&
git checkout side-b &&
git merge-recursive branch-point -- side-b side-a
HEAD is now at 2e3a5a1 side-b changes file2
ok 80 - 15 - must match A in O && A && B && O==A && O==B case
expecting success: rm -f .git/index NN &&
cp .orig-A/NN NN &&
git update-index --add NN &&
echo extra >>NN &&
read_tree_must_succeed -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226 &&
check_result
Already on 'side-b'
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 df
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 new
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 1 old
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 3 old
Merging side-b with side-a
Merging:
2e3a5a1 side-b changes file2
193c97e side-a changes file2 to directory
found 1 common ancestor:
47d3572 initial
Adding subdir/file2/another
Removing subdir/file2 to make room for subdirectory
Removing subdir/file2
ok 17 - D/F recursive
# passed all 17 test(s)
1..17
ok 81 - 15 - must match A in O && A && B && O==A && O==B case
expecting success:
rm -f .git/index NN &&
cp .orig-A/NN NN &&
echo extra >>NN &&
git update-index --add NN &&
read_tree_must_fail -m 3fe085e0589de4327971d50e416fc292dd00fbfe 997bbc4a0a51e0574168a4f637739380edebe4d7 76d47d681d7f1d4fa975334a9a0ba8a6eeea2226
bozbar: dirty
*** t1006-cat-file.sh ***
M.sum actual19a.sum differ: char 1, line 1
ok 18 - 19 - local change already having a good result, further modified.
expecting success: rm -f .git/index nitfol bozbar rezrov frotz &&
read_tree_u_must_succeed --reset -u $treeH &&
echo bozbar >bozbar &&
git update-index --add bozbar &&
read_tree_u_must_succeed -m -u $treeH $treeM &&
git ls-files --stage >20.out &&
test_cmp M.out 20.out &&
check_cache_at bozbar clean &&
sum bozbar frotz nitfol >actual20.sum &&
cmp M.sum actual20.sum
ok 4 - two-way reset should remove remnants too
expecting success:
read_tree_u_must_succeed --reset -u HEAD &&
git ls-files -s >expect &&
sha1=$(git rev-parse :new) &&
(
echo "100644 $sha1 1 old"
echo "100644 $sha1 3 old"
) | git update-index --index-info &&
>old &&
git ls-files -s &&
git reset --hard &&
git ls-files -s >actual &&
! test -f old
error: Entry 'NN' would be overwritten by merge. Cannot merge.
error: Entry 'NN' would be overwritten by merge. Cannot merge.
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1006-cat-file/.git/
ok 82 - 15 (fail) - must match A in O && A && B && O==A && O==B case
expecting success: rm -f .git/index F16 &&
echo F16 >F16 &&
git update-index --add F16 &&
tree0=$(git write-tree) &&
echo E16 >F16 &&
git update-index F16 &&
tree1=$(git write-tree) &&
read_tree_must_succeed -m $tree0 $tree1 $tree1 $tree0 &&
git ls-files --stage
expecting success:
echo_without_newline "$hello_content" > hello &&
git update-index --add hello
ok 1 - setup
expecting success:
git cat-file -e $sha1
ok 2 - blob exists
expecting success:
echo $type >expect &&
git cat-file -t $sha1 >actual &&
test_cmp expect actual
ok 3 - Type of blob is correct
expecting success:
echo $size >expect &&
git cat-file -s $sha1 >actual &&
test_cmp expect actual
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 df
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 new
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 1 old
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 3 old
ok 4 - Size of blob is correct
expecting success:
echo $type >expect &&
git cat-file -t --allow-unknown-type $sha1 >actual &&
test_cmp expect actual
HEAD is now at 0ef69a2 two
ok 5 - Porcelain reset should remove remnants too
expecting success:
read_tree_u_must_succeed --reset -u HEAD &&
git ls-files -s >expect &&
sha1=$(git rev-parse :new) &&
(
echo "100644 $sha1 1 old"
echo "100644 $sha1 3 old"
) | git update-index --index-info &&
>old &&
git ls-files -s &&
git checkout -f &&
git ls-files -s >actual &&
! test -f old
ok 5 - Type of blob is correct using --allow-unknown-type
expecting success:
echo $size >expect &&
git cat-file -s --allow-unknown-type $sha1 >actual &&
test_cmp expect actual
ok 6 - Size of blob is correct using --allow-unknown-type
expecting success:
maybe_remove_timestamp "$content" $no_ts >expect &&
maybe_remove_timestamp "$(git cat-file $type $sha1)" $no_ts >actual &&
test_cmp expect actual
100644 ecbec6db011caa3ae26739812f092f76875fe6b6 2 F16
100644 bcf4afda2c30299bf6538240d40bcb8fb3857691 3 F16
ok 83 - 16 - A matches in one and B matches in another.
# passed all 83 test(s)
1..83
ok 7 - Content of blob is correct
expecting success:
maybe_remove_timestamp "$pretty_content" $no_ts >expect &&
maybe_remove_timestamp "$(git cat-file -p $sha1)" $no_ts >actual &&
test_cmp expect actual
bozbar: clean
ok 19 - 20 - no local change, use new tree.
expecting success: rm -f .git/index nitfol bozbar rezrov frotz &&
read_tree_u_must_succeed --reset -u $treeH &&
echo bozbar >bozbar &&
git update-index --add bozbar &&
echo gnusto gnusto >bozbar &&
if read_tree_u_must_succeed -m -u $treeH $treeM; then false; else :; fi
ok 8 - Pretty content of blob is correct
expecting success:
maybe_remove_timestamp "$batch_output" $no_ts >expect &&
maybe_remove_timestamp "$(echo $sha1 | git cat-file --batch)" $no_ts >actual &&
test_cmp expect actual
ok 9 - --batch output of blob is correct
expecting success:
echo "$sha1 $type $size" >expect &&
echo_without_newline $sha1 | git cat-file --batch-check >actual &&
test_cmp expect actual
ok 10 - --batch-check output of blob is correct
expecting success:
echo "$type $sha1" >expect &&
echo $sha1 | git cat-file --batch-check="%(objecttype) %(objectname)" >actual &&
test_cmp expect actual
ok 11 - custom --batch-check format
expecting success:
echo "$type this is some extra content" >expect &&
echo "$sha1 this is some extra content" |
git cat-file --batch-check="%(objecttype) %(rest)" >actual &&
test_cmp expect actual
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 df
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 new
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 1 old
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 3 old
*** t1007-hash-object.sh ***
ok 12 - --batch-check with %(rest)
expecting success:
{
echo "$size" &&
maybe_remove_timestamp "$content" $no_ts
} >expect &&
echo $sha1 | git cat-file --batch="%(objectsize)" >actual.full &&
maybe_remove_timestamp "$(cat actual.full)" $no_ts >actual &&
test_cmp expect actual
ok 6 - Porcelain checkout -f should remove remnants too
expecting success:
read_tree_u_must_succeed --reset -u HEAD &&
git ls-files -s >expect &&
sha1=$(git rev-parse :new) &&
(
echo "100644 $sha1 1 old"
echo "100644 $sha1 3 old"
) | git update-index --index-info &&
>old &&
git ls-files -s &&
git checkout -f HEAD &&
git ls-files -s >actual &&
! test -f old
ok 13 - --batch without type (blob)
expecting success:
{
echo "$type" &&
maybe_remove_timestamp "$content" $no_ts
} >expect &&
echo $sha1 | git cat-file --batch="%(objecttype)" >actual.full &&
maybe_remove_timestamp "$(cat actual.full)" $no_ts >actual &&
test_cmp expect actual
error: Entry 'bozbar' not uptodate. Cannot merge.
ok 20 - 21 - no local change, dirty cache.
expecting success: rm -f .git/index &&
echo DF >DF &&
git update-index --add DF &&
treeDF=$(git write-tree) &&
echo treeDF $treeDF &&
git ls-tree $treeDF &&
rm -f DF &&
mkdir DF &&
echo DF/DF >DF/DF &&
git update-index --add --remove DF DF/DF &&
treeDFDF=$(git write-tree) &&
echo treeDFDF $treeDFDF &&
git ls-tree $treeDFDF &&
git ls-files --stage >DFDF.out
ok 14 - --batch without size (blob)
expecting success:
echo "$hello_sha1 blob $hello_size" >expect &&
git update-index --add --cacheinfo 100644 $hello_sha1 "white space" &&
test_when_finished "git update-index --remove \"white space\"" &&
echo ":white space" | git cat-file --batch-check >actual &&
test_cmp expect actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1007-hash-object/.git/
treeDF 6bf22db9043f2b5821c019d0ce0f2605421affcb
expecting success:
echo example | test_must_fail git hash-object --stdin --stdin
100644 blob 052efc3abbc31348f7abd34535b1953d38273257 DF
error: Multiple --stdin arguments are not supported
usage: git hash-object [-t <type>] [-w] [--path=<file> | --no-filters] [--stdin] [--] <file>...
or: git hash-object --stdin-paths
-t <type> object type
-w write the object into the object database
--stdin read the object from stdin
--stdin-paths read file names from stdin
--no-filters store file as is without filters
--literally just hash any random garbage to create corrupt objects for debugging Git
--path <file> process file as it were from this path
ok 1 - multiple '--stdin's are rejected
expecting success:
echo example | test_must_fail git hash-object --stdin --stdin-paths &&
echo example | test_must_fail git hash-object --stdin-paths --stdin
ok 15 - --batch-check without %(rest) considers whole line
expecting success:
git cat-file -e $sha1
error: Can't use --stdin-paths with --stdin
usage: git hash-object [-t <type>] [-w] [--path=<file> | --no-filters] [--stdin] [--] <file>...
or: git hash-object --stdin-paths
-t <type> object type
-w write the object into the object database
--stdin read the object from stdin
--stdin-paths read file names from stdin
--no-filters store file as is without filters
--literally just hash any random garbage to create corrupt objects for debugging Git
--path <file> process file as it were from this path
treeDFDF c38e296263d024b0f48c4a728d293232ac6c5443
ok 16 - tree exists
error: Can't use --stdin-paths with --stdin
usage: git hash-object [-t <type>] [-w] [--path=<file> | --no-filters] [--stdin] [--] <file>...
or: git hash-object --stdin-paths
-t <type> object type
-w write the object into the object database
--stdin read the object from stdin
--stdin-paths read file names from stdin
--no-filters store file as is without filters
--literally just hash any random garbage to create corrupt objects for debugging Git
--path <file> process file as it were from this path
expecting success:
echo $type >expect &&
git cat-file -t $sha1 >actual &&
test_cmp expect actual
ok 2 - Can't use --stdin and --stdin-paths together
expecting success:
echo example | test_must_fail git hash-object --stdin-paths hello
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 df
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 new
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 1 old
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 3 old
040000 tree 90bbead36f4d6a7c325fd450e6cfbcc7479d421a DF
error: Can't specify files with --stdin-paths
usage: git hash-object [-t <type>] [-w] [--path=<file> | --no-filters] [--stdin] [--] <file>...
or: git hash-object --stdin-paths
-t <type> object type
-w write the object into the object database
--stdin read the object from stdin
--stdin-paths read file names from stdin
--no-filters store file as is without filters
--literally just hash any random garbage to create corrupt objects for debugging Git
--path <file> process file as it were from this path
ok 17 - Type of tree is correct
expecting success:
echo $size >expect &&
git cat-file -s $sha1 >actual &&
test_cmp expect actual
ok 3 - Can't pass filenames as arguments with --stdin-paths
expecting success:
echo example | test_must_fail git hash-object --stdin-paths --path=foo
error: Can't use --stdin-paths with --path
usage: git hash-object [-t <type>] [-w] [--path=<file> | --no-filters] [--stdin] [--] <file>...
or: git hash-object --stdin-paths
ok 21 - DF vs DF/DF case setup.
-t <type> object type
-w write the object into the object database
--stdin read the object from stdin
--stdin-paths read file names from stdin
--no-filters store file as is without filters
--literally just hash any random garbage to create corrupt objects for debugging Git
--path <file> process file as it were from this path
expecting success: rm -f .git/index &&
rm -fr DF &&
echo DF >DF &&
git update-index --add DF &&
read_tree_u_must_succeed -m -u $treeDF $treeDFDF &&
git ls-files --stage >DFDFcheck.out &&
test_cmp DFDF.out DFDFcheck.out &&
check_cache_at DF/DF clean
ok 4 - Can't use --path with --stdin-paths
expecting success:
test_must_fail git hash-object --no-filters --path=foo
ok 18 - Size of tree is correct
expecting success:
echo $type >expect &&
git cat-file -t --allow-unknown-type $sha1 >actual &&
test_cmp expect actual
error: Can't use --path with --no-filters
usage: git hash-object [-t <type>] [-w] [--path=<file> | --no-filters] [--stdin] [--] <file>...
or: git hash-object --stdin-paths
-t <type> object type
-w write the object into the object database
--stdin read the object from stdin
--stdin-paths read file names from stdin
--no-filters store file as is without filters
--literally just hash any random garbage to create corrupt objects for debugging Git
--path <file> process file as it were from this path
ok 5 - Can't use --path with --no-filters
ok 7 - Porcelain checkout -f HEAD should remove remnants too
# passed all 7 test(s)
1..7
ok 19 - Type of tree is correct using --allow-unknown-type
expecting success:
echo $size >expect &&
git cat-file -s --allow-unknown-type $sha1 >actual &&
test_cmp expect actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1007-hash-object/test/.git/
expecting success:
test $hello_sha1 = $(git hash-object hello)
ok 20 - Size of tree is correct using --allow-unknown-type
expecting success:
maybe_remove_timestamp "$pretty_content" $no_ts >expect &&
maybe_remove_timestamp "$(git cat-file -p $sha1)" $no_ts >actual &&
test_cmp expect actual
ok 6 - hash a file
expecting success:
test_must_fail git cat-file blob 5e1c309dae7f45e0f39b1bf3ac3cd9db12e7d689
*** t1008-read-tree-overlay.sh ***
ok 21 - Pretty content of tree is correct
expecting success:
echo "$sha1 $type $size" >expect &&
echo_without_newline $sha1 | git cat-file --batch-check >actual &&
test_cmp expect actual
fatal: git cat-file 5e1c309dae7f45e0f39b1bf3ac3cd9db12e7d689: bad file
ok 7 - blob does not exist in database
expecting success:
test $example_sha1 = $(git hash-object --stdin < example)
ok 8 - hash from stdin
expecting success:
test_must_fail git cat-file blob ddd3f836d3e3fbb7ae289aa9ae83536f76956399
ok 22 - --batch-check output of tree is correct
expecting success:
echo "$type $sha1" >expect &&
echo $sha1 | git cat-file --batch-check="%(objecttype) %(objectname)" >actual &&
test_cmp expect actual
fatal: git cat-file ddd3f836d3e3fbb7ae289aa9ae83536f76956399: bad file
ok 9 - blob does not exist in database
expecting success:
test $hello_sha1 = $(git hash-object -w hello)
ok 23 - custom --batch-check format
expecting success:
echo "$type this is some extra content" >expect &&
echo "$sha1 this is some extra content" |
git cat-file --batch-check="%(objecttype) %(rest)" >actual &&
test_cmp expect actual
ok 10 - hash a file and write to database
expecting success:
git cat-file blob 5e1c309dae7f45e0f39b1bf3ac3cd9db12e7d689
Hello Worldok 11 - blob exists in database
ok 24 - --batch-check with %(rest)
expecting success:
echo foo > file1 &&
obname0=$(echo bar | git hash-object --stdin) &&
obname1=$(git hash-object file1) &&
obname0new=$(echo bar | git hash-object --stdin file1 | sed -n -e 1p) &&
obname1new=$(echo bar | git hash-object --stdin file1 | sed -n -e 2p) &&
test "$obname0" = "$obname0new" &&
test "$obname1" = "$obname1new"
expecting success:
git cat-file -e $sha1
DF/DF: clean
ok 22 - DF vs DF/DF case test.
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1008-read-tree-overlay/.git/
ok 25 - commit exists
expecting success:
echo $type >expect &&
git cat-file -t $sha1 >actual &&
test_cmp expect actual
# passed all 22 test(s)
1..22
expecting success:
echo one >a &&
git add a &&
git commit -m initial &&
git tag initial &&
echo two >b &&
git add b &&
git commit -m second &&
git checkout -b side initial &&
echo three >a &&
mkdir b &&
echo four >b/c &&
git add b/c &&
git commit -m third
ok 12 - git hash-object --stdin file1 <file0 first operates on file0, then file1
expecting success:
echo fooQ | tr Q "\\015" >file0 &&
cp file0 file1 &&
echo "file0 -crlf" >.gitattributes &&
echo "file1 crlf" >>.gitattributes &&
git config core.autocrlf true &&
file0_sha=$(git hash-object file0) &&
file1_sha=$(git hash-object file1) &&
test "$file0_sha" != "$file1_sha" &&
path1_sha=$(git hash-object --path=file1 file0) &&
path0_sha=$(git hash-object --path=file0 file1) &&
test "$file0_sha" = "$path0_sha" &&
test "$file1_sha" = "$path1_sha" &&
path1_sha=$(cat file0 | git hash-object --path=file1 --stdin) &&
path0_sha=$(cat file1 | git hash-object --path=file0 --stdin) &&
test "$file0_sha" = "$path0_sha" &&
test "$file1_sha" = "$path1_sha" &&
git config --unset core.autocrlf
ok 26 - Type of commit is correct
expecting success:
echo $size >expect &&
git cat-file -s $sha1 >actual &&
test_cmp expect actual
ok 27 - Size of commit is correct
expecting success:
echo $type >expect &&
git cat-file -t --allow-unknown-type $sha1 >actual &&
test_cmp expect actual
[master (root-commit) c6faa84] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
*** t1009-read-tree-new-index.sh ***
ok 28 - Type of commit is correct using --allow-unknown-type
expecting success:
echo $size >expect &&
git cat-file -s --allow-unknown-type $sha1 >actual &&
test_cmp expect actual
ok 29 - Size of commit is correct using --allow-unknown-type
expecting success:
maybe_remove_timestamp "$content" $no_ts >expect &&
maybe_remove_timestamp "$(git cat-file $type $sha1)" $no_ts >actual &&
test_cmp expect actual
[master 1e74c4e] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b
ok 30 - Content of commit is correct
expecting success:
maybe_remove_timestamp "$pretty_content" $no_ts >expect &&
maybe_remove_timestamp "$(git cat-file -p $sha1)" $no_ts >actual &&
test_cmp expect actual
Switched to a new branch 'side'
ok 13 - check that appropriate filter is invoke when --path is used
expecting success:
echo fooQ | tr Q "\\015" >file0 &&
cp file0 file1 &&
echo "file0 -crlf" >.gitattributes &&
echo "file1 crlf" >>.gitattributes &&
git config core.autocrlf true &&
file0_sha=$(git hash-object file0) &&
file1_sha=$(git hash-object file1) &&
test "$file0_sha" != "$file1_sha" &&
nofilters_file1=$(git hash-object --no-filters file1) &&
test "$file0_sha" = "$nofilters_file1" &&
nofilters_file1=$(cat file1 | git hash-object --stdin) &&
test "$file0_sha" = "$nofilters_file1" &&
git config --unset core.autocrlf
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1009-read-tree-new-index/.git/
expecting success:
echo one >a &&
git add a &&
git commit -m initial
ok 31 - Pretty content of commit is correct
expecting success:
maybe_remove_timestamp "$batch_output" $no_ts >expect &&
maybe_remove_timestamp "$(echo $sha1 | git cat-file --batch)" $no_ts >actual &&
test_cmp expect actual
[side b66fdd3] third
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b/c
ok 1 - setup
expecting success:
read_tree_must_succeed initial master side &&
(echo a; echo b/c) >expect &&
git ls-files >actual &&
test_cmp expect actual
ok 32 - --batch output of commit is correct
expecting success:
echo "$sha1 $type $size" >expect &&
echo_without_newline $sha1 | git cat-file --batch-check >actual &&
test_cmp expect actual
[master (root-commit) c6faa84] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
ok 1 - setup
expecting success:
rm -f new-index &&
GIT_INDEX_FILE=new-index git read-tree master
ok 33 - --batch-check output of commit is correct
expecting success:
echo "$type $sha1" >expect &&
echo $sha1 | git cat-file --batch-check="%(objecttype) %(objectname)" >actual &&
test_cmp expect actual
ok 14 - check that --no-filters option works
expecting success:
echo fooQ | tr Q "\\015" >file0 &&
cp file0 file1 &&
echo "file0 -crlf" >.gitattributes &&
echo "file1 crlf" >>.gitattributes &&
git config core.autocrlf true &&
file0_sha=$(git hash-object file0) &&
file1_sha=$(git hash-object file1) &&
test "$file0_sha" != "$file1_sha" &&
nofilters_file1=$(echo "file1" | git hash-object --stdin-paths --no-filters) &&
test "$file0_sha" = "$nofilters_file1" &&
git config --unset core.autocrlf
ok 2 - non-existent index file
expecting success:
rm -f new-index &&
> new-index &&
GIT_INDEX_FILE=new-index git read-tree master
ok 34 - custom --batch-check format
expecting success:
echo "$type this is some extra content" >expect &&
echo "$sha1 this is some extra content" |
git cat-file --batch-check="%(objecttype) %(rest)" >actual &&
test_cmp expect actual
ok 3 - empty index file
ok 35 - --batch-check with %(rest)
expecting success:
{
echo "$size" &&
maybe_remove_timestamp "$content" $no_ts
} >expect &&
echo $sha1 | git cat-file --batch="%(objectsize)" >actual.full &&
maybe_remove_timestamp "$(cat actual.full)" $no_ts >actual &&
test_cmp expect actual
# passed all 3 test(s)
1..3
ok 2 - multi-read
# passed all 2 test(s)
1..2
*** t1010-mktree.sh ***
ok 36 - --batch without type (commit)
expecting success:
{
echo "$type" &&
maybe_remove_timestamp "$content" $no_ts
} >expect &&
echo $sha1 | git cat-file --batch="%(objecttype)" >actual.full &&
maybe_remove_timestamp "$(cat actual.full)" $no_ts >actual &&
test_cmp expect actual
ok 15 - check that --no-filters option works with --stdin-paths
*** t1011-read-tree-sparse-checkout.sh ***
ok 37 - --batch without size (commit)
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1007-hash-object/test/.git/
expecting success:
test $example_sha1 = $(git hash-object $args < example)
ok 16 - hash from stdin and write to database (-w --stdin)
expecting success:
git cat-file blob ddd3f836d3e3fbb7ae289aa9ae83536f76956399
expecting success:
git cat-file -e $sha1
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1010-mktree/.git/
This is an exampleok 38 - tag exists
expecting success:
echo $type >expect &&
git cat-file -t $sha1 >actual &&
test_cmp expect actual
ok 17 - blob exists in database
expecting success:
for d in a a. a0
do
mkdir "$d" && echo "$d/one" >"$d/one" &&
git add "$d"
done &&
echo zero >one &&
git update-index --add --info-only one &&
git write-tree --missing-ok >tree.missing &&
git ls-tree $(cat tree.missing) >top.missing &&
git ls-tree -r $(cat tree.missing) >all.missing &&
echo one >one &&
git add one &&
git write-tree >tree &&
git ls-tree $(cat tree) >top &&
git ls-tree -r $(cat tree) >all &&
test_tick &&
git commit -q -m one &&
H=$(git rev-parse HEAD) &&
git update-index --add --cacheinfo 160000 $H sub &&
test_tick &&
git commit -q -m two &&
git rev-parse HEAD^{tree} >tree.withsub &&
git ls-tree HEAD >top.withsub &&
git ls-tree -r HEAD >all.withsub
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1011-read-tree-sparse-checkout/.git/
ok 39 - Type of tag is correct
expecting success:
echo $size >expect &&
git cat-file -s $sha1 >actual &&
test_cmp expect actual
expecting success:
cat >expected <<-\EOF &&
100644 77f0ba1734ed79d12881f81b36ee134de6a3327b 0 init.t
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 sub/added
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 sub/addedtoo
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 subsub/added
EOF
cat >expected.swt <<-\EOF &&
H init.t
H sub/added
H sub/addedtoo
H subsub/added
EOF
test_commit init &&
echo modified >>init.t &&
mkdir sub subsub &&
touch sub/added sub/addedtoo subsub/added &&
git add init.t sub/added sub/addedtoo subsub/added &&
git commit -m "modified and added" &&
git tag top &&
git rm sub/added &&
git commit -m removed &&
git tag removed &&
git checkout top &&
git ls-files --stage >result &&
test_cmp expected result
ok 40 - Size of tag is correct
expecting success:
echo $type >expect &&
git cat-file -t --allow-unknown-type $sha1 >actual &&
test_cmp expect actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1007-hash-object/test/.git/
expecting success:
test $example_sha1 = $(git hash-object $args < example)
ok 41 - Type of tag is correct using --allow-unknown-type
expecting success:
echo $size >expect &&
git cat-file -s --allow-unknown-type $sha1 >actual &&
test_cmp expect actual
ok 18 - hash from stdin and write to database (--stdin -w)
expecting success:
git cat-file blob ddd3f836d3e3fbb7ae289aa9ae83536f76956399
[master (root-commit) 2519212] init
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 init.t
ok 42 - Size of tag is correct using --allow-unknown-type
expecting success:
maybe_remove_timestamp "$content" $no_ts >expect &&
maybe_remove_timestamp "$(git cat-file $type $sha1)" $no_ts >actual &&
test_cmp expect actual
This is an exampleok 19 - blob exists in database
expecting success:
test "$sha1s" = "$(echo_without_newline "$filenames" | git hash-object --stdin-paths)"
ok 43 - Content of tag is correct
expecting success:
maybe_remove_timestamp "$pretty_content" $no_ts >expect &&
maybe_remove_timestamp "$(git cat-file -p $sha1)" $no_ts >actual &&
test_cmp expect actual
ok 20 - hash two files with names on stdin
[master 9598e22] modified and added
Author: A U Thor <author@example.com>
4 files changed, 1 insertion(+)
create mode 100644 sub/added
create mode 100644 sub/addedtoo
create mode 100644 subsub/added
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1007-hash-object/test/.git/
ok 44 - Pretty content of tag is correct
expecting success:
test "$sha1s" = "$(echo_without_newline "$filenames" | git hash-object $args)"
expecting success:
maybe_remove_timestamp "$batch_output" $no_ts >expect &&
maybe_remove_timestamp "$(echo $sha1 | git cat-file --batch)" $no_ts >actual &&
test_cmp expect actual
rm 'sub/added'
ok 21 - hash two files with names on stdin and write to database (-w --stdin-paths)
expecting success:
git cat-file blob 5e1c309dae7f45e0f39b1bf3ac3cd9db12e7d689
ok 45 - --batch output of tag is correct
expecting success:
echo "$sha1 $type $size" >expect &&
echo_without_newline $sha1 | git cat-file --batch-check >actual &&
test_cmp expect actual
Hello Worldok 22 - blob exists in database
expecting success:
git cat-file blob ddd3f836d3e3fbb7ae289aa9ae83536f76956399
[master de70956] removed
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 sub/added
This is an exampleok 23 - blob exists in database
ok 46 - --batch-check output of tag is correct
expecting success:
echo "$type $sha1" >expect &&
echo $sha1 | git cat-file --batch-check="%(objecttype) %(objectname)" >actual &&
test_cmp expect actual
ok 47 - custom --batch-check format
expecting success:
echo "$type this is some extra content" >expect &&
echo "$sha1 this is some extra content" |
git cat-file --batch-check="%(objecttype) %(rest)" >actual &&
test_cmp expect actual
Note: checking out 'top'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 9598e22... modified and added
ok 1 - setup
ok 48 - --batch-check with %(rest)
expecting success:
read_tree_u_must_succeed -m -u HEAD &&
git ls-files --stage >result &&
test_cmp expected result &&
git ls-files -t >result &&
test_cmp expected.swt result
expecting success:
{
echo "$size" &&
maybe_remove_timestamp "$content" $no_ts
} >expect &&
echo $sha1 | git cat-file --batch="%(objectsize)" >actual.full &&
maybe_remove_timestamp "$(cat actual.full)" $no_ts >actual &&
test_cmp expect actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1007-hash-object/test/.git/
expecting success:
test "$sha1s" = "$(echo_without_newline "$filenames" | git hash-object $args)"
ok 24 - hash two files with names on stdin and write to database (--stdin-paths -w)
expecting success:
git cat-file blob 5e1c309dae7f45e0f39b1bf3ac3cd9db12e7d689
Hello Worldok 25 - blob exists in database
expecting success:
git cat-file blob ddd3f836d3e3fbb7ae289aa9ae83536f76956399
ok 49 - --batch without type (tag)
expecting success:
{
echo "$type" &&
maybe_remove_timestamp "$content" $no_ts
} >expect &&
echo $sha1 | git cat-file --batch="%(objecttype)" >actual.full &&
maybe_remove_timestamp "$(cat actual.full)" $no_ts >actual &&
test_cmp expect actual
This is an exampleok 26 - blob exists in database
expecting success:
echo abc >malformed-tree &&
test_must_fail git hash-object -t tree malformed-tree
ok 1 - setup
expecting success:
git mktree <top >actual &&
test_cmp tree actual
fatal: corrupt tree file
ok 27 - corrupt tree
expecting success:
test_must_fail git hash-object -t commit --stdin </dev/null
ok 50 - --batch without size (tag)
expecting success: test 'Hello World' = "$(git cat-file blob bb50ec8a71343279c59ba488a3445888e3fb624b)"
error: bogus commit object 0000000000000000000000000000000000000000
fatal: corrupt commit
ok 28 - corrupt commit
expecting success:
test_must_fail git hash-object -t tag --stdin </dev/null
ok 2 - ls-tree piped to mktree (1)
expecting success:
git mktree <top.withsub >actual &&
test_cmp tree.withsub actual
fatal: corrupt tag
ok 29 - corrupt tag
expecting success:
test_must_fail git hash-object -t bogus --stdin </dev/null
ok 51 - Reach a blob from a tag pointing to it
expecting success:
test_must_fail git cat-file --$batch -$opt $hello_sha1
fatal: invalid object type "bogus"
ok 30 - hash-object complains about bogus type name
expecting success:
test_must_fail git hash-object -t bl --stdin </dev/null
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 52 - Passing -t with --batch fails
expecting success:
test_must_fail git cat-file -$opt --$batch $hello_sha1
ok 2 - read-tree without .git/info/sparse-checkout
expecting success:
echo >.git/info/sparse-checkout &&
read_tree_u_must_succeed -m -u HEAD &&
git ls-files -t >result &&
test_cmp expected.swt result &&
test -f init.t &&
test -f sub/added
fatal: invalid object type "bl"
ok 3 - ls-tree piped to mktree (2)
expecting success:
perl -e "print reverse <>" <top |
git mktree >actual &&
test_cmp tree actual
ok 31 - hash-object complains about truncated type name
expecting success:
t=1234567890 &&
echo example | git hash-object -t $t --literally --stdin
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 53 - Passing --batch with -t fails
expecting success:
test_must_fail git cat-file --$batch -$opt $hello_sha1
f78b23c3f872d473c764d5fcf4fb39af8bbf2123
ok 4 - ls-tree output in wrong order given to mktree (1)
expecting success:
perl -e "print reverse <>" <top.withsub |
git mktree >actual &&
test_cmp tree.withsub actual
ok 32 - --literally
expecting success:
t=12345678901234567890123456789012345678901234567890 &&
t="$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t" &&
echo example | git hash-object -t $t --literally --stdin
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 54 - Passing -s with --batch fails
expecting success:
test_must_fail git cat-file -$opt --$batch $hello_sha1
2a881776ee43e849175ee7158075560ca0ae7692
ok 33 - --literally with extra-long type
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 55 - Passing --batch with -s fails
expecting success:
test_must_fail git cat-file --$batch -$opt $hello_sha1
# passed all 33 test(s)
1..33
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]ok 5 - ls-tree output in wrong order given to mktree (2)
expecting success:
git mktree --missing <top.missing >actual &&
test_cmp tree.missing actual
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 56 - Passing -e with --batch fails
expecting success:
test_must_fail git cat-file -$opt --$batch $hello_sha1
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]ok 6 - allow missing object with --missing
expecting success:
test_must_fail git mktree <all >actual
<type> can be one of: blob, tree, commit, tag
-t show object type
*** t1012-read-tree-df.sh ***
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 57 - Passing --batch with -e fails
expecting success:
test_must_fail git cat-file --$batch -$opt $hello_sha1
fatal: path a./one contains slash
ok 7 - mktree refuses to read ls-tree -r output (1)
expecting success:
test_must_fail git mktree <all.withsub >actual
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 58 - Passing -p with --batch fails
expecting success:
test_must_fail git cat-file -$opt --$batch $hello_sha1
fatal: path a./one contains slash
ok 3 - read-tree with .git/info/sparse-checkout but disabled
expecting success:
git config core.sparsecheckout true &&
echo >.git/info/sparse-checkout &&
read_tree_u_must_succeed --no-sparse-checkout -m -u HEAD &&
git ls-files -t >result &&
test_cmp expected.swt result &&
test -f init.t &&
test -f sub/added
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 8 - mktree refuses to read ls-tree -r output (2)
ok 59 - Passing --batch with -p fails
expecting success:
test_must_fail git cat-file --$batch blob $hello_sha1
# passed all 8 test(s)
1..8
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 60 - Passing <type> with --batch fails
expecting success:
test_must_fail git cat-file blob --$batch $hello_sha1
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 61 - Passing --batch with <type> fails
expecting success:
test_must_fail git cat-file --$batch $hello_sha1
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1012-read-tree-df/.git/
ok 62 - Passing sha1 with --batch fails
expecting success:
test_must_fail git cat-file --$batch -$opt $hello_sha1
*** t1013-read-tree-submodule.sh ***
expecting success:
maketree O-000 a/b-2/c/d a/b/c/d a/x &&
maketree A-000 a/b-2/c/d a/b/c/d a/x &&
maketree A-001 a/b-2/c/d a/b/c/d a/b/c/e a/x &&
maketree B-000 a/b-2/c/d a/b a/x &&
maketree O-010 t-0 t/1 t/2 t=3 &&
maketree A-010 t-0 t t=3 &&
maketree B-010 t/1: t=3: &&
maketree O-020 ds/dma/ioat.c ds/dma/ioat_dca.c &&
maketree A-020 ds/dma/ioat/Makefile ds/dma/ioat/registers.h &&
:
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 63 - Passing -t with --batch-check fails
expecting success:
test_must_fail git cat-file -$opt --$batch $hello_sha1
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 64 - Passing --batch-check with -t fails
expecting success:
test_must_fail git cat-file --$batch -$opt $hello_sha1
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 65 - Passing -s with --batch-check fails
expecting success:
test_must_fail git cat-file -$opt --$batch $hello_sha1
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 66 - Passing --batch-check with -s fails
expecting success:
test_must_fail git cat-file --$batch -$opt $hello_sha1
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/.git/
ok 4 - read-tree --no-sparse-checkout with empty .git/info/sparse-checkout and enabled
expecting success:
git config core.sparsecheckout true &&
echo >.git/info/sparse-checkout &&
read_tree_u_must_fail -m -u HEAD &&
git ls-files --stage >result &&
test_cmp expected result &&
git ls-files -t >result &&
test_cmp expected.swt result &&
test -f init.t &&
test -f sub/added
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 67 - Passing -e with --batch-check fails
expecting success:
test_must_fail git cat-file -$opt --$batch $hello_sha1
expecting success:
prolog &&
reset_work_tree_to no_submodule &&
(
cd submodule_update &&
git branch -t add_sub1 origin/add_sub1 &&
$command add_sub1 &&
test_superproject_content origin/add_sub1 &&
test_dir_is_empty sub1 &&
git submodule update --init --recursive &&
test_submodule_content sub1 origin/add_sub1
)
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 68 - Passing --batch-check with -e fails
expecting success:
test_must_fail git cat-file --$batch -$opt $hello_sha1
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 69 - Passing -p with --batch-check fails
expecting success:
test_must_fail git cat-file -$opt --$batch $hello_sha1
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.git/
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 70 - Passing --batch-check with -p fails
expecting success:
test_must_fail git cat-file --$batch blob $hello_sha1
error: Sparse checkout leaves no entry on working directory
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 71 - Passing <type> with --batch-check fails
expecting success:
test_must_fail git cat-file blob --$batch $hello_sha1
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
[master (root-commit) 58630c0] Base
Author: A U Thor <author@example.com>
3 files changed, 4 insertions(+)
create mode 100644 .gitignore
create mode 100644 file1
create mode 100644 file2
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 72 - Passing --batch-check with <type> fails
expecting success:
test_must_fail git cat-file --$batch $hello_sha1
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 73 - Passing sha1 with --batch-check fails
expecting success:
test_must_fail git cat-file --follow-symlinks -$opt $hello_sha1
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
error: Sparse checkout leaves no entry on working directory
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 74 - Passing -t with --follow-symlinks fails
expecting success:
test_must_fail git cat-file --follow-symlinks -$opt $hello_sha1
Switched to a new branch 'add_sub1'
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 75 - Passing -s with --follow-symlinks fails
expecting success:
test_must_fail git cat-file --follow-symlinks -$opt $hello_sha1
ok 5 - read-tree with empty .git/info/sparse-checkout
expecting success:
cat >expected.swt-noinit <<-\EOF &&
S init.t
H sub/added
H sub/addedtoo
S subsub/added
EOF
echo sub/ > .git/info/sparse-checkout &&
read_tree_u_must_succeed -m -u HEAD &&
git ls-files -t > result &&
test_cmp expected.swt-noinit result &&
test ! -f init.t &&
test -f sub/added
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 76 - Passing -e with --follow-symlinks fails
expecting success:
test_must_fail git cat-file --follow-symlinks -$opt $hello_sha1
usage: git cat-file (-t [--allow-unknown-type]|-s [--allow-unknown-type]|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks]
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--allow-unknown-type allow -s and -t to work with broken/corrupt objects
--buffer buffer --batch output
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
--follow-symlinks follow in-tree symlinks (used with --batch or --batch-check)
--batch-all-objects show all objects with --batch or --batch-check
ok 77 - Passing -p with --follow-symlinks fails
expecting success:
test "foobar42 missing
foobar84 missing" = \
"$( ( echo foobar42; echo_without_newline foobar84; ) | git cat-file --batch-check)"
ok 78 - --batch-check for a non-existent named object
expecting success:
test "0000000000000000000000000000000000000042 missing
0000000000000000000000000000000000000084 missing" = \
"$( ( echo 0000000000000000000000000000000000000042;
echo_without_newline 0000000000000000000000000000000000000084; ) \
| git cat-file --batch-check)"
ok 79 - --batch-check for a non-existent hash
expecting success:
test "$tag_sha1 tag $tag_size
$tag_content
0000000000000000000000000000000000000000 missing" = \
"$( ( echo $tag_sha1;
echo_without_newline 0000000000000000000000000000000000000000; ) \
| git cat-file --batch)"
ok 80 - --batch for an existent and a non-existent hash
expecting success:
test " missing" = "$(echo | git cat-file --batch-check)"
ok 81 - --batch-check for an emtpy line
expecting success:
echo "$_z40 missing" >expect &&
echo "$_z40" | git cat-file --batch-check="" >actual &&
test_cmp expect actual
ok 82 - empty --batch-check notices missing object
expecting success:
test "$(maybe_remove_timestamp "$batch_output" 1)" = "$(maybe_remove_timestamp "$(echo_without_newline "$batch_input" | git cat-file --batch)" 1)"
ok 6 - match directories with trailing slash
expecting success:
echo sub >.git/info/sparse-checkout &&
read_tree_u_must_succeed -m -u HEAD &&
git ls-files -t >result &&
test_cmp expected.swt-noinit result &&
test ! -f init.t &&
test -f sub/added
ok 83 - --batch with multiple sha1s gives correct format
expecting success:
test "$batch_check_output" = \
"$(echo_without_newline "$batch_check_input" | git cat-file --batch-check)"
Cloning into 'sub1'...
ok 84 - --batch-check with multiple sha1s gives correct format
expecting success:
test-genrandom foo 10240 >foo &&
{ cat foo; echo plus; } >foo-plus &&
git add foo foo-plus &&
git commit -m foo &&
cat >blobs <<-\EOF
HEAD:foo
HEAD:foo-plus
EOF
done.
[master (root-commit) 4eeced4] foo
Author: A U Thor <author@example.com>
3 files changed, 1 insertion(+)
create mode 100644 foo
create mode 100644 foo-plus
create mode 100644 hello
ok 85 - setup blobs which are likely to delta
expecting success:
cat >expect <<-EOF &&
$_z40
$_z40
EOF
git cat-file --batch-check="%(deltabase)" <blobs >actual &&
test_cmp expect actual
ok 7 - match directories without trailing slash
expecting success:
cat >expected.swt-negation <<\EOF &&
S init.t
S sub/added
H sub/addedtoo
S subsub/added
EOF
cat >.git/info/sparse-checkout <<\EOF &&
sub
!sub/added
EOF
git read-tree -m -u HEAD &&
git ls-files -t >result &&
test_cmp expected.swt-negation result &&
test ! -f init.t &&
test ! -f sub/added &&
test -f sub/addedtoo
ok 86 - confirm that neither loose blob is a delta
expecting success:
git repack -ad &&
git cat-file --batch-check="%(deltabase)" <blobs >actual &&
{
grep "$(git rev-parse HEAD:foo)" actual ||
grep "$(git rev-parse HEAD:foo-plus)" actual
}
ok 8 - match directories with negated patterns
expecting success:
cat >expected.swt-negation2 <<\EOF &&
H init.t
H sub/added
S sub/addedtoo
H subsub/added
EOF
cat >.git/info/sparse-checkout <<\EOF &&
/*
!sub
sub/added
EOF
git read-tree -m -u HEAD &&
git ls-files -t >result &&
test_cmp expected.swt-negation2 result &&
test -f init.t &&
test -f sub/added &&
test ! -f sub/addedtoo
ok 9 - match directories with negated patterns (2)
expecting success:
echo "s?b" >.git/info/sparse-checkout &&
read_tree_u_must_succeed -m -u HEAD &&
git ls-files -t >result &&
test_cmp expected.swt-noinit result &&
test ! -f init.t &&
test -f sub/added
[add_sub1 f82c245] Add sub1
Author: A U Thor <author@example.com>
1 file changed, 4 insertions(+)
create mode 100644 .gitmodules
ok 10 - match directory pattern
expecting success:
cat >expected.swt-nosub <<-\EOF &&
H init.t
S sub/added
S sub/addedtoo
S subsub/added
EOF
echo init.t >.git/info/sparse-checkout &&
read_tree_u_must_succeed -m -u HEAD &&
git ls-files -t >result &&
test_cmp expected.swt-nosub result &&
test -f init.t &&
test ! -f sub/added
Switched to a new branch 'remove_sub1'
Removing sub1
Removing .gitmodules
[remove_sub1 2616ca2] Revert "Add sub1"
Author: A U Thor <author@example.com>
2 files changed, 5 deletions(-)
delete mode 100644 .gitmodules
delete mode 160000 sub1
9b546ef00c80e00a1733cb882d607028fcd562fc
ok 87 - %(deltabase) reports packed delta bases
expecting success:
echo $bogus_type >expect &&
git cat-file -t --allow-unknown-type $bogus_sha1 >actual &&
test_cmp expect actual
Switched to a new branch 'modify_sub1'
ok 88 - Type of broken object is correct
ok 11 - checkout area changes
expecting success:
echo $bogus_size >expect &&
git cat-file -s --allow-unknown-type $bogus_sha1 >actual &&
test_cmp expect actual
expecting success:
echo sub/added >.git/info/sparse-checkout &&
git checkout -f top &&
read_tree_u_must_succeed -m -u HEAD^ &&
test ! -f init.t
ok 89 - Size of broken object is correct
HEAD is now at 9598e22... modified and added
expecting success:
echo $bogus_type >expect &&
git cat-file -t --allow-unknown-type $bogus_sha1 >actual &&
test_cmp expect actual
ok 90 - Type of broken object is correct when type is large
expecting success:
echo $bogus_size >expect &&
git cat-file -s --allow-unknown-type $bogus_sha1 >actual &&
test_cmp expect actual
ok 91 - Size of large broken object is correct when type is large
expecting success:
echo_without_newline "$hello_content" >morx &&
test_ln_s_add morx same-dir-link &&
test_ln_s_add dir link-to-dir &&
test_ln_s_add ../fleem out-of-repo-link &&
test_ln_s_add .. out-of-repo-link-dir &&
test_ln_s_add same-dir-link link-to-link &&
test_ln_s_add nope broken-same-dir-link &&
mkdir dir &&
test_ln_s_add ../morx dir/parent-dir-link &&
test_ln_s_add .. dir/link-dir &&
test_ln_s_add ../../escape dir/out-of-repo-link &&
test_ln_s_add ../.. dir/out-of-repo-link-dir &&
test_ln_s_add nope dir/broken-link-in-dir &&
mkdir dir/subdir &&
test_ln_s_add ../../morx dir/subdir/grandparent-dir-link &&
test_ln_s_add ../../../great-escape dir/subdir/out-of-repo-link &&
test_ln_s_add ../../.. dir/subdir/out-of-repo-link-dir &&
test_ln_s_add ../../../ dir/subdir/out-of-repo-link-dir-trailing &&
test_ln_s_add ../parent-dir-link dir/subdir/parent-dir-link-to-link &&
echo_without_newline "$hello_content" >dir/subdir/ind2 &&
echo_without_newline "$hello_content" >dir/ind1 &&
test_ln_s_add dir dirlink &&
test_ln_s_add dir/subdir subdirlink &&
test_ln_s_add subdir/ind2 dir/link-to-child &&
test_ln_s_add dir/link-to-child link-to-down-link &&
test_ln_s_add dir/.. up-down &&
test_ln_s_add dir/../ up-down-trailing &&
test_ln_s_add dir/../morx up-down-file &&
test_ln_s_add dir/../../morx up-up-down-file &&
test_ln_s_add subdirlink/../../morx up-two-down-file &&
test_ln_s_add loop1 loop2 &&
test_ln_s_add loop2 loop1 &&
git add morx dir/subdir/ind2 dir/ind1 &&
git commit -am "test" &&
echo $hello_sha1 blob $hello_size >found
checking prerequisite: SYMLINKS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# test whether the filesystem supports symbolic links
ln -s x y && test -h y
)
prerequisite SYMLINKS ok
ok 12 - read-tree updates worktree, absent case
expecting success:
echo sub/added >.git/info/sparse-checkout &&
git checkout -f top &&
echo dirty >init.t &&
read_tree_u_must_succeed -m -u HEAD^ &&
grep -q dirty init.t &&
rm init.t
HEAD is now at 9598e22... modified and added
ok 13 - read-tree updates worktree, dirty case
expecting success:
echo init.t >.git/info/sparse-checkout &&
git checkout -f top &&
echo dirty >added &&
read_tree_u_must_succeed -m -u HEAD^ &&
grep -q dirty added
HEAD is now at 9598e22... modified and added
From /«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.
58630c0..f82c245 add_sub1 -> origin/add_sub1
* [new branch] modify_sub1 -> origin/modify_sub1
* [new branch] remove_sub1 -> origin/remove_sub1
Switched to a new branch 'modifications'
ok 14 - read-tree removes worktree, dirty case
expecting success:
echo init.t >.git/info/sparse-checkout &&
git checkout -f removed &&
read_tree_u_must_succeed -u -m HEAD^ &&
test ! -f sub/added
Previous HEAD position was 9598e22... modified and added
HEAD is now at de70956... removed
[modifications 853843e] modified file2 and added file3
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 file3
ok 1 - setup
expecting success:
settree A-000 &&
read_tree_u_must_succeed -m -u O-000 A-000 B-000 &&
checkindex <<-EOF
3 a/b
0 a/b-2/c/d
1 a/b/c/d
2 a/b/c/d
0 a/x
EOF
ok 15 - read-tree adds to worktree, absent case
expecting success:
echo init.t >.git/info/sparse-checkout &&
git checkout -f removed &&
mkdir sub &&
echo dirty >sub/added &&
read_tree_u_must_succeed -u -m HEAD^ &&
grep -q dirty sub/added
To /«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.
* [new branch] modifications -> modifications
HEAD is now at de70956... removed
[modify_sub1 cda2010] Modify sub1
Author: A U Thor <author@example.com>
Switched to a new branch 'replace_sub1_with_directory'
ok 16 - read-tree adds to worktree, dirty case
expecting success:
>empty &&
echo init.t >.git/info/sparse-checkout &&
echo sub/added >>.git/info/sparse-checkout &&
git checkout -f top &&
echo init.t >.git/info/sparse-checkout &&
git checkout removed &&
git ls-files sub/added >result &&
test ! -f sub/added &&
test_cmp empty result
Previous HEAD position was de70956... removed
HEAD is now at 9598e22... modified and added
ok 2 - 3-way (1)
expecting success:
settree A-001 &&
read_tree_u_must_succeed -m -u O-000 A-001 B-000 &&
checkindex <<-EOF
3 a/b
0 a/b-2/c/d
1 a/b/c/d
2 a/b/c/d
2 a/b/c/e
0 a/x
EOF
Previous HEAD position was 9598e22... modified and added
HEAD is now at de70956... removed
ok 17 - index removal and worktree narrowing at the same time
expecting success:
>empty &&
echo init.t >.git/info/sparse-checkout &&
git checkout -f top &&
git reset --hard removed &&
git ls-files sub/added >result &&
test_cmp empty result
Previous HEAD position was de70956... removed
HEAD is now at 9598e22... modified and added
HEAD is now at de70956 removed
ok 18 - read-tree --reset removes outside worktree
expecting success:
echo sub >.git/info/sparse-checkout &&
git checkout -f init &&
mkdir sub &&
touch sub/added sub/addedtoo &&
test_must_fail git checkout top 2>actual &&
cat >expected <<\EOF &&
error: The following untracked working tree files would be overwritten by checkout:
sub/added
sub/addedtoo
Please move or remove them before you can switch branches.
Aborting
EOF
test_cmp expected actual
Previous HEAD position was de70956... removed
HEAD is now at 2519212... init
[master 78646e6] test
Author: A U Thor <author@example.com>
30 files changed, 30 insertions(+)
create mode 120000 broken-same-dir-link
create mode 120000 dir/broken-link-in-dir
create mode 100644 dir/ind1
create mode 120000 dir/link-dir
create mode 120000 dir/link-to-child
create mode 120000 dir/out-of-repo-link
create mode 120000 dir/out-of-repo-link-dir
create mode 120000 dir/parent-dir-link
create mode 120000 dir/subdir/grandparent-dir-link
create mode 100644 dir/subdir/ind2
create mode 120000 dir/subdir/out-of-repo-link
create mode 120000 dir/subdir/out-of-repo-link-dir
create mode 120000 dir/subdir/out-of-repo-link-dir-trailing
create mode 120000 dir/subdir/parent-dir-link-to-link
create mode 120000 dirlink
create mode 120000 link-to-dir
create mode 120000 link-to-down-link
create mode 120000 link-to-link
create mode 120000 loop1
create mode 120000 loop2
create mode 100644 morx
create mode 120000 out-of-repo-link
create mode 120000 out-of-repo-link-dir
create mode 120000 same-dir-link
create mode 120000 subdirlink
create mode 120000 up-down
create mode 120000 up-down-file
create mode 120000 up-down-trailing
create mode 120000 up-two-down-file
create mode 120000 up-up-down-file
ok 92 - prep for symlink tests
expecting success:
echo HEAD:morx | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp found actual &&
echo HEAD:nope missing >expect &&
echo HEAD:nope | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual
ok 19 - print errors when failed to update worktree
expecting success:
echo "*" >.git/info/sparse-checkout &&
git checkout -f top &&
test_path_is_file init.t &&
echo sub >.git/info/sparse-checkout &&
git checkout &&
echo modified >> sub/added &&
git checkout . &&
test_path_is_missing init.t &&
git diff --exit-code HEAD
Previous HEAD position was 2519212... init
ok 3 - 3-way (2)
expecting success:
settree A-010 &&
read_tree_u_must_succeed -m -u O-010 A-010 B-010 &&
checkindex <<-EOF
2 t
1 t-0
2 t-0
1 t/1
3 t/1
1 t/2
0 t=3
EOF
HEAD is now at 9598e22... modified and added
ok 93 - git cat-file --batch-check --follow-symlinks works for non-links
expecting success:
echo HEAD:same-dir-link | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp found actual
Submodule path 'sub1': checked out '58630c04cd08e6914ad0ab5a3126bcfb71a3e6ca'
ok 94 - git cat-file --batch-check --follow-symlinks works for in-repo, same-dir links
expecting success:
echo HEAD:link-to-dir/ind1 | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp found actual
Previous HEAD position was 58630c0... Base
Switched to branch 'modifications'
ok 20 - checkout without --ignore-skip-worktree-bits
expecting success:
echo "*" >.git/info/sparse-checkout &&
git checkout -f top &&
test_path_is_file init.t &&
echo sub >.git/info/sparse-checkout &&
git checkout &&
echo modified >> sub/added &&
git checkout --ignore-skip-worktree-bits . &&
test_path_is_file init.t &&
git diff --exit-code HEAD
ok 95 - git cat-file --batch-check --follow-symlinks works for in-repo, links to dirs
expecting success:
echo dangling 25 >expect &&
echo HEAD:broken-same-dir-link >>expect &&
echo HEAD:broken-same-dir-link | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual
HEAD is now at 9598e22... modified and added
rm 'sub1'
ok 96 - git cat-file --batch-check --follow-symlinks works for broken in-repo, same-dir links
expecting success:
echo HEAD:link-to-link | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp found actual
ok 97 - git cat-file --batch-check --follow-symlinks works for same-dir links-to-links
expecting success:
echo HEAD:dir/parent-dir-link | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp found actual &&
echo notdir 29 >expect &&
echo HEAD:dir/parent-dir-link/nope >>expect &&
echo HEAD:dir/parent-dir-link/nope | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual
ok 21 - checkout with --ignore-skip-worktree-bits
# passed all 21 test(s)
1..21
ok 98 - git cat-file --batch-check --follow-symlinks works for parent-dir links
[replace_sub1_with_directory 2fdc7b9] Replace sub1 with directory
Author: A U Thor <author@example.com>
5 files changed, 3 insertions(+), 5 deletions(-)
delete mode 160000 sub1
create mode 100644 sub1/file1
create mode 100644 sub1/file2
create mode 100644 sub1/file3
expecting success:
echo dangling 22 >expect &&
echo HEAD:dir/link-dir/nope >>expect &&
echo HEAD:dir/link-dir/nope | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual &&
echo HEAD:dir/link-dir/morx | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp found actual &&
echo dangling 27 >expect &&
echo HEAD:dir/broken-link-in-dir >>expect &&
echo HEAD:dir/broken-link-in-dir | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual
Switched to a new branch 'replace_directory_with_sub1'
ok 4 - 3-way (3)
expecting success:
settree O-020 &&
read_tree_u_must_succeed -m -u O-020 A-020 &&
checkindex <<-EOF
0 ds/dma/ioat/Makefile
0 ds/dma/ioat/registers.h
EOF
*** t1014-read-tree-confusing.sh ***
Removing sub1/file3
Removing sub1/file2
Removing sub1/file1
Adding sub1
[replace_directory_with_sub1 18f56b7] Revert "Replace sub1 with directory"
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+), 3 deletions(-)
delete mode 100644 sub1/file1
delete mode 100644 sub1/file2
delete mode 100644 sub1/file3
ok 99 - git cat-file --batch-check --follow-symlinks works for .. links
expecting success:
echo notdir 41 >expect &&
echo HEAD:dir/subdir/grandparent-dir-link/nope >>expect &&
echo HEAD:dir/subdir/grandparent-dir-link/nope | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual &&
echo HEAD:dir/subdir/grandparent-dir-link | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp found actual &&
echo HEAD:dir/subdir/parent-dir-link-to-link | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp found actual
Switched to a new branch 'replace_sub1_with_file'
rm 'sub1'
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1014-read-tree-confusing/.git/
ok 100 - git cat-file --batch-check --follow-symlinks works for ../.. links
expecting success:
echo dangling 17 >expect &&
echo HEAD:dirlink/morx >>expect &&
echo HEAD:dirlink/morx | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual &&
echo $hello_sha1 blob $hello_size >expect &&
echo HEAD:dirlink/ind1 | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual
expecting success:
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse HEAD:file) &&
tree=$(git rev-parse HEAD^{tree})
[replace_sub1_with_file d2a0777] Replace sub1 with file
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 5 deletions(-)
mode change 160000 => 100644 sub1
Switched to a new branch 'replace_file_with_sub1'
[master (root-commit) aba5342] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 101 - git cat-file --batch-check --follow-symlinks works for dir/ links
expecting success:
echo dangling 20 >expect &&
echo HEAD:subdirlink/morx >>expect &&
echo HEAD:subdirlink/morx | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual &&
echo HEAD:subdirlink/ind2 | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp found actual
ok 5 - 2-way (1)
ok 1 - create base tree
expecting success:
git config core.protectHFS true
# passed all 5 test(s)
1..5
ok 102 - git cat-file --batch-check --follow-symlinks works for dir/subdir links
expecting success:
echo notdir 27 >expect &&
echo HEAD:dir/link-to-child/morx >>expect &&
echo HEAD:dir/link-to-child/morx | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual &&
echo HEAD:dir/link-to-child | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp found actual &&
echo HEAD:link-to-down-link | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp found actual
[replace_file_with_sub1 a142852] Revert "Replace sub1 with file"
Author: A U Thor <author@example.com>
2 files changed, 5 insertions(+), 1 deletion(-)
mode change 100644 => 160000 sub1
ok 2 - enable core.protectHFS for rejection tests
expecting success:
git config core.protectNTFS true
ok 3 - enable core.protectNTFS for rejection tests
expecting success:
printf "100644 blob %s\t%s" "$blob" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
Switched to a new branch 'invalid_sub1'
error: Invalid path '.'
ok 4 - reject . at end of path
expecting success:
printf "040000 tree %s\t%s" "$tree" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
ok 103 - git cat-file --batch-check --follow-symlinks works for dir ->subdir links
expecting success:
echo symlink 8 >expect &&
echo ../fleem >>expect &&
echo HEAD:out-of-repo-link | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual &&
echo symlink 2 >expect &&
echo .. >>expect &&
echo HEAD:out-of-repo-link-dir | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual
*** t1020-subdirectory.sh ***
[invalid_sub1 ac86d0b] Invalid sub1 commit
Author: A U Thor <author@example.com>
error: Invalid path './file'
ok 5 - reject . as subtree
expecting success:
printf "100644 blob %s\t%s" "$blob" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
Switched to a new branch 'valid_sub1'
ok 104 - git cat-file --batch-check --follow-symlinks works for out-of-repo symlinks
expecting success:
echo symlink 9 >expect &&
echo ../escape >>expect &&
echo HEAD:dir/out-of-repo-link | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual &&
echo symlink 2 >expect &&
echo .. >>expect &&
echo HEAD:dir/out-of-repo-link-dir | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual
error: Invalid path '..'
ok 6 - reject .. at end of path
expecting success:
printf "040000 tree %s\t%s" "$tree" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
[valid_sub1 90d123d] Revert "Invalid sub1 commit"
Author: A U Thor <author@example.com>
ok 105 - git cat-file --batch-check --follow-symlinks works for out-of-repo symlinks in dirs
expecting success:
echo symlink 15 >expect &&
echo ../great-escape >>expect &&
echo HEAD:dir/subdir/out-of-repo-link | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual &&
echo symlink 2 >expect &&
echo .. >>expect &&
echo HEAD:dir/subdir/out-of-repo-link-dir | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual &&
echo symlink 3 >expect &&
echo ../ >>expect &&
echo HEAD:dir/subdir/out-of-repo-link-dir-trailing | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual
error: Invalid path '../file'
ok 7 - reject .. as subtree
expecting success:
printf "100644 blob %s\t%s" "$blob" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1020-subdirectory/.git/
Switched to branch 'master'
expecting success:
long="a b c d e f g h i j k l m n o p q r s t u v w x y z" &&
for c in $long; do echo $c; done >one &&
mkdir dir &&
for c in x y z $long a b c; do echo $c; done >dir/two &&
cp one original.one &&
cp dir/two original.two
error: Invalid path '.git'
ok 8 - reject .git at end of path
expecting success:
printf "040000 tree %s\t%s" "$tree" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
ok 1 - setup
expecting success:
git update-index --add one &&
case "$(git ls-files)" in
one) echo pass one ;;
*) echo bad one; exit 1 ;;
esac &&
(
cd dir &&
git update-index --add two &&
case "$(git ls-files)" in
two) echo pass two ;;
*) echo bad two; exit 1 ;;
esac
) &&
case "$(git ls-files)" in
dir/two"$LF"one) echo pass both ;;
*) echo bad; exit 1 ;;
esac
ok 106 - git cat-file --batch-check --follow-symlinks works for out-of-repo symlinks in subdirs
Cloning into 'submodule_update'...
expecting success:
echo HEAD: | git cat-file --batch-check >expect &&
echo HEAD:up-down | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual &&
echo HEAD:up-down-trailing | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual &&
echo HEAD:up-down-file | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp found actual &&
echo symlink 7 >expect &&
echo ../morx >>expect &&
echo HEAD:up-up-down-file | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual &&
echo HEAD:up-two-down-file | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp found actual
error: Invalid path '.git/file'
ok 9 - reject .git as subtree
expecting success:
printf "100644 blob %s\t%s" "$blob" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
pass one
error: Invalid path '.GIT'
ok 10 - reject .GIT at end of path
expecting success:
printf "040000 tree %s\t%s" "$tree" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
pass two
done.
pass both
ok 2 - update-index and ls-files
expecting success:
two=$(git ls-files -s dir/two) &&
two=$(expr "$two" : "[0-7]* \\([0-9a-f]*\\)") &&
echo "$two" &&
git cat-file -p "$two" >actual &&
cmp dir/two actual &&
(
cd dir &&
git cat-file -p "$two" >actual &&
cmp two actual
)
error: Invalid path '.GIT/file'
ok 11 - reject .GIT as subtree
c1144d0671912dd26751c1fbf1eac57a907f82c7
expecting success:
printf "100644 blob %s\t%s" "$blob" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
Switched to a new branch 'no_submodule'
Branch no_submodule set up to track remote branch no_submodule from origin.
error: Invalid path '.Git'
ok 107 - git cat-file --batch-check --follow-symlinks works for symlinks with internal ..
expecting success:
echo loop 10 >expect &&
echo HEAD:loop1 >>expect &&
echo HEAD:loop1 | git cat-file --batch-check --follow-symlinks >actual &&
test_cmp expect actual
ok 12 - reject {u200c}.Git at end of path
expecting success:
printf "040000 tree %s\t%s" "$tree" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
ok 3 - cat-file
expecting success:
echo a >>one &&
echo d >>dir/two &&
case "$(git diff-files --name-only)" in
dir/two"$LF"one) echo pass top ;;
*) echo bad top; exit 1 ;;
esac &&
# diff should not omit leading paths
(
cd dir &&
case "$(git diff-files --name-only)" in
dir/two"$LF"one) echo pass subdir ;;
*) echo bad subdir; exit 1 ;;
esac &&
case "$(git diff-files --name-only .)" in
dir/two) echo pass subdir limited ;;
*) echo bad subdir limited; exit 1 ;;
esac
)
error: Invalid path '.Git/file'
ok 108 - git cat-file --batch-check --follow-symlink breaks loops
expecting success:
echo HEAD:morx | git cat-file --batch >expect &&
echo HEAD:morx | git cat-file --batch --follow-symlinks >actual &&
test_cmp expect actual
pass top
ok 13 - reject {u200c}.Git as subtree
expecting success:
printf "100644 blob %s\t%s" "$blob" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
pass subdir
Branch add_sub1 set up to track remote branch add_sub1 from origin.
pass subdir limited
ok 4 - diff-files
expecting success:
top=$(git write-tree) &&
echo $top &&
(
cd dir &&
sub=$(git write-tree) &&
echo $sub &&
test "z$top" = "z$sub"
)
error: Invalid path '.gIT'
ok 14 - reject .gI{u200c}T at end of path
expecting success:
printf "040000 tree %s\t%s" "$tree" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
ok 109 - git cat-file --batch --follow-symlink returns correct sha and mode
expecting success:
# make new repos so we know the full set of objects; we will
# also make sure that there are some packed and some loose
# objects, some referenced and some not, and that there are
# some available only via alternates.
git init all-one &&
(
cd all-one &&
echo content >file &&
git add file &&
git commit -qm base &&
git rev-parse HEAD HEAD^{tree} HEAD:file &&
git repack -ad &&
echo not-cloned | git hash-object -w --stdin
) >expect.unsorted &&
git clone -s all-one all-two &&
(
cd all-two &&
echo local-unref | git hash-object -w --stdin
) >>expect.unsorted &&
sort <expect.unsorted >expect &&
git -C all-two cat-file --batch-all-objects \
--batch-check="%(objectname)" >actual &&
test_cmp expect actual
cf1e35b43464cccd320d58a813e14e25fa36b1d7
cf1e35b43464cccd320d58a813e14e25fa36b1d7
ok 5 - write-tree
expecting success:
git checkout-index -f -u one &&
cmp one original.one &&
(
cd dir &&
git checkout-index -f -u two &&
cmp two ../original.two
)
error: Invalid path '.gIT/file'
ok 15 - reject .gI{u200c}T as subtree
expecting success:
printf "100644 blob %s\t%s" "$blob" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1006-cat-file/all-one/.git/
ok 6 - checkout-index
expecting success:
rm -f one dir/two &&
tree=$(git write-tree) &&
read_tree_u_must_succeed --reset -u "$tree" &&
cmp one original.one &&
cmp dir/two original.two &&
(
cd dir &&
rm -f two &&
read_tree_u_must_succeed --reset -u "$tree" &&
cmp two ../original.two &&
cmp ../one ../original.one
)
error: Invalid path '.GiT'
ok 16 - reject .GiT{u200c} at end of path
expecting success:
printf "040000 tree %s\t%s" "$tree" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
error: Invalid path '.GiT/file'
ok 17 - reject .GiT{u200c} as subtree
expecting success:
printf "100644 blob %s\t%s" "$blob" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
error: Invalid path 'git~1'
ok 18 - reject git~1 at end of path
expecting success:
printf "040000 tree %s\t%s" "$tree" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
error: Invalid path 'git~1/file'
ok 19 - reject git~1 as subtree
expecting success:
printf "100644 blob %s\t%s" "$blob" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
error: Invalid path '.git. '
ok 20 - reject .git.{space} at end of path
expecting success:
printf "040000 tree %s\t%s" "$tree" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
error: Invalid path '.git. /file'
ok 21 - reject .git.{space} as subtree
expecting success:
printf "100644 blob %s\t%s" "$blob" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
error: Invalid path '.\.GIT\foobar'
ok 22 - reject backslashes at end of path
expecting success:
printf "040000 tree %s\t%s" "$tree" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
Submodule 'sub1' (/«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.) registered for path 'sub1'
error: Invalid path '.\.GIT\foobar/file'
ok 23 - reject backslashes as subtree
expecting success:
printf "100644 blob %s\t%s" "$blob" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
ok 7 - read-tree
expecting success:
(
git config alias.test-status-alias status &&
cd dir &&
git status &&
git test-status-alias
)
error: Invalid path '.git\foobar'
Cloning into 'all-two'...
ok 24 - reject backslashes2 at end of path
expecting success:
printf "040000 tree %s\t%s" "$tree" "$path" >tree &&
bogus=$(git mktree <tree) &&
test_must_fail git read-tree $bogus
On branch master
Initial commit
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: two
new file: ../one
Untracked files:
(use "git add <file>..." to include in what will be committed)
post-dry-run
post-dry-run-wt
pre-dry-run
pre-dry-run-wt
../original.one
../original.two
../post-dry-run
../post-dry-run-wt
../pre-dry-run
../pre-dry-run-wt
error: Invalid path '.git\foobar/file'
done.
On branch master
Initial commit
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: two
new file: ../one
Untracked files:
(use "git add <file>..." to include in what will be committed)
post-dry-run
post-dry-run-wt
pre-dry-run
pre-dry-run-wt
../original.one
../original.two
../post-dry-run
../post-dry-run-wt
../pre-dry-run
../pre-dry-run-wt
ok 25 - reject backslashes2 as subtree
expecting success:
test_when_finished "git read-tree HEAD" &&
test_config core.protectHFS false &&
printf "100644 blob %s\t%s" "$blob" ".gi${u200c}t" >tree &&
ok=$(git mktree <tree) &&
git read-tree $ok
ok 8 - alias expansion
expecting success:
pwd >expect &&
(
git config alias.test-alias-directory !pwd &&
cd dir &&
git test-alias-directory >../actual
) &&
test_cmp expect actual
Cloning into 'sub1'...
ok 9 - !alias expansion
expecting success:
printf "dir/" >expect &&
(
git config alias.test-alias-directory "!sh -c \"printf \$GIT_PREFIX\"" &&
cd dir &&
git test-alias-directory >../actual
) &&
test_cmp expect actual
ok 110 - cat-file --batch-all-objects shows all objects
# passed all 110 test(s)
1..110
ok 26 - utf-8 paths allowed with core.protectHFS off
done.
# passed all 26 test(s)
1..26
ok 10 - GIT_PREFIX for !alias
expecting success:
# Use GIT_EXTERNAL_DIFF to test that the "diff" built-in
# receives the GIT_PREFIX variable.
printf "dir/" >expect &&
printf "#!/bin/sh\n" >diff &&
printf "printf \"\$GIT_PREFIX\"" >>diff &&
chmod +x diff &&
(
cd dir &&
printf "change" >two &&
GIT_EXTERNAL_DIFF=./diff git diff >../actual
git checkout -- two
) &&
test_cmp expect actual
ok 11 - GIT_PREFIX for built-ins
expecting success:
git commit -a -m 1 &&
(
cd .git &&
git show -s HEAD
)
*** t1021-rerere-in-workdir.sh ***
[master (root-commit) f0aeb19] 1
Author: A U Thor <author@example.com>
2 files changed, 58 insertions(+)
create mode 100644 dir/two
create mode 100644 one
*** t1050-large.sh ***
commit f0aeb1993f1f89cccff09a60379174fefefa1f3b
Author: A U Thor <author@example.com>
Date: Wed Dec 16 10:48:54 2015 +0000
1
ok 12 - no file/rev ambiguity check inside .git
expecting success:
test_when_finished "rm -fr foo.git" &&
git clone -s --bare .git foo.git &&
(
cd foo.git &&
# older Git needed help by exporting GIT_DIR=.
# to realize that it is inside a bare repository.
# We keep this test around for regression testing.
GIT_DIR=. git show -s HEAD
)
Cloning into bare repository 'foo.git'...
done.
Submodule path 'sub1': checked out '58630c04cd08e6914ad0ab5a3126bcfb71a3e6ca'
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1021-rerere-in-workdir/.git/
commit f0aeb1993f1f89cccff09a60379174fefefa1f3b
Author: A U Thor <author@example.com>
Date: Wed Dec 16 10:48:54 2015 +0000
1
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1050-large/.git/
checking prerequisite: SYMLINKS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# test whether the filesystem supports symbolic links
ln -s x y && test -h y
)
ok 13 - no file/rev ambiguity check inside a bare repo (explicit GIT_DIR)
expecting success:
test_when_finished "rm -fr foo.git" &&
git clone -s --bare .git foo.git &&
(
cd foo.git &&
git show -s HEAD
)
Cloning into bare repository 'foo.git'...
expecting success:
# clone does not allow us to pass core.bigfilethreshold to
# new repos, so set core.bigfilethreshold globally
git config --global core.bigfilethreshold 200k &&
printf "%2000000s" X >large1 &&
cp large1 large2 &&
cp large1 large3 &&
printf "%2500000s" Y >huge &&
GIT_ALLOC_LIMIT=1500k &&
export GIT_ALLOC_LIMIT
prerequisite SYMLINKS ok
expecting success:
git config rerere.enabled true &&
>world &&
git add world &&
test_tick &&
git commit -m initial &&
echo hello >world &&
test_tick &&
git commit -a -m hello &&
git checkout -b side HEAD^ &&
echo goodbye >world &&
test_tick &&
git commit -a -m goodbye &&
git checkout master
done.
commit f0aeb1993f1f89cccff09a60379174fefefa1f3b
Author: A U Thor <author@example.com>
Date: Wed Dec 16 10:48:54 2015 +0000
1
[master (root-commit) 21975ff] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 world
ok 14 - no file/rev ambiguity check inside a bare repo
checking prerequisite: SYMLINKS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# test whether the filesystem supports symbolic links
ln -s x y && test -h y
)
prerequisite SYMLINKS ok
expecting success:
git clone -s .git another &&
ln -s another yetanother &&
(
cd yetanother/.git &&
git show -s HEAD
)
ok 1 - git read-tree -u -m: added submodule creates empty directory
expecting success:
prolog &&
reset_work_tree_to no_submodule &&
(
cd submodule_update &&
mkdir sub1 &&
git branch -t add_sub1 origin/add_sub1 &&
$command add_sub1 &&
test_superproject_content origin/add_sub1 &&
test_dir_is_empty sub1 &&
git submodule update --init --recursive &&
test_submodule_content sub1 origin/add_sub1
)
[master 02943d2] hello
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Cloning into 'another'...
Switched to a new branch 'side'
done.
[side 5611ff9] goodbye
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'master'
ok 1 - setup
commit f0aeb1993f1f89cccff09a60379174fefefa1f3b
Author: A U Thor <author@example.com>
Date: Wed Dec 16 10:48:54 2015 +0000
1
ok 15 - detection should not be fooled by a symlink
expecting success:
rm -rf .git/rr-cache &&
"$SHELL_PATH" "$TEST_DIRECTORY/../contrib/workdir/git-new-workdir" . work &&
(
cd work &&
test_must_fail git merge side &&
git rerere status >actual &&
echo world >expect &&
test_cmp expect actual
)
# passed all 15 test(s)
1..15
ok 1 - setup
Cloning into 'submodule_update'...
expecting success:
git add large1 huge large2 &&
# make sure we got a single packfile and no loose objects
bad= count=0 idx= &&
for p in .git/objects/pack/pack-*.pack
do
count=$(( $count + 1 ))
if test -f "$p" && idx=${p%.pack}.idx && test -f "$idx"
then
continue
fi
bad=t
done &&
test -z "$bad" &&
test $count = 1 &&
cnt=$(git show-index <"$idx" | wc -l) &&
test $cnt = 2 &&
for l in .git/objects/??/??????????????????????????????????????
do
test -f "$l" || continue
bad=t
done &&
test -z "$bad" &&
# attempt to add another copy of the same
git add large3 &&
bad= count=0 &&
for p in .git/objects/pack/pack-*.pack
do
count=$(( $count + 1 ))
if test -f "$p" && idx=${p%.pack}.idx && test -f "$idx"
then
continue
fi
bad=t
done &&
test -z "$bad" &&
test $count = 1
*** t1051-large-conversion.sh ***
done.
Recorded preimage for 'world'
Merging:
02943d2 hello
virtual side
found 1 common ancestor:
21975ff initial
Auto-merging world
CONFLICT (content): Merge conflict in world
Automatic merge failed; fix conflicts and then commit the result.
Switched to a new branch 'no_submodule'
Branch no_submodule set up to track remote branch no_submodule from origin.
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1051-large-conversion/.git/
ok 2 - rerere in workdir
checking known breakage:
rm -rf .git/rr-cache &&
"$SHELL_PATH" "$TEST_DIRECTORY/../contrib/workdir/git-new-workdir" . krow &&
(
cd krow &&
rm -f .git/rr-cache &&
ln -s ../.git/rr-cache .git/rr-cache &&
test_must_fail git merge side &&
git rerere status >actual &&
echo world >expect &&
test_cmp expect actual
)
expecting success:
printf "\$Id: foo\$\\r\\n" >small &&
cat small small >large &&
git config core.bigfilethreshold 20 &&
git config filter.test.clean "sed s/.*/CLEAN/"
ok 1 - setup input tests
expecting success:
test_config core.autocrlf true &&
check_input
Branch add_sub1 set up to track remote branch add_sub1 from origin.
ok 2 - autocrlf=true converts on input
expecting success:
set_attr eol=crlf &&
check_input
fatal: Could not create directory .git/rr-cache
Merging:
02943d2 hello
virtual side
found 1 common ancestor:
21975ff initial
Auto-merging world
CONFLICT (content): Merge conflict in world
fatal: Could not create directory .git/rr-cache
not ok 3 - rerere in workdir (relative) # TODO known breakage
# still have 1 known breakage(s)
# passed all remaining 2 test(s)
1..3
ok 3 - eol=crlf converts on input
expecting success:
set_attr ident &&
check_input
*** t1060-object-corruption.sh ***
ok 4 - ident converts on input
expecting success:
set_attr filter=test &&
check_input
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1060-object-corruption/.git/
expecting success:
git init bit-error &&
(
cd bit-error &&
test_commit content &&
corrupt_byte HEAD:content.t 10
)
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1060-object-corruption/bit-error/.git/
Submodule 'sub1' (/«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.) registered for path 'sub1'
ok 5 - user-defined filters convert on input
expecting success:
echo "\$Id\$" >small &&
cat small small >large &&
git add small large &&
git config core.bigfilethreshold 7 &&
git config filter.test.smudge "sed s/.*/SMUDGE/"
[master (root-commit) 0df6d69] content
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 content.t
ok 6 - setup output tests
expecting success:
test_config core.autocrlf true &&
check_output
Cloning into 'sub1'...
1+0 records in
1+0 records out
1 byte (1 B) copied, 0.000453 s, 2.2 kB/s
ok 1 - setup corrupt repo
expecting success:
git init missing &&
(
cd missing &&
test_commit content &&
rm -f "$(obj_to_file HEAD:content.t)"
)
ok 7 - autocrlf=true converts on output
expecting success:
set_attr eol=crlf &&
check_output
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1060-object-corruption/missing/.git/
done.
ok 8 - eol=crlf converts on output
expecting success:
set_attr filter=test &&
check_output
[master (root-commit) 0df6d69] content
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 content.t
ok 9 - user-defined filters convert on output
expecting success:
set_attr ident &&
rm -f small large &&
git checkout small large &&
sed -n "s/Id: .*/Id: SHA/p" <small >small.clean &&
head -n 1 large >large.head &&
sed -n "s/Id: .*/Id: SHA/p" <large.head >large.clean &&
test_cmp small.clean large.clean
ok 2 - setup repo with missing object
expecting success:
git init misnamed &&
(
cd misnamed &&
test_commit content &&
good=$(obj_to_file HEAD:content.t) &&
blob=$(echo corrupt | git hash-object -w --stdin) &&
bad=$(obj_to_file $blob) &&
rm -f "$good" &&
mv "$bad" "$good"
)
ok 10 - ident converts on output
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1060-object-corruption/misnamed/.git/
# passed all 10 test(s)
1..10
*** t1090-sparse-checkout-scope.sh ***
Submodule path 'sub1': checked out '58630c04cd08e6914ad0ab5a3126bcfb71a3e6ca'
[master (root-commit) 0df6d69] content
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 content.t
ok 2 - add a large file or two
expecting success:
large1=$(git rev-parse :large1) &&
git update-index --add --cacheinfo 100644 $large1 another &&
git checkout another &&
test_cmp large1 another
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1090-sparse-checkout-scope/.git/
expecting success:
echo "initial" >a &&
echo "initial" >b &&
echo "initial" >c &&
git add a b c &&
git commit -m "initial commit"
ok 3 - setup repo with misnamed object
expecting success:
(
cd bit-error &&
test_must_fail git cat-file blob HEAD:content.t
)
error: inflate: data stream error (invalid distance too far back)
error: unable to unpack d95f3ad14dee633a758d2e331151e950dd13e4ed header
error: inflate: data stream error (invalid distance too far back)
error: unable to unpack d95f3ad14dee633a758d2e331151e950dd13e4ed header
error: inflate: data stream error (invalid distance too far back)
fatal: loose object d95f3ad14dee633a758d2e331151e950dd13e4ed (stored in .git/objects/d9/5f3ad14dee633a758d2e331151e950dd13e4ed) is corrupt
ok 4 - streaming a corrupt blob fails
expecting success:
(
cd bit-error &&
rm -f content.t &&
test_must_fail git read-tree --reset -u HEAD
)
[master (root-commit) 0f1a731] initial commit
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 a
create mode 100644 b
create mode 100644 c
ok 1 - setup
expecting success:
git checkout -b feature &&
echo "modified" >b &&
echo "modified" >c &&
git add b c &&
git commit -m "modification"
error: inflate: data stream error (invalid distance too far back)
error: unable to unpack d95f3ad14dee633a758d2e331151e950dd13e4ed header
error: inflate: data stream error (invalid distance too far back)
error: inflate: data stream error (invalid distance too far back)
fatal: loose object d95f3ad14dee633a758d2e331151e950dd13e4ed (stored in .git/objects/d9/5f3ad14dee633a758d2e331151e950dd13e4ed) is corrupt
ok 5 - read-tree -u detects bit-errors in blobs
ok 2 - git read-tree -u -m: added submodule leaves existing empty directory alone
expecting success:
(
cd missing &&
rm -f content.t &&
test_must_fail git read-tree --reset -u HEAD
)
expecting success:
prolog &&
reset_work_tree_to no_submodule &&
(
cd submodule_update &&
git branch -t add_sub1 origin/add_sub1 &&
>sub1 &&
test_must_fail $command add_sub1 &&
test_superproject_content origin/no_submodule &&
test_must_be_empty sub1
)
Switched to a new branch 'feature'
error: unable to read sha1 file of content.t (d95f3ad14dee633a758d2e331151e950dd13e4ed)
ok 6 - read-tree -u detects missing objects
expecting success:
test_must_fail git clone --no-local --bare bit-error corrupt-transport
Cloning into bare repository 'corrupt-transport'...
[feature 16b7b31] modification
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
ok 2 - create feature branch
expecting success:
git config --local --bool core.sparsecheckout true &&
echo "!/*" >.git/info/sparse-checkout &&
echo "/a" >>.git/info/sparse-checkout &&
echo "/c" >>.git/info/sparse-checkout &&
git checkout master &&
test_path_is_file a &&
test_path_is_missing b &&
test_path_is_file c
remote: error: inflate: data stream error (invalid distance too far back)
remote: error: unable to unpack d95f3ad14dee633a758d2e331151e950dd13e4ed header
remote: error: inflate: data stream error (invalid distance too far back)
remote: fatal: loose object d95f3ad14dee633a758d2e331151e950dd13e4ed (stored in ./objects/d9/5f3ad14dee633a758d2e331151e950dd13e4ed) is corrupt
Switched to branch 'master'
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed
ok 3 - perform sparse checkout of master
expecting success:
git merge feature &&
test_path_is_file a &&
test_path_is_missing b &&
test_path_is_file c &&
test "$(cat c)" = "modified"
ok 3 - checkout a large file
expecting success:
test_create_repo mid &&
(
cd mid &&
git config core.bigfilethreshold 64k &&
git config pack.packsizelimit 256k &&
# mid1 and mid2 will fit within 256k limit but
# appending mid3 will bust the limit and will
# result in a separate packfile.
test-genrandom "a" $(( 66 * 1024 )) >mid1 &&
test-genrandom "b" $(( 80 * 1024 )) >mid2 &&
test-genrandom "c" $(( 128 * 1024 )) >mid3 &&
git add mid1 mid2 mid3 &&
count=0
for pi in .git/objects/pack/pack-*.idx
do
test -f "$pi" && count=$(( $count + 1 ))
done &&
test $count = 2 &&
(
git hash-object --stdin <mid1
git hash-object --stdin <mid2
git hash-object --stdin <mid3
) |
sort >expect &&
for pi in .git/objects/pack/pack-*.idx
do
git show-index <"$pi"
done |
sed -e "s/^[0-9]* \([0-9a-f]*\) .*/\1/" |
sort >actual &&
test_cmp expect actual
)
ok 7 - clone --no-local --bare detects corruption
expecting success:
test_must_fail git clone --no-local --bare missing missing-transport
Cloning into bare repository 'missing-transport'...
Updating 0f1a731..16b7b31
Fast-forward
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1050-large/mid/.git/
b | 2 +-
c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Cloning into 'submodule_update'...
ok 4 - merge feature branch into sparse checkout of master
expecting success:
git checkout feature &&
echo "/*" >.git/info/sparse-checkout &&
git checkout master &&
test_path_is_file a &&
test_path_is_file b &&
test_path_is_file c &&
test "$(cat b)" = "modified"
Switched to branch 'feature'
remote: fatal: unable to read d95f3ad14dee633a758d2e331151e950dd13e4ed
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed
ok 8 - clone --no-local --bare detects missing object
expecting success:
test_must_fail git clone --no-local --bare misnamed misnamed-transport
Switched to branch 'master'
ok 5 - return to full checkout of master
Cloning into bare repository 'misnamed-transport'...
done.
# passed all 5 test(s)
1..5
Switched to a new branch 'no_submodule'
Branch no_submodule set up to track remote branch no_submodule from origin.
*** t1100-commit-tree-options.sh ***
fatal: did not receive expected object d95f3ad14dee633a758d2e331151e950dd13e4ed
fatal: index-pack failed
ok 9 - clone --no-local --bare detects misnamed object
expecting success:
test_must_fail git clone --local bit-error corrupt-checkout
Cloning into 'corrupt-checkout'...
Branch add_sub1 set up to track remote branch add_sub1 from origin.
done.
error: Untracked working tree file 'sub1' would be overwritten by merge.
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1100-commit-tree-options/.git/
error: inflate: data stream error (invalid distance too far back)
error: unable to unpack d95f3ad14dee633a758d2e331151e950dd13e4ed header
error: inflate: data stream error (invalid distance too far back)
error: inflate: data stream error (invalid distance too far back)
fatal: loose object d95f3ad14dee633a758d2e331151e950dd13e4ed (stored in .git/objects/d9/5f3ad14dee633a758d2e331151e950dd13e4ed) is corrupt
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
ok 10 - clone --local detects corruption
expecting success:
test_path_is_dir corrupt-checkout/.git
ok 11 - error detected during checkout leaves repo intact
expecting success:
test_must_fail git clone --local missing missing-checkout
Cloning into 'missing-checkout'...
expecting success: git write-tree >treeid
ok 1 - test preparation: write empty tree
expecting success: echo comment text |
GIT_AUTHOR_NAME="Author Name" \
GIT_AUTHOR_EMAIL="author@email" \
GIT_AUTHOR_DATE="2005-05-26 23:00" \
GIT_COMMITTER_NAME="Committer Name" \
GIT_COMMITTER_EMAIL="committer@email" \
GIT_COMMITTER_DATE="2005-05-26 23:30" \
TZ=GMT git commit-tree `cat treeid` >commitid 2>/dev/null
ok 3 - git read-tree -u -m: added submodule doesn't remove untracked unignored file with same name
expecting success:
prolog &&
reset_work_tree_to replace_sub1_with_file &&
(
cd submodule_update &&
git branch -t replace_file_with_sub1 origin/replace_file_with_sub1 &&
$command replace_file_with_sub1 &&
test_superproject_content origin/replace_file_with_sub1 &&
test_dir_is_empty sub1 &&
git submodule update --init --recursive &&
test_submodule_content sub1 origin/replace_file_with_sub1
)
done.
error: unable to read sha1 file of content.t (d95f3ad14dee633a758d2e331151e950dd13e4ed)
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
ok 12 - clone --local detects missing objects
checking known breakage:
test_must_fail git clone --local misnamed misnamed-checkout
Cloning into 'misnamed-checkout'...
done.
ok 2 - construct commit
expecting success: git cat-file commit `cat commitid` >commit
test_must_fail: command succeeded: git clone --local misnamed misnamed-checkout
not ok 13 - clone --local detects misnamed objects # TODO known breakage
Cloning into 'submodule_update'...
ok 3 - read commit
expecting success: test_cmp expected commit
ok 4 - compare commit
expecting success:
test_tick &&
echo comment text |
git commit-tree $(cat treeid) >commitid &&
echo comment text |
git commit-tree $(cat treeid) -p $(cat commitid) >childid-1 &&
echo comment text |
git commit-tree -p $(cat commitid) $(cat treeid) >childid-2 &&
test_cmp childid-1 childid-2 &&
git commit-tree $(cat treeid) -m foo >childid-3 &&
git commit-tree -m foo $(cat treeid) >childid-4 &&
test_cmp childid-3 childid-4
# still have 1 known breakage(s)
# passed all remaining 12 test(s)
1..13
done.
Switched to a new branch 'replace_sub1_with_file'
Branch replace_sub1_with_file set up to track remote branch replace_sub1_with_file from origin.
*** t1200-tutorial.sh ***
ok 5 - flags and then non flags
# passed all 5 test(s)
1..5
t1013-read-tree-submodule.sh: 159: cd: can't cd to sub1
Branch replace_file_with_sub1 set up to track remote branch replace_file_with_sub1 from origin.
*** t1300-repo-config.sh ***
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1200-tutorial/.git/
expecting success:
echo "Hello World" > hello &&
echo "Silly example" > example &&
git update-index --add hello example &&
test blob = "$(git cat-file -t 557db03)"
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1300-repo-config/.git/
ok 1 - blob
expecting success:
test "Hello World" = "$(git cat-file blob 557db03)"
expecting success:
rm -f .git/config
ok 1 - clear default config
ok 2 - blob 557db03
expecting success:
git config core.penguin "little blue" &&
test_cmp expect .git/config
expecting success:
git diff-files -p > diff.output &&
test_cmp diff.expect diff.output
ok 3 - git diff-files -p
ok 2 - initial
expecting success:
git diff > diff.output &&
test_cmp diff.expect diff.output
expecting success:
git config Core.Movie BadPhysics &&
test_cmp expect .git/config
ok 4 - git diff
expecting success:
tree=$(git write-tree 2>/dev/null) &&
test 8988da15d077d4829fc51d8544c097def6644dbb = $tree
ok 3 - mixed case
ok 5 - tree
expecting success:
git config Cores.WhatEver Second &&
test_cmp expect .git/config
expecting success:
test_tick &&
tree=$(git write-tree) &&
commit=$(echo "Initial commit" | git commit-tree $tree) &&
git update-ref HEAD $commit &&
git diff-index -p HEAD > diff.output &&
test_cmp diff.expect diff.output
ok 4 - similar section
ok 4 - packsize limit
expecting success:
git commit -q -m initial &&
echo modified >>large1 &&
git add large1 &&
git commit -q -m modified &&
git diff --raw HEAD^
expecting success:
git config CORE.UPPERCASE true &&
test_cmp expect .git/config
ok 5 - uppercase section
expecting success:
git config core.penguin kingpin !blue
ok 6 - replace with non-match
expecting success:
git config core.penguin "very blue" !kingpin
ok 7 - replace with non-match (actually matching)
expecting success: test_cmp expect .git/config
ok 6 - git diff-index -p HEAD
expecting success:
git diff HEAD > diff.output &&
test_cmp diff.expect diff.output
ok 8 - non-match result
expecting success:
echo Second >expect &&
git config cores.whatever >actual &&
test_cmp expect actual
ok 7 - git diff HEAD
ok 9 - find mixed-case key by canonical name
expecting success:
echo Second >expect &&
git config CoReS.WhAtEvEr >actual &&
test_cmp expect actual
Submodule 'sub1' (/«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.) registered for path 'sub1'
expecting success:
git whatchanged -p --root |
sed -e "1s/^\(.\{7\}\).\{40\}/\1VARIABLE/" \
-e "2,3s/^\(.\{8\}\).*$/\1VARIABLE/" \
> whatchanged.output &&
test_cmp whatchanged.expect whatchanged.output
ok 10 - find mixed-case key by non-canonical name
expecting success:
cat >>.git/config <<-\EOF &&
[section.SubSection]
key = one
[section "SubSection"]
key = two
EOF
echo one >expect &&
git config section.subsection.key >actual &&
test_cmp expect actual &&
echo two >expect &&
git config section.SubSection.key >actual &&
test_cmp expect actual
ok 8 - git whatchanged -p --root
expecting success:
git tag my-first-tag &&
test_cmp .git/refs/heads/master .git/refs/tags/my-first-tag
ok 9 - git tag my-first-tag
expecting success:
git checkout -b mybranch &&
test_cmp .git/refs/heads/master .git/refs/heads/mybranch
ok 11 - subsections are not canonicalized by git-config
expecting success:
git config --unset beta.baz
ok 12 - unset with cont. lines
Switched to a new branch 'mybranch'
M hello
expecting success: test_cmp expect .git/config
ok 10 - git checkout -b mybranch
ok 13 - unset with cont. lines is correct
expecting success:
git branch > branch.output &&
test_cmp branch.expect branch.output
expecting success:
git config --unset-all beta.haha
ok 11 - git branch
expecting success:
git checkout mybranch &&
echo "Work, work, work" >>hello &&
test_tick &&
git commit -m "Some work." -i hello &&
git checkout master &&
echo "Play, play, play" >>hello &&
echo "Lots of fun" >>example &&
test_tick &&
git commit -m "Some fun." -i hello example &&
test_must_fail git merge -m "Merge work in mybranch" mybranch
ok 14 - multiple unset
expecting success:
test_cmp expect .git/config
ok 15 - multiple unset is correct
expecting success:
test_must_fail git config --replace-all beta.haha &&
test_cmp .git/config2 .git/config
Already on 'mybranch'
M hello
Cloning into 'sub1'...
error: wrong number of arguments
usage: git config [<options>]
Config file location
--global use global config file
--system use system config file
--local use repository config file
-f, --file <file> use given config file
--blob <blob-id> read config from given blob object
Action
--get get value: name [value-regex]
--get-all get all values: key [value-regex]
--get-regexp get values for regexp: name-regex [value-regex]
--get-urlmatch get value specific for the URL: section[.var] URL
--replace-all replace all matching variables: name value [value_regex]
--add add a new variable: name value
--unset remove a variable: name [value-regex]
--unset-all remove all matches: name [value-regex]
--rename-section rename section: old-name new-name
--remove-section remove a section: name
-l, --list list all
-e, --edit open an editor
--get-color find the color configured: slot [default]
--get-colorbool find the color setting: slot [stdout-is-tty]
Type
--bool value is "true" or "false"
--int value is decimal number
--bool-or-int value is --bool or --int
--path value is a path (file or directory name)
Other
-z, --null terminate values with NUL byte
--name-only show variable names only
--includes respect include directives on lookup
ok 16 - --replace-all missing value
expecting success:
git config --replace-all beta.haha gamma
ok 17 - --replace-all
expecting success:
test_cmp expect .git/config
[mybranch 9014374] Some work.
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
ok 18 - all replaced
expecting success:
git config beta.haha alpha &&
test_cmp expect .git/config
Switched to branch 'master'
done.
ok 19 - really mean test
expecting success:
git config nextsection.nonewline wow &&
test_cmp expect .git/config
[master ab01a1a] Some fun.
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
ok 20 - really really mean test
expecting success:
echo alpha >expect &&
git config beta.haha >actual &&
test_cmp expect actual
Merging:
ab01a1a Some fun.
virtual mybranch
found 1 common ancestor:
6758fe8 Initial commit
Auto-merging hello
CONFLICT (content): Merge conflict in hello
Automatic merge failed; fix conflicts and then commit the result.
ok 12 - git resolve now fails
ok 21 - get value
expecting success:
git config --unset beta.haha &&
test_cmp expect .git/config
expecting success:
test_tick &&
git commit -m "Merge work in mybranch" -i hello &&
git show-branch --topo-order --more=1 master mybranch \
> show-branch.output &&
test_cmp show-branch.expect show-branch.output
ok 22 - unset
expecting success:
git config nextsection.NoNewLine "wow2 for me" "for me$" &&
test_cmp expect .git/config
[master 062f127] Merge work in mybranch
Author: A U Thor <author@example.com>
ok 23 - multivar
expecting success:
git config --get nextsection.nonewline !for
ok 13 - git show-branch
expecting success:
git checkout mybranch &&
git merge -m "Merge upstream changes." master |
sed -e "1s/[0-9a-f]\{7\}/VARIABLE/g" \
-e "s/^Fast[- ]forward /FASTFORWARD /" >resolve.output
wow
ok 24 - non-match
expecting success:
echo wow >expect &&
git config --get nextsection.nonewline !for >actual &&
test_cmp expect actual
Switched to branch 'mybranch'
ok 25 - non-match value
expecting success:
echo "wow2 for me" >expect &&
git config --get nextsection.nonewline >actual &&
test_cmp expect actual
Submodule path 'sub1': checked out '58630c04cd08e6914ad0ab5a3126bcfb71a3e6ca'
ok 26 - multi-valued get returns final one
expecting success:
cat >expect <<-\EOF &&
wow
wow2 for me
EOF
git config --get-all nextsection.nonewline >actual &&
test_cmp expect actual
ok 14 - git resolve
expecting success:
test_i18ncmp resolve.expect resolve.output
ok 15 - git resolve output
ok 27 - multi-valued get-all returns all
expecting success:
git show-branch --topo-order master mybranch > show-branch2.output &&
test_cmp show-branch2.expect show-branch2.output
expecting success:
git config nextsection.nonewline "wow3" "wow$" &&
test_cmp expect .git/config
ok 28 - multivar replace
expecting success:
test_must_fail git config --unset nextsection.nonewline
ok 16 - git show-branch (part 2)
expecting success:
git show-branch --topo-order --more=2 master mybranch \
> show-branch3.output &&
test_cmp show-branch3.expect show-branch3.output
warning: nextsection.nonewline has multiple values
ok 29 - ambiguous unset
expecting success:
test_must_fail git config --unset somesection.nonewline
ok 30 - invalid unset
expecting success:
git config --unset nextsection.nonewline "wow3$" &&
test_cmp expect .git/config
ok 17 - git show-branch (part 3)
expecting success:
git checkout mybranch &&
git reset --hard master^2 &&
git checkout master &&
git reset --hard master^
ok 31 - multivar unset
expecting success: test_must_fail git config inval.2key blabla
Already on 'mybranch'
error: invalid key: inval.2key
ok 32 - invalid key
expecting success: git config 123456.a123 987
HEAD is now at 9014374 Some work.
ok 33 - correct key
expecting success:
git config Version.1.2.3eX.Alpha beta
ok 34 - hierarchical section
ok 4 - git read-tree -u -m: replace tracked file with submodule creates empty directory
expecting success:
prolog &&
reset_work_tree_to replace_sub1_with_directory &&
(
cd submodule_update &&
git branch -t replace_directory_with_sub1 origin/replace_directory_with_sub1 &&
$command replace_directory_with_sub1 &&
test_superproject_content origin/replace_directory_with_sub1 &&
test_dir_is_empty sub1 &&
git submodule update --init --recursive &&
test_submodule_content sub1 origin/replace_directory_with_sub1
)
Switched to branch 'master'
expecting success:
test_cmp expect .git/config
ok 35 - hierarchical section value
expecting success:
git config --list > output &&
test_cmp expect output
HEAD is now at ab01a1a Some fun.
:100644 100644 6cef6d8... 171a2cf... M large1
ok 18 - rewind to "Some fun." and "Some work."
ok 36 - working --list
ok 5 - diff --raw
expecting success:
git diff --stat HEAD^ HEAD
expecting success:
git show-branch --topo-order > show-branch4.output &&
test_cmp show-branch4.expect show-branch4.output
expecting success:
git --git-dir=nonexistent config --list >output &&
test_cmp expect output
large1 | Bin 2000000 -> 2000009 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
ok 6 - diff --stat
expecting success:
git diff HEAD^ HEAD >actual &&
grep "Binary files.*differ" actual
ok 37 - --list without repo produces empty output
expecting success:
git config --name-only --list >output &&
test_cmp expect output
ok 19 - git show-branch (part 4)
expecting success:
mb=$(git merge-base HEAD mybranch) &&
git name-rev --name-only --tags $mb > name-rev.output &&
test "my-first-tag" = $(cat name-rev.output) &&
git read-tree -m -u $mb HEAD mybranch
ok 38 - --name-only --list
Binary files a/large1 and b/large1 differ
ok 7 - diff
expecting success:
git diff --cached HEAD^ >actual &&
grep "Binary files.*differ" actual
expecting success:
git config --get-regexp in >output &&
test_cmp expect output
ok 39 - --get-regexp
expecting success:
git config --name-only --get-regexp in >output &&
test_cmp expect output
Binary files a/large1 and b/large1 differ
ok 8 - diff --cached
expecting success:
git hash-object large1
ok 20 - manual merge
expecting success:
git ls-files --stage > ls-files.output &&
test_cmp ls-files.expect ls-files.output
ok 40 - --name-only --get-regexp
expecting success:
git config --add nextsection.nonewline "wow4 for you" &&
git config --get-all nextsection.nonewline > output &&
test_cmp expect output
Cloning into 'submodule_update'...
ok 21 - git ls-files --stage
expecting success:
git ls-files --unmerged > ls-files-unmerged.output &&
test_cmp ls-files-unmerged.expect ls-files-unmerged.output
ok 41 - --add
ok 22 - git ls-files --unmerged
expecting success:
git config --get novalue.variable ^$
expecting success:
test_must_fail git merge-index git-merge-one-file hello
ok 42 - get variable with no value
expecting success:
git config --get emptyvalue.variable ^$
ok 43 - get variable with empty value
expecting success:
git config --get-regexp novalue > output &&
test_cmp expect output
done.
ok 44 - get-regexp variable with no value
expecting success:
git config --bool --get-regexp novalue > output &&
test_cmp expect output
ok 45 - get-regexp --bool variable with no value
expecting success:
git config --get-regexp emptyvalue > output &&
test_cmp expect output
ok 46 - get-regexp variable with empty value
expecting success:
git config --bool novalue.variable > output &&
test_cmp expect output
Auto-merging hello
Switched to a new branch 'replace_sub1_with_directory'
Branch replace_sub1_with_directory set up to track remote branch replace_sub1_with_directory from origin.
ok 47 - get bool variable with no value
expecting success:
git config --bool emptyvalue.variable > output &&
test_cmp expect output
171a2cf5cd75bd8d405266c986591716925e9712
ok 9 - hash-object
expecting success:
git cat-file blob :large1 >/dev/null
ok 48 - get bool variable with empty value
expecting success:
test_must_fail git config >output 2>&1 &&
test_i18ngrep usage output
ERROR: content conflict in hello
fatal: merge program failed
ok 23 - git-merge-index
expecting success:
git ls-files --stage > ls-files.output2 &&
test_cmp ls-files.expect ls-files.output2
usage: git config [<options>]
ok 24 - git ls-files --stage (part 2)
ok 49 - no arguments, but no crash
expecting success: git repack
error: 8ed2e6719f8484ce01fa3ce133fe42d25c2441b8^{commit}: expected commit type, but the object dereferences to tree type
fatal: Needed a single revision
ok 10 - cat-file a large file
expecting success:
git tag -m largefile largefiletag :large1 &&
git cat-file blob largefiletag >/dev/null
expecting success:
git config a.x y &&
test_cmp expect .git/config
ok 50 - new section is partial match of another
Branch replace_directory_with_sub1 set up to track remote branch replace_directory_with_sub1 from origin.
expecting success:
git config b.x y &&
git config a.b c &&
test_cmp expect .git/config
ok 11 - cat-file a large file from a tag
expecting success:
git show :large1 >/dev/null
ok 51 - new variable inserts into proper section
expecting success:
test_must_fail git config --file non-existing-config -l
fatal: unable to read config file 'non-existing-config': No such file or directory
ok 52 - alternative --file (non-existing file should fail)
expecting success:
GIT_CONFIG=other-config git config --list >output &&
test_cmp expect output
ok 53 - alternative GIT_CONFIG
expecting success:
git config --file other-config --list >output &&
test_cmp expect output
ok 54 - alternative GIT_CONFIG (--file)
expecting success:
git config --file - --list <other-config >output &&
test_cmp expect output
ok 25 - git repack
expecting success: git prune-packed
ok 55 - alternative GIT_CONFIG (--file=-)
expecting success:
test_must_fail git config --file - some.value foo
ok 12 - git-show a large file
expecting success:
git clone file://"$(pwd)"/.git foo &&
GIT_DIR=non-existent git index-pack --strict --verify foo/.git/objects/pack/*.pack
fatal: writing to stdin is not supported
Cloning into 'foo'...
ok 56 - setting a value in stdin is an error
expecting success:
test_must_fail git config --file - --edit
ok 26 - git prune-packed
expecting success:
git prune && # Remove conflict marked blobs
test $(find .git/objects/[0-9a-f][0-9a-f] -type f -print 2>/dev/null | wc -l) = 0
fatal: editing stdin is not supported
ok 57 - editing stdin is an error
expecting success:
mkdir x &&
(
cd x &&
echo strasse >expect &&
git config --get --file ../other-config ein.bahn >actual &&
test_cmp expect actual
)
ok 58 - refer config from subdirectory
expecting success:
(
cd x &&
git config --file=../other-config --get ein.bahn >actual &&
test_cmp expect actual
)
ok 27 - -> only packed objects
# passed all 27 test(s)
1..27
ok 59 - refer config from subdirectory via --file
expecting success:
git config --file=other-config anwohner.park ausweis &&
test_cmp expect other-config
ok 60 - --set in alternative file
expecting success:
git config --rename-section branch.eins branch.zwei
*** t1301-shared-repo.sh ***
ok 61 - rename section
expecting success:
test_cmp expect .git/config
ok 62 - rename succeeded
expecting success:
test_must_fail git config --rename-section \
branch."world domination" branch.drei
fatal: No such section!
ok 63 - rename non-existing section
expecting success:
test_cmp expect .git/config
ok 64 - rename succeeded
expecting success:
git config --rename-section branch."1 234 blabl/a" branch.drei
ok 65 - rename another section
Submodule 'sub1' (/«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.) registered for path 'sub1'
expecting success:
test_cmp expect .git/config
ok 66 - rename succeeded
expecting success:
git config --rename-section branch.vier branch.zwei
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1301-shared-repo/.git/
ok 67 - rename a section with a var on the same line
expecting success:
test_cmp expect .git/config
ok 68 - rename succeeded
expecting success:
test_must_fail git config --rename-section branch.zwei ""
expecting success:
test_when_finished "rm -rf sub" &&
mkdir sub && (
cd sub &&
test_must_fail git init --shared=0400
)
error: invalid section name:
ok 69 - renaming empty section name is rejected
expecting success:
test_must_fail git config --rename-section branch.zwei "bogus name"
fatal: Problem with core.sharedRepository filemode value (0400).
The owner of files must always have read and write permissions.
error: invalid section name: bogus name
ok 70 - renaming to bogus section is rejected
ok 1 - shared = 0400 (faulty permission u-w)
expecting success:
git config --remove-section branch.zwei
expecting success:
mkdir sub && (
cd sub &&
umask $u &&
git init --shared=1 &&
test 1 = "$(git config core.sharedrepository)"
) &&
actual=$(ls -l sub/.git/HEAD) &&
case "$actual" in
-rw-rw-r--*)
: happy
;;
*)
echo Oops, .git/HEAD is not 0664 but $actual
false
;;
esac
ok 71 - remove section
expecting success:
test_cmp expect .git/config
ok 72 - section was removed properly
expecting success:
rm -f .git/config &&
git config gitcvs.enabled true &&
git config gitcvs.ext.dbname %Ggitcvs1.%a.%m.sqlite &&
git config gitcvs.dbname %Ggitcvs2.%a.%m.sqlite &&
test_cmp expect .git/config
Initialized empty shared Git repository in /«PKGBUILDDIR»/t/trash directory.t1301-shared-repo/sub/.git/
ok 2 - shared=1 does not clear bits preset by umask 002
Cloning into 'sub1'...
ok 73 - section ending
expecting success:
mkdir sub && (
cd sub &&
umask $u &&
git init --shared=1 &&
test 1 = "$(git config core.sharedrepository)"
) &&
actual=$(ls -l sub/.git/HEAD) &&
case "$actual" in
-rw-rw-r--*)
: happy
;;
*)
echo Oops, .git/HEAD is not 0664 but $actual
false
;;
esac
expecting success:
git config kilo.gram 1k &&
git config mega.ton 1m &&
echo 1024 >expect &&
echo 1048576 >>expect &&
git config --int --get kilo.gram >actual &&
git config --int --get mega.ton >>actual &&
test_cmp expect actual
Initialized empty shared Git repository in /«PKGBUILDDIR»/t/trash directory.t1301-shared-repo/sub/.git/
done.
ok 74 - numbers
expecting success:
git config giga.watts 121g &&
echo 129922760704 >expect &&
git config --int --get giga.watts >actual &&
test_cmp expect actual
ok 3 - shared=1 does not clear bits preset by umask 022
expecting success:
mkdir sub &&
cd sub &&
git init --shared=all &&
test 2 = $(git config core.sharedrepository)
ok 75 - --int is at least 64 bits
expecting success:
git config aninvalid.unit "1auto" &&
echo 1auto >expect &&
git config aninvalid.unit >actual &&
test_cmp expect actual &&
cat >expect <<-\EOF &&
fatal: bad numeric config value '1auto' for 'aninvalid.unit' in .git/config: invalid unit
EOF
test_must_fail git config --int --get aninvalid.unit 2>actual &&
test_i18ncmp expect actual
Initialized empty shared Git repository in /«PKGBUILDDIR»/t/trash directory.t1301-shared-repo/sub/.git/
ok 4 - shared=all
expecting success:
: > a1 &&
git add a1 &&
test_tick &&
git commit -m a1 &&
umask 0277 &&
git update-server-info &&
actual="$(ls -l .git/info/refs)" &&
case "$actual" in
-r--r--r--*)
: happy
;;
*)
echo Oops, .git/info/refs is not 0444
false
;;
esac
ok 76 - invalid unit
expecting success:
git config bool.true1 01 &&
git config bool.true2 -1 &&
git config bool.true3 YeS &&
git config bool.true4 true &&
git config bool.false1 000 &&
git config bool.false2 "" &&
git config bool.false3 nO &&
git config bool.false4 FALSE &&
rm -f result &&
for i in 1 2 3 4
do
git config --bool --get bool.true$i >>result
git config --bool --get bool.false$i >>result
done &&
test_cmp expect result
[master (root-commit) a2bd363] a1
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a1
Submodule path 'sub1': checked out '58630c04cd08e6914ad0ab5a3126bcfb71a3e6ca'
ok 5 - update-server-info honors core.sharedRepository
expecting success:
rm -f .git/info/refs &&
git update-server-info &&
actual="$(modebits .git/info/refs)" &&
verbose test "x$actual" = "x-$y"
ok 6 - shared = 0660 (r--r-----) ro
expecting success:
rm -f .git/info/refs &&
git update-server-info &&
actual="$(modebits .git/info/refs)" &&
verbose test "x$actual" = "x-$x"
ok 7 - shared = 0660 (rw-rw----) rw
ok 5 - git read-tree -u -m: replace directory with submodule
expecting success:
prolog &&
reset_work_tree_to add_sub1 &&
(
cd submodule_update &&
git branch -t remove_sub1 origin/remove_sub1 &&
$command remove_sub1 &&
test_superproject_content origin/remove_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
expecting success:
rm -f .git/info/refs &&
git update-server-info &&
actual="$(modebits .git/info/refs)" &&
verbose test "x$actual" = "x-$y"
ok 77 - bool
expecting success:
git config bool.nobool foobar &&
test_must_fail git config --bool --get bool.nobool
ok 8 - shared = 0640 (r--r-----) ro
expecting success:
rm -f .git/info/refs &&
git update-server-info &&
actual="$(modebits .git/info/refs)" &&
verbose test "x$actual" = "x-$x"
fatal: bad numeric config value 'foobar' for 'bool.nobool' in .git/config: invalid unit
ok 78 - invalid bool (--get)
expecting success:
test_must_fail git config --bool bool.nobool foobar
fatal: bad numeric config value 'foobar' for 'bool.nobool': invalid unit
ok 79 - invalid bool (set)
expecting success:
rm -f .git/config &&
git config --bool bool.true1 01 &&
git config --bool bool.true2 -1 &&
git config --bool bool.true3 YeS &&
git config --bool bool.true4 true &&
git config --bool bool.false1 000 &&
git config --bool bool.false2 "" &&
git config --bool bool.false3 nO &&
git config --bool bool.false4 FALSE &&
test_cmp expect .git/config
ok 9 - shared = 0640 (rw-r-----) rw
Cloning into 'submodule_update'...
expecting success:
rm -f .git/info/refs &&
git update-server-info &&
actual="$(modebits .git/info/refs)" &&
verbose test "x$actual" = "x-$y"
done.
ok 10 - shared = 0600 (r--------) ro
expecting success:
rm -f .git/info/refs &&
git update-server-info &&
actual="$(modebits .git/info/refs)" &&
verbose test "x$actual" = "x-$x"
ok 13 - index-pack
expecting success:
git repack -ad
ok 80 - set --bool
Switched to a new branch 'add_sub1'
Branch add_sub1 set up to track remote branch add_sub1 from origin.
ok 11 - shared = 0600 (rw-------) rw
expecting success:
rm -f .git/config &&
git config --int int.val1 01 &&
git config --int int.val2 -1 &&
git config --int int.val3 5m &&
test_cmp expect .git/config
expecting success:
rm -f .git/info/refs &&
git update-server-info &&
actual="$(modebits .git/info/refs)" &&
verbose test "x$actual" = "x-$y"
ok 81 - set --int
expecting success:
cat >.git/config <<-\EOF &&
[bool]
true1
true2 = true
false = false
[int]
int1 = 0
int2 = 1
int3 = -1
EOF
cat >expect <<-\EOF &&
true
true
false
0
1
-1
EOF
{
git config --bool-or-int bool.true1 &&
git config --bool-or-int bool.true2 &&
git config --bool-or-int bool.false &&
git config --bool-or-int int.int1 &&
git config --bool-or-int int.int2 &&
git config --bool-or-int int.int3
} >actual &&
test_cmp expect actual
ok 12 - shared = 0666 (r--r--r--) ro
expecting success:
rm -f .git/info/refs &&
git update-server-info &&
actual="$(modebits .git/info/refs)" &&
verbose test "x$actual" = "x-$x"
ok 13 - shared = 0666 (rw-rw-rw-) rw
expecting success:
rm -f .git/info/refs &&
git update-server-info &&
actual="$(modebits .git/info/refs)" &&
verbose test "x$actual" = "x-$y"
ok 82 - get --bool-or-int
expecting success:
rm -f .git/config &&
git config --bool-or-int bool.true1 true &&
git config --bool-or-int bool.false1 false &&
git config --bool-or-int bool.true2 yes &&
git config --bool-or-int bool.false2 no &&
git config --bool-or-int int.int1 0 &&
git config --bool-or-int int.int2 1 &&
git config --bool-or-int int.int3 -1 &&
test_cmp expect .git/config
ok 14 - shared = 0664 (r--r--r--) ro
expecting success:
rm -f .git/info/refs &&
git update-server-info &&
actual="$(modebits .git/info/refs)" &&
verbose test "x$actual" = "x-$x"
ok 15 - shared = 0664 (rw-rw-r--) rw
expecting success:
rm -f .git/info/refs &&
test_unconfig core.sharedrepository &&
umask 002 &&
git update-server-info &&
echo "-rw-rw-r--" >expect &&
modebits .git/info/refs >actual &&
test_cmp expect actual
ok 83 - set --bool-or-int
ok 14 - repack
expecting success:
SHA1=$(git hash-object huge) &&
test_create_repo loose &&
echo $SHA1 | git pack-objects --stdout |
GIT_ALLOC_LIMIT=0 GIT_DIR=loose/.git git unpack-objects &&
echo $SHA1 | GIT_DIR=loose/.git git pack-objects pack &&
test_create_repo packed &&
mv pack-* packed/.git/objects/pack &&
GIT_DIR=packed/.git git cat-file blob $SHA1 >actual &&
test_cmp huge actual
expecting success:
rm -f .git/config &&
git config --path path.home "~/" &&
git config --path path.normal "/dev/null" &&
git config --path path.trailingtilde "foo~" &&
test_cmp expect .git/config
Submodule 'sub1' (/«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.) registered for path 'sub1'
ok 16 - info/refs respects umask in unshared repo
expecting success:
umask 077 &&
git config core.sharedRepository group &&
git reflog expire --all &&
actual="$(ls -l .git/logs/refs/heads/master)" &&
case "$actual" in
-rw-rw-*)
: happy
;;
*)
echo Ooops, .git/logs/refs/heads/master is not 0662 [$actual]
false
;;
esac
ok 84 - set --path
expecting success:
git config --get --path path.home > result &&
git config --get --path path.normal >> result &&
git config --get --path path.trailingtilde >> result &&
test_cmp expect result
ok 17 - git reflog expire honors core.sharedRepository
expecting success:
mkdir -p templates/hooks &&
echo update-server-info >templates/hooks/post-update &&
chmod +x templates/hooks/post-update &&
echo : >random-file &&
mkdir new &&
(
cd new &&
umask 002 &&
git init --shared=0660 --template=../templates &&
>frotz &&
git add frotz &&
git commit -a -m initial &&
git repack
) &&
# List repository files meant to be protected; note that
# COMMIT_EDITMSG does not matter---0mode is not about a
# repository with a work tree.
find new/.git -type f -name COMMIT_EDITMSG -prune -o -print |
xargs ls -ld >actual &&
# Everything must be unaccessible to others
test -z "$(sed -e "/^.......---/d" actual)" &&
# All directories must have either 2770 or 770
test -z "$(sed -n -e "/^drwxrw[sx]---/d" -e "/^d/p" actual)" &&
# post-update hook must be 0770
test -z "$(sed -n -e "/post-update/{
/^-rwxrwx---/d
p
}" actual)" &&
# All files inside objects must be accessible by us
test -z "$(sed -n -e "/objects\//{
/^d/d
/^-r.-r.----/d
p
}" actual)"
ok 85 - get --path
expecting success:
(
unset HOME;
test_must_fail git config --get --path path.home \
>result 2>msg &&
git config --get --path path.normal >>result &&
git config --get --path path.trailingtilde >>result
) &&
grep "[Ff]ailed to expand.*~/" msg &&
test_cmp expect result
Initialized empty shared Git repository in /«PKGBUILDDIR»/t/trash directory.t1301-shared-repo/sub/new/.git/
Cloning into 'sub1'...
fatal: failed to expand user dir in: '~/'
[master (root-commit) e4c5dc6] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 frotz
ok 86 - get --path copes with unset $HOME
expecting success:
echo "[path]bool" >.git/config &&
test_must_fail git config --get --path path.bool
error: Missing value for 'path.bool'
fatal: bad config file line 2 in .git/config
ok 87 - get --path barfs on boolean variable
expecting success:
rm -f .git/config &&
git config quote.leading " test" &&
git config quote.ending "test " &&
git config quote.semicolon "test;test" &&
git config quote.hash "test#test" &&
test_cmp expect .git/config
done.
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1050-large/loose/.git/
ok 88 - quoting
expecting success:
test_must_fail git config "key.with
newline" 123
error: invalid key: key.with
newline
ok 89 - key with newline
expecting success: git config key.sub value.with\\\
newline
ok 90 - value with newline
expecting success:
git config --list > result &&
test_cmp result expect
ok 91 - value continued on next line
expecting success:
git config --null --list | nul_to_q >result &&
echo >>result &&
test_cmp expect result
ok 18 - forced modes
Submodule path 'sub1': checked out '58630c04cd08e6914ad0ab5a3126bcfb71a3e6ca'
ok 92 - --null --list
expecting success:
git config --null --get-regexp "val[0-9]" | nul_to_q >result &&
echo >>result &&
test_cmp expect result
# passed all 18 test(s)
1..18
ok 93 - --null --get-regexp
expecting success:
git config section.val "foo bar" &&
echo "foo bar" >expect &&
git config section.val >actual &&
test_cmp expect actual
ok 94 - inner whitespace kept verbatim
checking prerequisite: SYMLINKS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# test whether the filesystem supports symbolic links
ln -s x y && test -h y
)
*** t1302-repo-version.sh ***
prerequisite SYMLINKS ok
expecting success:
ln -s notyet myconfig &&
git config --file=myconfig test.frotz nitfol &&
test -h myconfig &&
test -f notyet &&
test "z$(git config --file=notyet test.frotz)" = znitfol &&
git config --file=myconfig test.xyzzy rezrov &&
test -h myconfig &&
test -f notyet &&
cat >expect <<-\EOF &&
nitfol
rezrov
EOF
{
git config --file=notyet test.frotz &&
git config --file=notyet test.xyzzy
} >actual &&
test_cmp expect actual
Branch remove_sub1 set up to track remote branch remove_sub1 from origin.
warning: unable to rmdir sub1: Directory not empty
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1302-repo-version/.git/
ok 95 - symlinked configuration
expecting success:
test_must_fail git config --file=doesnotexist --list &&
test_must_fail git config --file=doesnotexist test.xyzzy
fatal: unable to read config file 'doesnotexist': No such file or directory
expecting success:
cat >test.patch <<-\EOF &&
diff --git a/test.txt b/test.txt
new file mode 100644
--- /dev/null
+++ b/test.txt
@@ -0,0 +1 @@
+123
EOF
test_create_repo "test" &&
test_create_repo "test2" &&
git config --file=test2/.git/config core.repositoryformatversion 99
ok 96 - nonexistent configuration
expecting success:
ln -s doesnotexist linktonada &&
ln -s linktonada linktolinktonada &&
test_must_fail git config --file=linktonada --list &&
test_must_fail git config --file=linktolinktonada --list
fatal: unable to read config file 'linktonada': No such file or directory
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1302-repo-version/test/.git/
fatal: unable to read config file 'linktolinktonada': No such file or directory
ok 97 - symlink to nonexistent configuration
expecting success:
git config alias.split-cmdline-fix 'echo "' &&
test_must_fail git split-cmdline-fix &&
echo foo > foo &&
git add foo &&
git commit -m 'initial commit' &&
git config branch.master.mergeoptions 'echo "' &&
test_must_fail git merge master
ok 6 - git read-tree -u -m: removed submodule leaves submodule directory and its contents in place
expecting success:
prolog &&
reset_work_tree_to add_sub1 &&
(
cd submodule_update &&
git branch -t remove_sub1 origin/remove_sub1 &&
replace_gitfile_with_git_dir sub1 &&
$command remove_sub1 &&
test_superproject_content origin/remove_sub1 &&
test_git_directory_is_unchanged sub1 &&
test_submodule_content sub1 origin/add_sub1
)
fatal: Bad alias.split-cmdline-fix string: unclosed quote
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1302-repo-version/test2/.git/
ok 1 - setup
expecting success:
echo 0 >expect &&
git config core.repositoryformatversion >actual &&
(
cd test &&
git config core.repositoryformatversion >../actual2
) &&
test_cmp expect actual &&
test_cmp expect actual2
[master (root-commit) 132b1ec] initial commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
ok 2 - gitdir selection on normal repos
expecting success:
# Make sure it would stop at test2, not trash
echo 99 >expect &&
(
cd test2 &&
git config core.repositoryformatversion >../actual
) &&
test_cmp expect actual
warning: Expected git repo version <= 1, found 99
warning: Please upgrade Git
fatal: Bad branch.master.mergeoptions string: unclosed quote
ok 98 - check split_cmdline return
expecting success:
cat >expect <<-\EOF &&
value
value
true
EOF
{
git -c core.name=value config core.name &&
git -c foo.CamelCase=value config foo.camelcase &&
git -c foo.flag config --bool foo.flag
} >actual &&
test_cmp expect actual &&
test_must_fail git -c name=value config core.name
ok 3 - gitdir selection on unsupported repo
expecting success:
git apply --stat test.patch &&
(
cd test &&
git apply --stat ../test.patch
) &&
(
cd test2 &&
git apply --stat ../test.patch
)
test.txt | 1 +
1 file changed, 1 insertion(+)
Cloning into 'submodule_update'...
test.txt | 1 +
1 file changed, 1 insertion(+)
warning: Expected git repo version <= 1, found 99
warning: Please upgrade Git
test.txt | 1 +
1 file changed, 1 insertion(+)
ok 4 - gitdir not required mode
expecting success:
git apply --check --index test.patch &&
(
cd test &&
git apply --check --index ../test.patch
) &&
(
cd test2 &&
test_must_fail git apply --check --index ../test.patch
)
error: key does not contain a section: name
ok 99 - git -c "key=value" support
expecting success:
echo >expect &&
git -c foo.empty= config --path foo.empty >actual &&
test_cmp expect actual
dc5b4c5413c9a2a6ca4f121474e1c9c8ea086153
ok 100 - git -c can represent empty string
expecting success:
test_must_fail git config foo=bar &&
test_must_fail git config foo=.bar &&
test_must_fail git config foo.ba=r &&
test_must_fail git config foo.1bar &&
test_must_fail git config foo."ba
z".bar &&
test_must_fail git config . false &&
test_must_fail git config .foo false &&
test_must_fail git config foo. false &&
test_must_fail git config .foo. false &&
git config foo.bar true &&
git config foo."ba =z".bar false
warning: Expected git repo version <= 1, found 99
warning: Please upgrade Git
fatal: --index outside a repository
ok 5 - gitdir required mode
expecting success:
mkconfig 0 >.git/config &&
check_allow
done.
error: key does not contain a section: foo=bar
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1050-large/packed/.git/
error: invalid key: foo=.bar
ok 6 - allow version=0
expecting success:
mkconfig 1 >.git/config &&
check_allow
error: invalid key: foo.ba=r
ok 7 - allow version=1
expecting success:
mkconfig 1 noop >.git/config &&
check_allow
error: invalid key: foo.1bar
error: invalid key (newline): foo.ba
z.bar
ok 8 - allow version=1 noop
expecting success:
mkconfig 1 no-such-extension >.git/config &&
check_abort
Switched to a new branch 'add_sub1'
Branch add_sub1 set up to track remote branch add_sub1 from origin.
error: key does not contain a section: .
fatal: unknown repository extension: no-such-extension
ok 9 - abort version=1 no-such-extension
expecting success:
mkconfig 0 no-such-extension >.git/config &&
check_allow
error: key does not contain a section: .foo
ok 10 - allow version=0 no-such-extension
expecting success:
mkconfig 1 preciousObjects >.git/config &&
check_allow
error: key does not contain variable name: foo.
error: key does not contain variable name: .foo.
ok 11 - precious-objects allowed
expecting success:
test_must_fail git repack -ad
fatal: cannot delete packs in a precious-objects repo
ok 12 - precious-objects blocks destructive repack
expecting success:
test_commit foo &&
git repack
ok 101 - key sanity-checking
expecting success:
git config alias.checkconfig "-c foo.check=bar config foo.check" &&
echo bar >expect &&
git checkconfig >actual &&
test_cmp expect actual
[master (root-commit) ddd63c9] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
ok 102 - git -c works with aliases of builtins
expecting success:
echo "value with = in it" >expect &&
git -c core.foo="value with = in it" config core.foo >actual &&
test_cmp expect actual
ok 103 - git -c does not split values on equals
expecting success:
test_must_fail git -c core.bare=foo rev-parse
fatal: bad numeric config value 'foo' for 'core.bare': invalid unit
ok 104 - git -c dies on bogus config
expecting success:
test_must_fail git -c "=foo" rev-parse
error: bogus config parameter: =foo
fatal: unable to parse command-line config
ok 105 - git -c complains about empty key
expecting success:
test_must_fail git -c "" rev-parse
error: bogus config parameter:
fatal: unable to parse command-line config
ok 106 - git -c complains about empty key and value
expecting success:
git config -f tmp test.value no &&
echo test.value=yes >expect &&
GIT_EDITOR="echo [test]value=yes >" git config -f tmp --edit &&
git config -f tmp --list >actual &&
test_cmp expect actual
ok 15 - pack-objects with large loose object
expecting success:
git archive --format=tar HEAD >/dev/null
ok 107 - git config --edit works
expecting success:
git config -f tmp test.value no &&
echo test.value=yes >expect &&
test_config core.editor "echo [test]value=yes >" &&
git config -f tmp --edit &&
git config -f tmp --list >actual &&
test_cmp expect actual
Submodule 'sub1' (/«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.) registered for path 'sub1'
ok 13 - other repacks are OK
expecting success:
test_must_fail git prune
fatal: cannot prune in a precious-objects repo
ok 14 - precious-objects blocks prune
expecting success:
git gc
ok 108 - git config --edit respects core.editor
expecting success:
cat >.git/config <<-\EOF &&
# broken section line
[section]
key garbage
EOF
test_must_fail git config --get section.key >actual 2>error &&
grep " line 3 " error
ok 16 - tar achiving
expecting success:
git archive --format=zip -0 HEAD >/dev/null
fatal: bad config file line 3 in .git/config
ok 109 - barf on syntax error
expecting success:
cat >.git/config <<-\EOF &&
# broken section line
[section
key = value
EOF
test_must_fail git config --get section.key >actual 2>error &&
grep " line 2 " error
fatal: bad config file line 2 in .git/config
ok 110 - barf on incomplete section header
expecting success:
cat >.git/config <<-\EOF &&
# broken section line
[section]
key = "value string
EOF
test_must_fail git config --get section.key >actual 2>error &&
grep " line 3 " error
ok 15 - gc runs without complaint
# passed all 15 test(s)
1..15
fatal: bad config file line 3 in .git/config
ok 111 - barf on incomplete string
expecting success:
cat >.git/config <<-\EOF &&
[http]
sslVerify
[http "https://weak.example.com"]
sslVerify = false
cookieFile = /tmp/cookie.txt
EOF
echo true >expect &&
git config --bool --get-urlmatch http.SSLverify https://good.example.com >actual &&
test_cmp expect actual &&
echo false >expect &&
git config --bool --get-urlmatch http.sslverify https://weak.example.com >actual &&
test_cmp expect actual &&
{
echo http.cookiefile /tmp/cookie.txt &&
echo http.sslverify false
} >expect &&
git config --get-urlmatch HTTP https://weak.example.com >actual &&
test_cmp expect actual
Cloning into 'sub1'...
*** t1303-wacky-config.sh ***
ok 112 - urlmatch
checking known breakage:
cat >.git/config <<-\EOF &&
# some generic comment on the configuration file itself
# a comment specific to this "section" section.
[section]
# some intervening lines
# that should also be dropped
key = value
# please be careful when you update the above variable
EOF
cat >expect <<-\EOF &&
# some generic comment on the configuration file itself
EOF
git config --unset section.key &&
test_cmp expect .git/config
done.
ok 17 - zip achiving, store only
expecting success:
git archive --format=zip HEAD >/dev/null
--- expect 2015-12-16 10:49:03.721564768 +0000
+++ .git/config 2015-12-16 10:49:03.741564768 +0000
@@ -1 +1,7 @@
# some generic comment on the configuration file itself
+# a comment specific to this "section" section.
+[section]
+# some intervening lines
+# that should also be dropped
+
+# please be careful when you update the above variable
not ok 113 - unsetting the last key in a section removes header # TODO known breakage
checking known breakage:
cat >.git/config <<-\EOF &&
[section]
EOF
q_to_tab >expect <<-\EOF &&
[section]
Qkey = value
EOF
git config section.key value &&
test_cmp expect .git/config
--- expect 2015-12-16 10:49:03.765564768 +0000
+++ .git/config 2015-12-16 10:49:03.785564768 +0000
@@ -1,2 +1,3 @@
[section]
+[section]
key = value
not ok 114 - adding a key into an empty section reuses header # TODO known breakage
expecting success:
chmod 0600 .git/config &&
git config imap.pass Hunter2 &&
perl -e \
"die q(badset) if ((stat(q(.git/config)))[2] & 07777) != 0600" &&
git config --rename-section imap pop &&
perl -e \
"die q(badrename) if ((stat(q(.git/config)))[2] & 07777) != 0600"
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1303-wacky-config/.git/
expecting success:
setup &&
git config section.key bar &&
check section.key bar
ok 115 - preserves existing permissions
ok 1 - modify same key
expecting success:
setup &&
git config section.other bar &&
check section.key foo &&
check section.other bar
# still have 2 known breakage(s)
# passed all remaining 113 test(s)
1..115
Submodule path 'sub1': checked out '58630c04cd08e6914ad0ab5a3126bcfb71a3e6ca'
*** t1304-default-acl.sh ***
ok 2 - add key in same section
expecting success:
setup &&
git config section2.key bar &&
check section.key foo &&
check section2.key bar
ok 3 - add key in different section
expecting success:
git config "$SECTION" bar &&
check "$SECTION" bar
ok 4 - make sure git config escapes section names properly
Branch remove_sub1 set up to track remote branch remove_sub1 from origin.
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1304-default-acl/.git/
expecting success:
setup &&
git config section.key "$LONG_VALUE" &&
check section.key "$LONG_VALUE"
expecting success:
if setfacl -m d:m:rwx -m u:root:rwx . &&
getfacl . | grep user:root:rwx &&
touch should-have-readable-acl &&
getfacl should-have-readable-acl | egrep "mask::?rw-"
then
test_set_prereq SETFACL
fi
t1304-default-acl.sh: 4: eval: setfacl: not found
ok 1 - checking for a working acl setup
skipping test: Setup test repo
setfacl -m d:u::rwx,d:g::---,d:o:---,d:m:rwx $dirs_to_set &&
setfacl -m m:rwx $dirs_to_set &&
setfacl -m u:root:rwx $dirs_to_set &&
setfacl -m d:u:"$LOGNAME":rwx $dirs_to_set &&
setfacl -m d:u:root:rwx $dirs_to_set &&
touch file.txt &&
git add file.txt &&
git commit -m "init"
ok 2 # skip Setup test repo (missing SETFACL)
ok 5 - do not crash on special long config line
expecting success:
setup_many &&
git config --get-all section.key >actual &&
test_line_count = 3126 actual
skipping test: Objects creation does not break ACLs with restrictive umask
# SHA1 for empty blob
check_perms_and_acl .git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
ok 3 # skip Objects creation does not break ACLs with restrictive umask (missing SETFACL)
skipping test: git gc does not break ACLs with restrictive umask
git gc &&
check_perms_and_acl .git/objects/pack/*.pack
ok 4 # skip git gc does not break ACLs with restrictive umask (missing SETFACL)
# passed all 4 test(s)
1..4
*** t1305-config-include.sh ***
warning: unable to rmdir sub1: Directory not empty
ok 6 - get many entries
expecting success:
setup_many &&
git config --get-regexp "sec.*ke." >actual &&
test_line_count = 3126 actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1305-config-include/.git/
expecting success:
echo "[test]one = 1" >one &&
echo "[include]path = \"$(pwd)/one\"" >.gitconfig &&
echo 1 >expect &&
git config test.one >actual &&
test_cmp expect actual
ok 1 - include file by absolute path
expecting success:
echo "[test]one = 1" >one &&
echo "[include]path = one" >.gitconfig &&
echo 1 >expect &&
git config test.one >actual &&
test_cmp expect actual
ok 7 - get many entries by regex
expecting success:
setup_many &&
git config --add section.key bar &&
check_regex section.key "b.*r" bar &&
git config section.key beer "b.*r" &&
check_regex section.key "b.*r" beer
ok 2 - include file by relative path
expecting success:
mkdir subdir &&
echo "[test]three = 3" >subdir/three &&
echo "[include]path = three" >subdir/two &&
echo "[include]path = subdir/two" >.gitconfig &&
echo 3 >expect &&
git config test.three >actual &&
test_cmp expect actual
ok 3 - chained relative paths
expecting success:
echo "[test]one = 1" >one &&
echo "[include]path = ~/one" >.gitconfig &&
echo 1 >expect &&
git config test.one >actual &&
test_cmp expect actual
ok 4 - include paths get tilde-expansion
expecting success:
echo "[test]one = 1" >one &&
echo "[include]path = one" >.gitconfig &&
echo one >expect &&
git config include.path >actual &&
test_cmp expect actual
ok 7 - git read-tree -u -m: removed submodule leaves submodule containing a .git directory alone
expecting success:
prolog &&
reset_work_tree_to add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_directory origin/replace_sub1_with_directory &&
test_must_fail $command replace_sub1_with_directory &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
ok 5 - include options can still be examined
expecting success:
echo "[test]one = 1" >one &&
echo "[include]path = one" >.gitconfig &&
cat >expect <<-\EOF &&
include.path=one
test.one=1
EOF
git config --list >actual.full &&
grep -v ^core actual.full >actual &&
test_cmp expect actual
ok 6 - listing includes option and expansion
expecting success:
echo "[test]one = 1" >one &&
echo "[include]path = one" >.gitconfig &&
test_must_fail git config -f .gitconfig test.one &&
test_must_fail git config --global test.one &&
echo 1 >expect &&
git config --includes -f .gitconfig test.one >actual &&
test_cmp expect actual
ok 7 - single file lookup does not expand includes by default
expecting success:
echo "[test]one = 1" >one &&
echo "[include]path = one" >.gitconfig &&
echo "include.path=one" >expect &&
git config -f .gitconfig --list >actual &&
test_cmp expect actual
ok 8 - single file list does not expand includes by default
expecting success:
echo "[test]one = 1" >one &&
echo "[include]path = one" >.gitconfig &&
git config test.two 2 &&
echo 2 >expect &&
git config --no-includes test.two >actual &&
test_cmp expect actual &&
test_must_fail git config --no-includes test.one
Cloning into 'submodule_update'...
ok 8 - add and replace one of many entries
expecting success:
setup_many &&
git config --replace-all section.key bar &&
check section.key bar
ok 9 - writing config file does not expand includes
expecting success:
echo "[test]one = 1" >one &&
echo "[include]path = one" >.gitconfig &&
git config test.one 2 &&
echo 1 >expect &&
git config -f one test.one >actual &&
test_cmp expect actual &&
cat >expect <<-\EOF &&
1
2
EOF
git config --get-all test.one >actual &&
test_cmp expect actual
done.
ok 10 - config modification does not affect includes
expecting success:
cat >.gitconfig <<-\EOF &&
[include]path = foo
[test]value = yes
EOF
echo yes >expect &&
git config test.value >actual &&
test_cmp expect actual
ok 11 - missing include files are ignored
expecting success:
echo "[test]one = 1" >one &&
echo 1 >expect &&
git -c include.path="$(pwd)/one" config test.one >actual &&
test_cmp expect actual
Switched to a new branch 'add_sub1'
Branch add_sub1 set up to track remote branch add_sub1 from origin.
ok 9 - replace many entries
expecting success:
setup_many &&
git config --unset-all section.key &&
test_must_fail git config section.key
ok 12 - absolute includes from command line work
expecting success:
echo "[test]one = 1" >one &&
test_must_fail git -c include.path=one config test.one
error: relative config includes must come from files
fatal: unable to parse command-line config
ok 13 - relative includes from command line fail
expecting success:
echo "[test]one = 1" >one &&
echo "[include]path=$(pwd)/one" >blob &&
blob=$(git hash-object -w blob) &&
echo 1 >expect &&
git config --blob=$blob test.one >actual &&
test_cmp expect actual
ok 18 - zip achiving, deflate
expecting success:
test_must_fail git fsck 2>err &&
n=$(grep "error: attempting to allocate .* over limit" err | wc -l) &&
test "$n" -gt 1
ok 14 - absolute includes from blobs work
expecting success:
echo "[test]one = 1" >one &&
echo "[include]path=one" >blob &&
blob=$(git hash-object -w blob) &&
test_must_fail git config --blob=$blob test.one
ok 19 - fsck
ok 10 - unset many entries
expecting success:
cat >expect <<-\EOF &&
fool
roll
EOF
cp .git/config .git/config.old &&
test_when_finished "mv .git/config.old .git/config" &&
cat >.git/config <<-\EOF &&
[foo]
baz
baz =
baz = fool
EOF
git config --add foo.baz roll &&
git config --get-all foo.baz >output &&
test_cmp expect output
error: relative config includes must come from files
error: bad config file line 2 in d085876092eb24c144128bcd5db5d26e665f4f8a
ok 15 - relative includes from blobs fail
expecting success:
echo "[test]one = 1" >one &&
echo 1 >expect &&
echo "[include]path=\"$(pwd)/one\"" |
git config --file - test.one >actual &&
test_cmp expect actual
# passed all 19 test(s)
1..19
ok 16 - absolute includes from stdin work
expecting success:
echo "[test]one = 1" >one &&
echo "[include]path=one" |
test_must_fail git config --file - test.one
error: relative config includes must come from files
fatal: bad config file line 2 in <stdin>
ok 17 - relative includes from stdin line fail
expecting success:
cat >.gitconfig <<-\EOF &&
[test]value = gitconfig
[include]path = cycle
EOF
cat >cycle <<-\EOF &&
[test]value = cycle
[include]path = .gitconfig
EOF
cat >expect <<-\EOF &&
gitconfig
cycle
EOF
test_must_fail git config --get-all test.value 2>stderr &&
grep "exceeded maximum include depth" stderr
ok 11 - --add appends new value after existing empty value
# passed all 11 test(s)
1..11
fatal: exceeded maximum include depth (10) while including
ok 18 - include cycles are detected
# passed all 18 test(s)
1..18
*** t1306-xdg-files.sh ***
*** t1307-config-blob.sh ***
*** t1308-config-set.sh ***
Submodule 'sub1' (/«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.) registered for path 'sub1'
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1306-xdg-files/.git/
expecting success:
mkdir -p .config/git &&
echo "[alias]" >.config/git/config &&
echo " myalias = !echo in_config" >>.config/git/config &&
echo in_config >expected &&
git myalias >actual &&
test_cmp expected actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1307-config-blob/.git/
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1308-config-set/.git/
expecting success:
cat >config <<-\EOF &&
[some]
value = 1
EOF
git add config &&
git commit -m foo
expecting success:
cat >.git/config <<-\EOF
[case]
penguin = very blue
Movie = BadPhysics
UPPERCASE = true
MixedCase = true
my =
foo
baz = sam
[Cores]
WhatEver = Second
baz = bar
[cores]
baz = bat
[CORES]
baz = ball
[my "Foo bAr"]
hi = mixed-case
[my "FOO BAR"]
hi = upper-case
[my "foo bar"]
hi = lower-case
[case]
baz = bat
baz = hask
[lamb]
chop = 65
head = none
[goat]
legs = 4
head = true
skin = false
nose = 1
horns
EOF
ok 1 - read config: xdg file exists and ~/.gitconfig doesn't
ok 1 - setup default config
expecting success:
check_config get_value case.penguin "very blue"
expecting success:
>.gitconfig &&
echo "[alias]" >.gitconfig &&
echo " myalias = !echo in_gitconfig" >>.gitconfig &&
echo in_gitconfig >expected &&
git myalias >actual &&
test_cmp expected actual
ok 2 - get value for a simple key
expecting success:
check_config get_value case.my ""
ok 2 - read config: xdg file exists and ~/.gitconfig exists
expecting success:
rm .gitconfig &&
echo "[user]" >.config/git/config &&
echo " name = read_config" >>.config/git/config &&
echo read_config >expected &&
git config --get user.name >actual &&
test_cmp expected actual
[master (root-commit) 71c4991] foo
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
create mode 100644 config
ok 1 - create config blob
expecting success:
echo some.value=1 >expect &&
git config --blob=HEAD:config --list >actual &&
test_cmp expect actual
ok 3 - get value for a key with value as an empty string
expecting success:
check_config get_value case.foo "(NULL)"
ok 3 - read with --get: xdg file exists and ~/.gitconfig doesn't
expecting success:
mkdir -p "$HOME"/xdg/git &&
echo "[user]name = in_xdg" >"$HOME"/xdg/git/config &&
echo in_xdg >expected &&
XDG_CONFIG_HOME="$HOME"/xdg git config --get-all user.name >actual &&
test_cmp expected actual
ok 4 - get value for a key with value as NULL
expecting success:
check_config get_value case.UPPERCASE "true" &&
check_config get_value case.uppercase "true"
ok 2 - list config blob contents
expecting success:
echo true >expect &&
git config --blob=HEAD:config --bool some.value >actual &&
Cloning into 'sub1'...
test_cmp expect actual
ok 4 - "$XDG_CONFIG_HOME overrides $HOME/.config/git
expecting success:
>.gitconfig &&
echo "[user]" >.gitconfig &&
echo " name = read_gitconfig" >>.gitconfig &&
echo read_gitconfig >expected &&
git config --get user.name >actual &&
test_cmp expected actual
ok 3 - fetch value from blob
expecting success:
test_must_fail git config --blob=HEAD:config non.existing
ok 5 - upper case key
ok 5 - read with --get: xdg file exists and ~/.gitconfig exists
expecting success:
check_config get_value case.MixedCase "true" &&
check_config get_value case.MIXEDCASE "true" &&
check_config get_value case.mixedcase "true"
expecting success:
rm .gitconfig &&
echo user.name=read_config >expected &&
git config --global --list >actual &&
test_cmp expected actual
ok 4 - reading non-existing value from blob is an error
expecting success:
test_must_fail git config --blob=HEAD:config --system --list
error: only one config file at a time.
usage: git config [<options>]
Config file location
--global use global config file
--system use system config file
--local use repository config file
-f, --file <file> use given config file
--blob <blob-id> read config from given blob object
Action
--get get value: name [value-regex]
--get-all get all values: key [value-regex]
--get-regexp get values for regexp: name-regex [value-regex]
--get-urlmatch get value specific for the URL: section[.var] URL
--replace-all replace all matching variables: name value [value_regex]
done.
--add add a new variable: name value
--unset remove a variable: name [value-regex]
--unset-all remove all matches: name [value-regex]
--rename-section rename section: old-name new-name
--remove-section remove a section: name
-l, --list list all
-e, --edit open an editor
--get-color find the color configured: slot [default]
--get-colorbool find the color setting: slot [stdout-is-tty]
Type
--bool value is "true" or "false"
--int value is decimal number
--bool-or-int value is --bool or --int
--path value is a path (file or directory name)
Other
-z, --null terminate values with NUL byte
--name-only show variable names only
--includes respect include directives on lookup
ok 5 - reading from blob and file is an error
expecting success:
test_must_fail git config --blob=HEAD:doesnotexist --list
ok 6 - read with --list: xdg file exists and ~/.gitconfig doesn't
expecting success:
>.gitconfig &&
echo "[user]" >.gitconfig &&
echo " name = read_gitconfig" >>.gitconfig &&
echo user.name=read_gitconfig >expected &&
git config --global --list >actual &&
test_cmp expected actual
error: unable to resolve config blob 'HEAD:doesnotexist'
fatal: error processing config file(s)
ok 6 - reading from missing ref is an error
expecting success:
test_must_fail git config --blob=HEAD --list
ok 7 - read with --list: xdg file exists and ~/.gitconfig exists
expecting success:
git init git &&
cd git &&
echo foo >to_be_excluded
error: reference 'HEAD' does not point to a blob
fatal: error processing config file(s)
ok 7 - reading from non-blob is an error
expecting success:
test_must_fail git config --blob=HEAD:config some.value foo
ok 6 - mixed case key
expecting success:
check_config get_value case.Movie "BadPhysics"
fatal: writing config blobs is not supported
ok 8 - setting a value in a blob is an error
expecting success:
test_must_fail git config --blob=HEAD:config --unset some.value
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1306-xdg-files/git/.git/
ok 8 - Setup
expecting success:
mkdir -p "$HOME"/.config/git/ &&
echo to_be_excluded >"$HOME"/.config/git/ignore &&
test_must_fail git add to_be_excluded
ok 7 - key and value with mixed case
expecting success:
check_config get_value "my.Foo bAr.hi" "mixed-case" &&
check_config get_value "my.FOO BAR.hi" "upper-case" &&
check_config get_value "my.foo bar.hi" "lower-case"
fatal: writing config blobs is not supported
ok 9 - deleting a value in a blob is an error
expecting success:
test_must_fail git config --blob=HEAD:config --edit
The following paths are ignored by one of your .gitignore files:
to_be_excluded
Use -f if you really want to add them.
ok 9 - Exclusion of a file in the XDG ignore file
expecting success:
mkdir -p "$HOME"/xdg/git &&
echo content >excluded_by_xdg_only &&
echo excluded_by_xdg_only >"$HOME"/xdg/git/ignore &&
test_when_finished "git read-tree --empty" &&
(XDG_CONFIG_HOME="$HOME/xdg" &&
export XDG_CONFIG_HOME &&
git add to_be_excluded &&
test_must_fail git add excluded_by_xdg_only
)
fatal: editing blobs is not supported
ok 10 - editing a blob is an error
expecting success:
cat >config <<-\EOF &&
[some]
value = "
EOF
git add config &&
git commit -m broken &&
test_must_fail git config --blob=HEAD:config some.value 2>err &&
# just grep for our token as the exact error message is likely to
# change or be internationalized
grep "HEAD:config" err
The following paths are ignored by one of your .gitignore files:
excluded_by_xdg_only
Use -f if you really want to add them.
ok 8 - key with case sensitive subsection
expecting success:
check_config get_value cores.baz "ball" &&
check_config get_value Cores.baz "ball" &&
check_config get_value CORES.baz "ball" &&
check_config get_value coreS.baz "ball"
[master 2ae01d5] broken
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 10 - $XDG_CONFIG_HOME overrides $HOME/.config/git/ignore
expecting success:
echo to_be_excluded >.gitignore &&
test_must_fail git add to_be_excluded
The following paths are ignored by one of your .gitignore files:
to_be_excluded
Use -f if you really want to add them.
ok 11 - Exclusion in both XDG and local ignore files
expecting success:
rm .gitignore &&
echo >"$HOME"/.config/git/ignore &&
echo to_be_excluded >"$HOME"/my_gitignore &&
git config core.excludesfile "$HOME"/my_gitignore &&
test_must_fail git add to_be_excluded
error: bad config file line 2 in HEAD:config
ok 11 - parse errors in blobs are properly attributed
expecting success:
printf "[some]key = value\\r" >config &&
git add config &&
git commit -m CR &&
echo value >expect &&
git config --blob=HEAD:config some.key >actual &&
test_cmp expect actual
Submodule path 'sub1': checked out '58630c04cd08e6914ad0ab5a3126bcfb71a3e6ca'
The following paths are ignored by one of your .gitignore files:
to_be_excluded
Use -f if you really want to add them.
ok 12 - Exclusion in a non-XDG global ignore file
expecting success:
>expected &&
(sane_unset HOME &&
git config --unset core.excludesfile &&
git ls-files --exclude-standard --ignored >actual) &&
test_cmp expected actual
ok 9 - key with case insensitive section header
expecting success:
check_config get_value CORES.BAZ "ball" &&
check_config get_value cores.baz "ball" &&
check_config get_value cores.BaZ "ball" &&
check_config get_value cOreS.bAz "ball"
[master 523ca0c] CR
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 2 deletions(-)
ok 12 - can parse blob ending with CR
ok 13 - Checking XDG ignore file when HOME is unset
expecting success:
echo foo >f &&
git check-attr -a f >actual &&
test_line_count -eq 0 actual &&
echo "f attr_f" >"$HOME"/.config/git/attributes &&
echo "f: attr_f: set" >expected &&
git check-attr -a f >actual &&
test_cmp expected actual
# passed all 12 test(s)
1..12
Branch replace_sub1_with_directory set up to track remote branch replace_sub1_with_directory from origin.
ok 10 - key with case insensitive section header & variable
expecting success:
check_config expect_code 1 get_value "my.fOo Bar.hi" "Value not found for \"my.fOo Bar.hi\""
ok 14 - Checking attributes in the XDG attributes file
expecting success:
>expected &&
(sane_unset HOME &&
git check-attr -a f >actual) &&
test_cmp expected actual
*** t1400-update-ref.sh ***
error: Untracked working tree file 'sub1/file1' would be overwritten by merge.
ok 11 - find value with misspelled key
expecting success:
check_config get_value case.baz "hask"
ok 15 - Checking XDG attributes when HOME is unset
expecting success:
mkdir -p "$HOME"/xdg/git &&
echo "f attr_f=xdg" >"$HOME"/xdg/git/attributes &&
echo "f: attr_f: xdg" >expected &&
XDG_CONFIG_HOME="$HOME/xdg" git check-attr -a f >actual &&
test_cmp expected actual
ok 12 - find value with the highest priority
expecting success:
check_config get_int lamb.chop 65
ok 16 - $XDG_CONFIG_HOME overrides $HOME/.config/git/attributes
expecting success:
echo "f -attr_f" >.gitattributes &&
echo "f: attr_f: unset" >expected &&
git check-attr -a f >actual &&
test_cmp expected actual
ok 13 - find integer value for a key
expecting success:
check_config get_string case.baz hask &&
check_config expect_code 1 get_string case.ba "Value not found for \"case.ba\""
ok 17 - Checking attributes in both XDG and local attributes files
expecting success:
test_might_fail rm .gitattributes &&
echo "f attr_f=test" >"$HOME"/my_gitattributes &&
git config core.attributesfile "$HOME"/my_gitattributes &&
echo "f: attr_f: test" >expected &&
git check-attr -a f >actual &&
test_cmp expected actual
ok 14 - find string value for a key
expecting success:
test_expect_code 128 test-config get_string case.foo 2>result &&
test_i18ngrep "fatal: .*case\.foo.*\.git/config.*line 7" result
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1400-update-ref/.git/
fatal: bad config variable 'case.foo' in file '.git/config' at line 7
ok 15 - check line error when NULL string is queried
expecting success:
check_config expect_code 128 get_int lamb.head
ok 18 - Checking attributes in a non-XDG global attributes file
expecting success:
mkdir -p "$HOME"/.config/git &&
>"$HOME"/.config/git/config &&
test_might_fail rm "$HOME"/.gitconfig &&
git config --global user.name "write_config" &&
echo "[user]" >expected &&
echo " name = write_config" >>expected &&
test_cmp expected "$HOME"/.config/git/config
expecting success:
for name in A B C D E F
do
test_tick &&
T=$(git write-tree) &&
sha1=$(echo $name | git commit-tree $T) &&
eval $name=$sha1
done
ok 8 - git read-tree -u -m: replace submodule with a directory must fail
fatal: bad numeric config value 'none' for 'lamb.head': invalid unit
expecting success:
prolog &&
reset_work_tree_to add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_directory origin/replace_sub1_with_directory &&
replace_gitfile_with_git_dir sub1 &&
test_must_fail $command replace_sub1_with_directory &&
test_superproject_content origin/add_sub1 &&
test_git_directory_is_unchanged sub1 &&
test_submodule_content sub1 origin/add_sub1
)
ok 16 - find integer if value is non parse-able
expecting success:
check_config get_bool goat.head 1 &&
check_config get_bool goat.skin 0 &&
check_config get_bool goat.nose 1 &&
check_config get_bool goat.horns 1 &&
check_config get_bool goat.legs 1
ok 19 - write: xdg file exists and ~/.gitconfig doesn't
expecting success:
>"$HOME"/.gitconfig &&
git config --global user.name "write_gitconfig" &&
echo "[user]" >expected &&
echo " name = write_gitconfig" >>expected &&
test_cmp expected "$HOME"/.gitconfig
ok 20 - write: xdg file exists and ~/.gitconfig exists
expecting success:
test_might_fail rm "$HOME"/.gitconfig &&
test_might_fail rm "$HOME"/.config/git/config &&
git config --global user.name "write_gitconfig" &&
echo "[user]" >expected &&
echo " name = write_gitconfig" >>expected &&
test_cmp expected "$HOME"/.gitconfig
ok 21 - write: ~/.config/git/ exists and config file doesn't
# passed all 21 test(s)
1..21
ok 17 - find bool value for the entered key
expecting success:
check_config get_value_multi case.baz sam bat hask
ok 18 - find multiple values
expecting success:
cat >config2 <<-\EOF &&
[case]
baz = lama
[my]
new = silk
[case]
baz = ball
EOF
echo silk >expect &&
test-config configset_get_value my.new config2 .git/config >actual &&
test_cmp expect actual
*** t1401-symbolic-ref.sh ***
ok 19 - find value from a configset
expecting success:
echo hask >expect &&
test-config configset_get_value case.baz config2 .git/config >actual &&
test_cmp expect actual
Cloning into 'submodule_update'...
ok 20 - find value with highest priority from a configset
expecting success:
cat >except <<-\EOF &&
sam
bat
hask
lama
ball
EOF
test-config configset_get_value case.baz config2 .git/config >actual &&
test_cmp expect actual
ok 21 - find value_list for a key from a configset
expecting success:
echo "Error (-1) reading configuration file non-existent-file." >expect &&
test_expect_code 2 test-config configset_get_value foo.bar non-existent-file 2>actual &&
test_cmp expect actual
ok 1 - setup
expecting success: git update-ref refs/heads/master 102939797ab91a4f201d131418d2c9d919dcdd2c &&
test 102939797ab91a4f201d131418d2c9d919dcdd2c = $(cat .git/refs/heads/master)
ok 22 - proper error on non-existent files
checking prerequisite: SANITY
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
mkdir SANETESTD.1 SANETESTD.2 &&
chmod +w SANETESTD.1 SANETESTD.2 &&
>SANETESTD.1/x 2>SANETESTD.2/x &&
chmod -w SANETESTD.1 &&
chmod -rx SANETESTD.2 ||
error "bug in test sript: cannot prepare SANETESTD"
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
error "bug in test sript: cannot clean SANETESTD"
done.
return $status
)
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1401-symbolic-ref/.git/
expecting success:
git symbolic-ref HEAD refs/heads/foo &&
echo ref: refs/heads/foo >expect &&
test_cmp expect .git/HEAD
ok 2 - create refs/heads/master
expecting success: git update-ref refs/heads/master 56d5c1374e8028a1e122ab046ab7b98165342dc4 102939797ab91a4f201d131418d2c9d919dcdd2c &&
test 56d5c1374e8028a1e122ab046ab7b98165342dc4 = $(cat .git/refs/heads/master)
rm: cannot remove 'SANETESTD.1/x': Permission denied
ok 1 - symbolic-ref writes HEAD
expecting success:
echo refs/heads/foo >expect &&
git symbolic-ref HEAD >actual &&
test_cmp expect actual
ok 3 - create refs/heads/master
expecting success:
test_must_fail git update-ref -d $m $A &&
test $B = "$(cat .git/$m)"
Switched to a new branch 'add_sub1'
prerequisite SANITY ok
expecting success:
chmod -r .git/config &&
test_when_finished "chmod +r .git/config" &&
echo "Error (-1) reading configuration file .git/config." >expect &&
test_expect_code 2 test-config configset_get_value foo.bar .git/config 2>actual &&
test_cmp expect actual
Branch add_sub1 set up to track remote branch add_sub1 from origin.
ok 2 - symbolic-ref reads HEAD
expecting success:
test_must_fail git symbolic-ref HEAD foo
error: cannot lock ref 'refs/heads/master': ref refs/heads/master is at 56d5c1374e8028a1e122ab046ab7b98165342dc4 but expected 102939797ab91a4f201d131418d2c9d919dcdd2c
ok 4 - fail to delete refs/heads/master with stale ref
expecting success:
git update-ref -d $m $B &&
! test -f .git/$m
fatal: Refusing to point HEAD outside of refs/
ok 3 - symbolic-ref refuses non-ref for HEAD
expecting success:
echo content >file && git add file && git commit -m one &&
test_must_fail git symbolic-ref HEAD `git rev-parse HEAD`
ok 23 - proper error on non-accessible files
expecting success:
cp .git/config .git/config.old &&
test_when_finished "mv .git/config.old .git/config" &&
echo "[" >>.git/config &&
echo "fatal: bad config file line 34 in .git/config" >expect &&
test_expect_code 128 test-config get_value foo.bar 2>actual &&
test_cmp expect actual
ok 5 - delete refs/heads/master
expecting success:
git update-ref refs/heads/master 102939797ab91a4f201d131418d2c9d919dcdd2c &&
test 102939797ab91a4f201d131418d2c9d919dcdd2c = $(cat .git/refs/heads/master) &&
git update-ref -d refs/heads/master &&
! test -f .git/refs/heads/master
[foo (root-commit) 106c6c8] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 24 - proper error on error in default config files
expecting success:
echo "[" >>syntax-error &&
echo "fatal: bad config file line 1 in syntax-error" >expect &&
test_expect_code 128 test-config configset_get_value foo.bar syntax-error 2>actual &&
test_cmp expect actual
ok 6 - delete refs/heads/master without oldvalue verification
expecting success: touch .git/refs/heads/gu &&
test_must_fail git update-ref refs/heads/gu/fixes 102939797ab91a4f201d131418d2c9d919dcdd2c >out 2>err
fatal: Refusing to point HEAD outside of refs/
ok 4 - symbolic-ref refuses bare sha1
ok 25 - proper error on error in custom config files
expecting success:
git symbolic-ref -d HEAD &&
test_path_is_file .git/refs/heads/foo &&
test_path_is_missing .git/HEAD
expecting success:
mv .git/config .git/config.old &&
test_when_finished "mv .git/config.old .git/config" &&
cat >.git/config <<-\EOF &&
[alias]
br
EOF
test_expect_code 128 git br 2>result &&
test_i18ngrep "fatal: .*alias\.br.*\.git/config.*line 2" result
ok 7 - fail to create refs/heads/gu/fixes
expecting success: git update-ref HEAD 102939797ab91a4f201d131418d2c9d919dcdd2c &&
test 102939797ab91a4f201d131418d2c9d919dcdd2c = $(cat .git/refs/heads/master)
ok 5 - symbolic-ref deletes HEAD
expecting success:
git symbolic-ref HEAD refs/heads/missing &&
git symbolic-ref -d HEAD &&
test_path_is_missing .git/refs/heads/missing &&
test_path_is_missing .git/HEAD
ok 8 - create refs/heads/master (by HEAD)
expecting success: git update-ref HEAD 56d5c1374e8028a1e122ab046ab7b98165342dc4 102939797ab91a4f201d131418d2c9d919dcdd2c &&
test 56d5c1374e8028a1e122ab046ab7b98165342dc4 = $(cat .git/refs/heads/master)
fatal: bad config variable 'alias.br' in file '.git/config' at line 2
ok 6 - symbolic-ref deletes dangling HEAD
expecting success:
echo "fatal: Cannot delete FOO, not a symbolic ref" >expect &&
test_must_fail git symbolic-ref -d FOO >actual 2>&1 &&
test_cmp expect actual
ok 26 - check line errors for malformed values
# passed all 26 test(s)
1..26
ok 9 - create refs/heads/master (by HEAD)
expecting success:
test_must_fail git update-ref -d HEAD $A &&
test $B = $(cat .git/$m)
ok 7 - symbolic-ref fails to delete missing FOO
expecting success:
echo "fatal: Cannot delete refs/heads/foo, not a symbolic ref" >expect &&
test_must_fail git symbolic-ref -d refs/heads/foo >actual 2>&1 &&
test_path_is_file .git/refs/heads/foo &&
test_cmp expect actual
error: cannot lock ref 'HEAD': ref refs/heads/master is at 56d5c1374e8028a1e122ab046ab7b98165342dc4 but expected 102939797ab91a4f201d131418d2c9d919dcdd2c
ok 10 - fail to delete refs/heads/master (by HEAD) with stale ref
expecting success:
git update-ref -d HEAD $B &&
! test -f .git/$m
ok 8 - symbolic-ref fails to delete real ref
*** t1402-check-ref-format.sh ***
ok 11 - delete refs/heads/master (by HEAD)
expecting success:
test_when_finished "git update-ref -d $outside" &&
git update-ref $outside $A &&
git rev-parse $A >expect &&
git rev-parse $outside >actual &&
test_cmp expect actual &&
test_must_fail git reflog exists $outside
# passed all 8 test(s)
1..8
*** t1403-show-ref.sh ***
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1402-check-ref-format/.git/
ok 12 - update-ref does not create reflogs by default
expecting success:
test_when_finished "git update-ref -d $outside" &&
git update-ref --create-reflog $outside $A &&
git rev-parse $A >expect &&
git rev-parse $outside >actual &&
test_cmp expect actual &&
git reflog exists $outside
expecting success:
test_must_fail git check-ref-format ''
Submodule 'sub1' (/«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.) registered for path 'sub1'
ok 1 - ref name '' is invalid
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1403-show-ref/.git/
expecting success:
test_must_fail git check-ref-format '/'
expecting success:
test_commit A &&
git tag -f -a -m "annotated A" A &&
git checkout -b side &&
test_commit B &&
git tag -f -a -m "annotated B" B &&
git checkout master &&
test_commit C &&
git branch B A^0
ok 2 - ref name '/' is invalid
expecting success:
test_must_fail git check-ref-format --allow-onelevel '/'
ok 3 - ref name '/' is invalid with options --allow-onelevel
ok 13 - update-ref creates reflogs with --create-reflog
expecting success: git update-ref HEAD 102939797ab91a4f201d131418d2c9d919dcdd2c &&
test 102939797ab91a4f201d131418d2c9d919dcdd2c = $(cat .git/refs/heads/master)
expecting success:
test_must_fail git check-ref-format --normalize '/'
ok 4 - ref name '/' is invalid with options --normalize
[master (root-commit) 0ddfaf1] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
expecting success:
test_must_fail git check-ref-format --allow-onelevel --normalize '/'
ok 14 - create refs/heads/master (by HEAD)
expecting success: git pack-refs --all
ok 5 - ref name '/' is invalid with options --allow-onelevel --normalize
expecting success:
git check-ref-format 'foo/bar/baz'
ok 15 - pack refs
expecting success: git update-ref HEAD 56d5c1374e8028a1e122ab046ab7b98165342dc4 102939797ab91a4f201d131418d2c9d919dcdd2c &&
test 56d5c1374e8028a1e122ab046ab7b98165342dc4 = $(cat .git/refs/heads/master)
ok 6 - ref name 'foo/bar/baz' is valid
expecting success:
git check-ref-format --normalize 'foo/bar/baz'
Updated tag 'A' (was 0ddfaf1)
foo/bar/baz
ok 7 - ref name 'foo/bar/baz' is valid with options --normalize
expecting success:
test_must_fail git check-ref-format 'refs///heads/foo'
ok 16 - move refs/heads/master (by HEAD)
expecting success:
git update-ref -d HEAD $B &&
! grep "$m" .git/packed-refs &&
! test -f .git/$m
Cloning into 'sub1'...
ok 8 - ref name 'refs///heads/foo' is invalid
expecting success:
git check-ref-format --normalize 'refs///heads/foo'
Switched to a new branch 'side'
refs/heads/foo
ok 9 - ref name 'refs///heads/foo' is valid with options --normalize
expecting success:
test_must_fail git check-ref-format 'heads/foo/'
ok 17 - delete refs/heads/master (by HEAD) should remove both packed and loose refs/heads/master
ok 10 - ref name 'heads/foo/' is invalid
expecting success:
test_must_fail git check-ref-format '/heads/foo'
expecting success:
git update-ref --no-deref -d HEAD &&
! test -f .git/HEAD
ok 11 - ref name '/heads/foo' is invalid
[side d9df450] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B.t
expecting success:
git check-ref-format --normalize '/heads/foo'
ok 18 - delete symref without dereference
done.
heads/foo
ok 12 - ref name '/heads/foo' is valid with options --normalize
expecting success:
test_must_fail git check-ref-format '///heads/foo'
expecting success:
echo foo >foo.c &&
git add foo.c &&
git commit -m foo &&
git pack-refs --all &&
git update-ref --no-deref -d HEAD &&
! test -f .git/HEAD
ok 13 - ref name '///heads/foo' is invalid
expecting success:
git check-ref-format --normalize '///heads/foo'
Updated tag 'B' (was d9df450)
heads/foo
ok 14 - ref name '///heads/foo' is valid with options --normalize
expecting success:
test_must_fail git check-ref-format './foo'
ok 15 - ref name './foo' is invalid
expecting success:
test_must_fail git check-ref-format './foo/bar'
Switched to branch 'master'
[master (root-commit) 40d5b0c] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.c
ok 16 - ref name './foo/bar' is invalid
expecting success:
test_must_fail git check-ref-format 'foo/./bar'
ok 17 - ref name 'foo/./bar' is invalid
expecting success:
test_must_fail git check-ref-format 'foo/bar/.'
ok 18 - ref name 'foo/bar/.' is invalid
expecting success:
test_must_fail git check-ref-format '.refs/foo'
ok 19 - delete symref without dereference when the referred ref is packed
[master 5dee784] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 C.t
ok 19 - ref name '.refs/foo' is invalid
expecting success:
test_must_fail git check-ref-format 'refs/heads/foo.'
ok 20 - ref name 'refs/heads/foo.' is invalid
expecting success:
git symbolic-ref refs/heads/self refs/heads/self &&
test_when_finished "rm -f .git/refs/heads/self" &&
test_path_is_file .git/refs/heads/self &&
test_must_fail git update-ref -d refs/heads/self &&
test_path_is_file .git/refs/heads/self
expecting success:
test_must_fail git check-ref-format 'heads/foo..bar'
ok 1 - setup
expecting success:
echo $(git rev-parse refs/tags/A) refs/tags/A >expect &&
git show-ref A >actual &&
test_cmp expect actual &&
git show-ref tags/A >actual &&
test_cmp expect actual &&
git show-ref refs/tags/A >actual &&
test_cmp expect actual &&
>expect &&
test_must_fail git show-ref D >actual &&
test_cmp expect actual
ok 21 - ref name 'heads/foo..bar' is invalid
expecting success:
test_must_fail git check-ref-format 'heads/foo?bar'
error: cannot lock ref 'refs/heads/self': unable to resolve reference refs/heads/self: Too many levels of symbolic links
ok 22 - ref name 'heads/foo?bar' is invalid
expecting success:
git check-ref-format 'foo./bar'
ok 20 - update-ref -d is not confused by self-reference
expecting success:
git symbolic-ref refs/heads/self refs/heads/self &&
test_when_finished "rm -f .git/refs/heads/self" &&
test_path_is_file .git/refs/heads/self &&
git update-ref --no-deref -d refs/heads/self &&
test_path_is_missing .git/refs/heads/self
ok 23 - ref name 'foo./bar' is valid
expecting success:
test_must_fail git check-ref-format 'heads/foo.lock'
Submodule path 'sub1': checked out '58630c04cd08e6914ad0ab5a3126bcfb71a3e6ca'
ok 24 - ref name 'heads/foo.lock' is invalid
expecting success:
test_must_fail git check-ref-format 'heads///foo.lock'
ok 21 - update-ref --no-deref -d can delete self-reference
expecting success:
>.git/refs/heads/bad &&
test_when_finished "rm -f .git/refs/heads/bad" &&
git symbolic-ref refs/heads/ref-to-bad refs/heads/bad &&
test_when_finished "rm -f .git/refs/heads/ref-to-bad" &&
test_path_is_file .git/refs/heads/ref-to-bad &&
git update-ref --no-deref -d refs/heads/ref-to-bad &&
test_path_is_missing .git/refs/heads/ref-to-bad
ok 25 - ref name 'heads///foo.lock' is invalid
expecting success:
test_must_fail git check-ref-format 'foo.lock/bar'
ok 26 - ref name 'foo.lock/bar' is invalid
expecting success:
test_must_fail git check-ref-format 'foo.lock///bar'
ok 27 - ref name 'foo.lock///bar' is invalid
expecting success:
git check-ref-format 'heads/foo@bar'
ok 2 - show-ref
expecting success:
>expect &&
git show-ref -q A >actual &&
test_cmp expect actual &&
git show-ref -q tags/A >actual &&
test_cmp expect actual &&
git show-ref -q refs/tags/A >actual &&
test_cmp expect actual &&
test_must_fail git show-ref -q D >actual &&
test_cmp expect actual
ok 28 - ref name 'heads/foo@bar' is valid
expecting success:
test_must_fail git check-ref-format 'heads/v@{ation'
ok 22 - update-ref --no-deref -d can delete reference to bad ref
expecting success:
test_must_fail git update-ref HEAD 102939797ab91a4f201d131418d2c9d919dcdd2c 56d5c1374e8028a1e122ab046ab7b98165342dc4
fatal: update_ref failed for ref 'HEAD': cannot lock ref 'HEAD': unable to resolve reference HEAD: No such file or directory
ok 29 - ref name 'heads/v@{ation' is invalid
expecting success:
test_must_fail git check-ref-format 'heads/foo\bar'
ok 23 - (not) create HEAD with old sha1
expecting success:
! test -f .git/refs/heads/master
Branch replace_sub1_with_directory set up to track remote branch replace_sub1_with_directory from origin.
ok 24 - (not) prior created .git/refs/heads/master
expecting success: git update-ref HEAD 102939797ab91a4f201d131418d2c9d919dcdd2c
ok 30 - ref name 'heads/foo\bar' is invalid
expecting success:
test_must_fail git check-ref-format 'heads/foo '
ok 31 - ref name 'heads/foo ' is invalid
expecting success:
test_must_fail git check-ref-format 'heads/foo'
ok 25 - create HEAD
expecting success:
test_must_fail git update-ref HEAD 56d5c1374e8028a1e122ab046ab7b98165342dc4 0000000000000000000000000000000000000000
ok 32 - ref name 'heads/foo' is invalid
expecting success:
git check-ref-format 'heads/fuß'
fatal: update_ref failed for ref 'HEAD': cannot lock ref 'HEAD': ref refs/heads/master is at 102939797ab91a4f201d131418d2c9d919dcdd2c but expected 0000000000000000000000000000000000000000
ok 26 - (not) change HEAD with wrong SHA1
expecting success:
! test 56d5c1374e8028a1e122ab046ab7b98165342dc4 = $(cat .git/refs/heads/master)
ok 3 - show-ref -q
expecting success:
echo $(git rev-parse refs/tags/A) refs/tags/A >expect &&
git show-ref --verify refs/tags/A >actual &&
test_cmp expect actual &&
>expect &&
test_must_fail git show-ref --verify A >actual &&
test_cmp expect actual &&
test_must_fail git show-ref --verify tags/A >actual &&
test_cmp expect actual &&
test_must_fail git show-ref --verify D >actual &&
test_cmp expect actual
ok 33 - ref name 'heads/fuß' is valid
expecting success:
git check-ref-format --refspec-pattern 'heads/*foo/bar'
ok 27 - (not) changed .git/refs/heads/master
ok 34 - ref name 'heads/*foo/bar' is valid with options --refspec-pattern
expecting success:
git check-ref-format --refspec-pattern 'heads/foo*/bar'
expecting success: GIT_COMMITTER_DATE="2005-05-26 23:30" \
git update-ref --create-reflog HEAD 102939797ab91a4f201d131418d2c9d919dcdd2c -m "Initial Creation" &&
test 102939797ab91a4f201d131418d2c9d919dcdd2c = $(cat .git/refs/heads/master)
ok 35 - ref name 'heads/foo*/bar' is valid with options --refspec-pattern
expecting success:
git check-ref-format --refspec-pattern 'heads/f*o/bar'
fatal: 'A' - not a valid ref
ok 36 - ref name 'heads/f*o/bar' is valid with options --refspec-pattern
expecting success:
test_must_fail git check-ref-format --refspec-pattern 'heads/f*o*/bar'
ok 28 - create refs/heads/master (logged by touch)
expecting success: GIT_COMMITTER_DATE="2005-05-26 23:31" \
git update-ref HEAD 56d5c1374e8028a1e122ab046ab7b98165342dc4 102939797ab91a4f201d131418d2c9d919dcdd2c -m "Switch" &&
test 56d5c1374e8028a1e122ab046ab7b98165342dc4 = $(cat .git/refs/heads/master)
fatal: 'tags/A' - not a valid ref
ok 37 - ref name 'heads/f*o*/bar' is invalid with options --refspec-pattern
expecting success:
test_must_fail git check-ref-format --refspec-pattern 'heads/foo*/bar*'
fatal: 'D' - not a valid ref
ok 38 - ref name 'heads/foo*/bar*' is invalid with options --refspec-pattern
expecting success:
test_must_fail git check-ref-format 'foo'
error: Untracked working tree file 'sub1/file1' would be overwritten by merge.
ok 4 - show-ref --verify
expecting success:
>expect &&
git show-ref --verify -q refs/tags/A >actual &&
test_cmp expect actual &&
test_must_fail git show-ref --verify -q A >actual &&
test_cmp expect actual &&
test_must_fail git show-ref --verify -q tags/A >actual &&
test_cmp expect actual &&
test_must_fail git show-ref --verify -q D >actual &&
test_cmp expect actual
ok 29 - update refs/heads/master (logged by touch)
expecting success: GIT_COMMITTER_DATE="2005-05-26 23:41" \
git update-ref HEAD 102939797ab91a4f201d131418d2c9d919dcdd2c &&
test 102939797ab91a4f201d131418d2c9d919dcdd2c = $(cat .git/refs/heads/master)
ok 39 - ref name 'foo' is invalid
expecting success:
git check-ref-format --allow-onelevel 'foo'
ok 40 - ref name 'foo' is valid with options --allow-onelevel
expecting success:
test_must_fail git check-ref-format --refspec-pattern 'foo'
ok 30 - set refs/heads/master (logged by touch)
expecting success: test_cmp expect .git/logs/refs/heads/master
ok 41 - ref name 'foo' is invalid with options --refspec-pattern
expecting success:
git check-ref-format --refspec-pattern --allow-onelevel 'foo'
ok 31 - verifying refs/heads/master's log
expecting success: git config core.logAllRefUpdates true &&
test true = $(git config --bool --get core.logAllRefUpdates)
ok 42 - ref name 'foo' is valid with options --refspec-pattern --allow-onelevel
expecting success:
test_must_fail git check-ref-format --normalize 'foo'
ok 43 - ref name 'foo' is invalid with options --normalize
expecting success:
git check-ref-format --allow-onelevel --normalize 'foo'
ok 5 - show-ref --verify -q
expecting success:
{
echo $(git rev-parse refs/tags/A) refs/tags/A &&
echo $(git rev-parse refs/tags/A^0) "refs/tags/A^{}"
echo $(git rev-parse refs/tags/C) refs/tags/C
} >expect &&
git show-ref -d A C >actual &&
test_cmp expect actual &&
git show-ref -d tags/A tags/C >actual &&
test_cmp expect actual &&
git show-ref -d refs/tags/A refs/tags/C >actual &&
test_cmp expect actual &&
echo $(git rev-parse refs/heads/master) refs/heads/master >expect &&
git show-ref -d master >actual &&
test_cmp expect actual &&
git show-ref -d heads/master >actual &&
test_cmp expect actual &&
git show-ref -d refs/heads/master >actual &&
test_cmp expect actual &&
git show-ref -d --verify refs/heads/master >actual &&
test_cmp expect actual &&
>expect &&
test_must_fail git show-ref -d --verify master >actual &&
test_cmp expect actual &&
test_must_fail git show-ref -d --verify heads/master >actual &&
test_cmp expect actual
foo
ok 44 - ref name 'foo' is valid with options --allow-onelevel --normalize
expecting success:
git check-ref-format 'foo/bar'
ok 32 - enable core.logAllRefUpdates
expecting success: GIT_COMMITTER_DATE="2005-05-26 23:32" \
git update-ref HEAD 102939797ab91a4f201d131418d2c9d919dcdd2c -m "Initial Creation" &&
test 102939797ab91a4f201d131418d2c9d919dcdd2c = $(cat .git/refs/heads/master)
ok 45 - ref name 'foo/bar' is valid
expecting success:
git check-ref-format --allow-onelevel 'foo/bar'
ok 46 - ref name 'foo/bar' is valid with options --allow-onelevel
expecting success:
git check-ref-format --refspec-pattern 'foo/bar'
ok 33 - create refs/heads/master (logged by config)
expecting success: GIT_COMMITTER_DATE="2005-05-26 23:33" \
git update-ref HEAD 56d5c1374e8028a1e122ab046ab7b98165342dc4 102939797ab91a4f201d131418d2c9d919dcdd2c -m "Switch" &&
test 56d5c1374e8028a1e122ab046ab7b98165342dc4 = $(cat .git/refs/heads/master)
ok 47 - ref name 'foo/bar' is valid with options --refspec-pattern
expecting success:
git check-ref-format --refspec-pattern --allow-onelevel 'foo/bar'
ok 48 - ref name 'foo/bar' is valid with options --refspec-pattern --allow-onelevel
expecting success:
git check-ref-format --normalize 'foo/bar'
ok 34 - update refs/heads/master (logged by config)
expecting success: GIT_COMMITTER_DATE="2005-05-26 23:43" \
git update-ref HEAD 102939797ab91a4f201d131418d2c9d919dcdd2c &&
test 102939797ab91a4f201d131418d2c9d919dcdd2c = $(cat .git/refs/heads/master)
foo/bar
ok 49 - ref name 'foo/bar' is valid with options --normalize
expecting success:
test_must_fail git check-ref-format 'foo/*'
ok 50 - ref name 'foo/*' is invalid
expecting success:
test_must_fail git check-ref-format --allow-onelevel 'foo/*'
ok 35 - set refs/heads/master (logged by config)
expecting success: test_cmp expect .git/logs/$m
ok 36 - verifying refs/heads/master's log
ok 51 - ref name 'foo/*' is invalid with options --allow-onelevel
expecting success:
git check-ref-format --refspec-pattern 'foo/*'
ok 9 - git read-tree -u -m: replace submodule containing a .git directory with a directory must fail
checking known breakage:
prolog &&
reset_work_tree_to add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_file origin/replace_sub1_with_file &&
test_must_fail $command replace_sub1_with_file &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
ok 52 - ref name 'foo/*' is valid with options --refspec-pattern
expecting success:
git check-ref-format --refspec-pattern --allow-onelevel 'foo/*'
ok 53 - ref name 'foo/*' is valid with options --refspec-pattern --allow-onelevel
expecting success:
test_must_fail git check-ref-format '*/foo'
expecting success: rm -f o e &&
git rev-parse --verify "master@{May 25 2005}" >o 2>e &&
test 3cceb89b690679aecbe1db39079f99221f1aaaa6 = $(cat o) &&
test "warning: Log for 'master' only goes back to $ed." = "$(cat e)"
ok 54 - ref name '*/foo' is invalid
expecting success:
test_must_fail git check-ref-format --allow-onelevel '*/foo'
ok 55 - ref name '*/foo' is invalid with options --allow-onelevel
expecting success:
git check-ref-format --refspec-pattern '*/foo'
ok 37 - Query "master@{May 25 2005}" (before history)
expecting success: rm -f o e &&
git rev-parse --verify master@{2005-05-25} >o 2>e &&
test 3cceb89b690679aecbe1db39079f99221f1aaaa6 = $(cat o) &&
echo test "warning: Log for 'master' only goes back to $ed." = "$(cat e)"
ok 56 - ref name '*/foo' is valid with options --refspec-pattern
expecting success:
git check-ref-format --refspec-pattern --allow-onelevel '*/foo'
ok 57 - ref name '*/foo' is valid with options --refspec-pattern --allow-onelevel
expecting success:
test_must_fail git check-ref-format --normalize '*/foo'
fatal: 'master' - not a valid ref
ok 58 - ref name '*/foo' is invalid with options --normalize
test warning: Log for 'master' only goes back to Thu, 26 May 2005 18:32:00 -0500. = warning: Log for 'master' only goes back to Thu, 26 May 2005 18:32:00 -0500.
ok 38 - Query master@{2005-05-25} (before history)
expecting success:
git check-ref-format --refspec-pattern --normalize '*/foo'
expecting success: rm -f o e &&
git rev-parse --verify "master@{May 26 2005 23:31:59}" >o 2>e &&
test 3cceb89b690679aecbe1db39079f99221f1aaaa6 = $(cat o) &&
test "warning: Log for 'master' only goes back to $ed." = "$(cat e)"
*/foo
ok 59 - ref name '*/foo' is valid with options --refspec-pattern --normalize
expecting success:
test_must_fail git check-ref-format 'foo/*/bar'
fatal: 'heads/master' - not a valid ref
ok 6 - show-ref -d
expecting success:
for branch in B master side
do
echo $(git rev-parse refs/heads/$branch) refs/heads/$branch
done >expect.heads &&
git show-ref --heads >actual &&
test_cmp expect.heads actual &&
for tag in A B C
do
echo $(git rev-parse refs/tags/$tag) refs/tags/$tag
done >expect.tags &&
git show-ref --tags >actual &&
test_cmp expect.tags actual &&
cat expect.heads expect.tags >expect &&
git show-ref --heads --tags >actual &&
test_cmp expect actual &&
{
echo $(git rev-parse HEAD) HEAD &&
cat expect.heads expect.tags
} >expect &&
git show-ref --heads --tags --head >actual &&
test_cmp expect actual &&
{
echo $(git rev-parse HEAD) HEAD &&
echo $(git rev-parse refs/heads/B) refs/heads/B
echo $(git rev-parse refs/tags/B) refs/tags/B
} >expect &&
git show-ref --head B >actual &&
test_cmp expect actual &&
{
echo $(git rev-parse HEAD) HEAD &&
echo $(git rev-parse refs/heads/B) refs/heads/B
echo $(git rev-parse refs/tags/B) refs/tags/B
echo $(git rev-parse refs/tags/B^0) "refs/tags/B^{}"
} >expect &&
git show-ref --head -d B >actual &&
test_cmp expect actual
ok 60 - ref name 'foo/*/bar' is invalid
expecting success:
test_must_fail git check-ref-format --allow-onelevel 'foo/*/bar'
ok 39 - Query "master@{May 26 2005 23:31:59}" (1 second before history)
expecting success: rm -f o e &&
git rev-parse --verify "master@{May 26 2005 23:32:00}" >o 2>e &&
test 3cceb89b690679aecbe1db39079f99221f1aaaa6 = $(cat o) &&
test "" = "$(cat e)"
ok 61 - ref name 'foo/*/bar' is invalid with options --allow-onelevel
expecting success:
git check-ref-format --refspec-pattern 'foo/*/bar'
ok 62 - ref name 'foo/*/bar' is valid with options --refspec-pattern
expecting success:
git check-ref-format --refspec-pattern --allow-onelevel 'foo/*/bar'
Cloning into 'submodule_update'...
ok 40 - Query "master@{May 26 2005 23:32:00}" (exactly history start)
expecting success: rm -f o e &&
git rev-parse --verify "master@{May 26 2005 23:32:30}" >o 2>e &&
test 102939797ab91a4f201d131418d2c9d919dcdd2c = $(cat o) &&
test "" = "$(cat e)"
ok 63 - ref name 'foo/*/bar' is valid with options --refspec-pattern --allow-onelevel
expecting success:
test_must_fail git check-ref-format '*'
ok 64 - ref name '*' is invalid
expecting success:
test_must_fail git check-ref-format --allow-onelevel '*'
ok 65 - ref name '*' is invalid with options --allow-onelevel
ok 41 - Query "master@{May 26 2005 23:32:30}" (first non-creation change)
expecting success:
test_must_fail git check-ref-format --refspec-pattern '*'
expecting success: rm -f o e &&
git rev-parse --verify "master@{2005-05-26 23:33:01}" >o 2>e &&
test 56d5c1374e8028a1e122ab046ab7b98165342dc4 = $(cat o) &&
test "warning: Log for ref refs/heads/master has gap after Thu, 26 May 2005 18:33:00 -0500." = "$(cat e)"
ok 66 - ref name '*' is invalid with options --refspec-pattern
expecting success:
git check-ref-format --refspec-pattern --allow-onelevel '*'
done.
ok 67 - ref name '*' is valid with options --refspec-pattern --allow-onelevel
expecting success:
test_must_fail git check-ref-format --refspec-pattern 'foo/*/*'
ok 42 - Query "master@{2005-05-26 23:33:01}" (middle of history with gap)
expecting success: rm -f o e &&
git rev-parse --verify "master@{2005-05-26 23:38:00}" >o 2>e &&
test 0000000000000000000000000000000000000000 = $(cat o) &&
test "" = "$(cat e)"
ok 68 - ref name 'foo/*/*' is invalid with options --refspec-pattern
expecting success:
test_must_fail git check-ref-format --refspec-pattern --allow-onelevel 'foo/*/*'
ok 69 - ref name 'foo/*/*' is invalid with options --refspec-pattern --allow-onelevel
expecting success:
test_must_fail git check-ref-format --refspec-pattern '*/foo/*'
ok 43 - Query "master@{2005-05-26 23:38:00}" (middle of history)
expecting success: rm -f o e &&
git rev-parse --verify "master@{2005-05-26 23:43:00}" >o 2>e &&
test a6166d2809963b1da1148e6922729c21214390c8 = $(cat o) &&
test "" = "$(cat e)"
ok 70 - ref name '*/foo/*' is invalid with options --refspec-pattern
expecting success:
test_must_fail git check-ref-format --refspec-pattern --allow-onelevel '*/foo/*'
ok 71 - ref name '*/foo/*' is invalid with options --refspec-pattern --allow-onelevel
expecting success:
test_must_fail git check-ref-format --refspec-pattern '*/*/foo'
Switched to a new branch 'add_sub1'
Branch add_sub1 set up to track remote branch add_sub1 from origin.
ok 44 - Query "master@{2005-05-26 23:43:00}" (exact end of history)
expecting success: rm -f o e &&
git rev-parse --verify "master@{2005-05-28}" >o 2>e &&
test 26caa67a0d551891a2ecec76098a9f8e705ab059 = $(cat o) &&
test "warning: Log for ref refs/heads/master unexpectedly ended on Thu, 26 May 2005 18:43:00 -0500." = "$(cat e)"
ok 72 - ref name '*/*/foo' is invalid with options --refspec-pattern
expecting success:
test_must_fail git check-ref-format --refspec-pattern --allow-onelevel '*/*/foo'
ok 73 - ref name '*/*/foo' is invalid with options --refspec-pattern --allow-onelevel
expecting success:
test_must_fail git check-ref-format '/foo'
ok 74 - ref name '/foo' is invalid
ok 45 - Query "master@{2005-05-28}" (past end of history)
expecting success:
test_must_fail git check-ref-format --allow-onelevel '/foo'
expecting success: echo TEST >F &&
git add F &&
GIT_AUTHOR_DATE="2005-05-26 23:30" \
GIT_COMMITTER_DATE="2005-05-26 23:30" git commit -m add -a &&
h_TEST=$(git rev-parse --verify HEAD) &&
echo The other day this did not work. >M &&
echo And then Bob told me how to fix it. >>M &&
echo OTHER >F &&
GIT_AUTHOR_DATE="2005-05-26 23:41" \
GIT_COMMITTER_DATE="2005-05-26 23:41" git commit -F M -a &&
h_OTHER=$(git rev-parse --verify HEAD) &&
GIT_AUTHOR_DATE="2005-05-26 23:44" \
GIT_COMMITTER_DATE="2005-05-26 23:44" git commit --amend &&
h_FIXED=$(git rev-parse --verify HEAD) &&
echo Merged initial commit and a later commit. >M &&
echo $h_TEST >.git/MERGE_HEAD &&
GIT_AUTHOR_DATE="2005-05-26 23:45" \
GIT_COMMITTER_DATE="2005-05-26 23:45" git commit -F M &&
h_MERGED=$(git rev-parse --verify HEAD) &&
rm -f M
ok 75 - ref name '/foo' is invalid with options --allow-onelevel
expecting success:
test_must_fail git check-ref-format --refspec-pattern '/foo'
ok 76 - ref name '/foo' is invalid with options --refspec-pattern
[master (root-commit) 0c23f5f] add
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 F
create mode 100644 foo.c
expecting success:
test_must_fail git check-ref-format --refspec-pattern --allow-onelevel '/foo'
ok 77 - ref name '/foo' is invalid with options --refspec-pattern --allow-onelevel
expecting success:
test_must_fail git check-ref-format --normalize '/foo'
ok 78 - ref name '/foo' is invalid with options --normalize
expecting success:
git check-ref-format --allow-onelevel --normalize '/foo'
[master d3968db] The other day this did not work. And then Bob told me how to fix it.
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
foo
ok 79 - ref name '/foo' is valid with options --allow-onelevel --normalize
expecting success:
test_must_fail git check-ref-format --refspec-pattern --normalize '/foo'
ok 7 - show-ref --heads, --tags, --head, pattern
ok 80 - ref name '/foo' is invalid with options --refspec-pattern --normalize
expecting success:
git check-ref-format --refspec-pattern --allow-onelevel --normalize '/foo'
# passed all 7 test(s)
1..7
foo
ok 81 - ref name '/foo' is valid with options --refspec-pattern --allow-onelevel --normalize
[master e66de33] The other day this did not work. And then Bob told me how to fix it.
Author: A U Thor <author@example.com>
Date: Thu May 26 23:41:00 2005 +0000
1 file changed, 1 insertion(+), 1 deletion(-)
expecting success:
T=$(git write-tree) &&
sha1=$(echo A | git commit-tree $T) &&
git update-ref refs/heads/master $sha1 &&
git update-ref refs/remotes/origin/master $sha1 &&
git checkout master &&
git checkout origin/master &&
git checkout master &&
refname=$(git check-ref-format --branch @{-1}) &&
test "$refname" = "$sha1" &&
refname2=$(git check-ref-format --branch @{-2}) &&
test "$refname2" = master
*** t1404-update-ref-df-conflicts.sh ***
[master 29d1ccd] Merged initial commit and a later commit.
Author: A U Thor <author@example.com>
ok 46 - creating initial files
expecting success: test_cmp expect .git/logs/refs/heads/master
ok 47 - git commit logged updates
expecting success: test OTHER = $(git cat-file blob master:F)
ok 48 - git cat-file blob master:F (expect OTHER)
expecting success: test TEST = $(git cat-file blob "master@{2005-05-26 23:30}:F")
Already on 'master'
ok 49 - git cat-file blob master@{2005-05-26 23:30}:F (expect TEST)
expecting success: test OTHER = $(git cat-file blob "master@{2005-05-26 23:42}:F")
Note: checking out 'origin/master'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 64ab68f... A
ok 50 - git cat-file blob master@{2005-05-26 23:42}:F (expect OTHER)
expecting success:
echo "$pws" >"$pws" &&
git add -- "$pws" &&
git commit -m "$pws"
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1404-update-ref-df-conflicts/.git/
Submodule 'sub1' (/«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.) registered for path 'sub1'
Switched to branch 'master'
expecting success:
git commit --allow-empty -m Initial &&
C=$(git rev-parse HEAD)
ok 82 - check-ref-format --branch @{-1}
expecting success:
mkdir subdir &&
T=$(git write-tree) &&
sha1=$(echo A | git commit-tree $T) &&
git update-ref refs/heads/master $sha1 &&
git update-ref refs/remotes/origin/master $sha1 &&
git checkout master &&
git checkout origin/master &&
git checkout master &&
refname=$(
cd subdir &&
git check-ref-format --branch @{-1}
) &&
test "$refname" = "$sha1"
[master (root-commit) 9b0e8d9] Initial
Author: A U Thor <author@example.com>
[master 777b7c0] path with space
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 path with space
ok 51 - stdin test setup
expecting success:
test_must_fail git update-ref -z $m $m $m 2>err &&
grep "usage: git update-ref" err
ok 1 - setup
expecting success:
prefix=refs/1l &&
test_update_rejected $prefix "a c e" false "b c/x d" \
"$Q$prefix/c$Q exists; cannot create $Q$prefix/c/x$Q"
usage: git update-ref [<options>] -d <refname> [<old-val>]
ok 52 - -z fails without --stdin
expecting success:
>stdin &&
git update-ref --stdin <stdin &&
git rev-parse --verify -q $m
777b7c02e1a7bb137bd7443e34eb5512b6a19d6c
ok 53 - stdin works with no input
expecting success:
echo "" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: empty command in input" err
fatal: cannot lock ref 'refs/1l/c/x': 'refs/1l/c' exists; cannot create 'refs/1l/c/x'
Already on 'master'
fatal: empty command in input
ok 54 - stdin fails on empty line
expecting success:
echo " " >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: whitespace before command: " err
ok 2 - existing loose ref is a simple prefix of new
Note: checking out 'origin/master'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 64ab68f... A
expecting success:
prefix=refs/1p &&
test_update_rejected $prefix "a c e" true "b c/x d" \
"$Q$prefix/c$Q exists; cannot create $Q$prefix/c/x$Q"
fatal: whitespace before command:
ok 55 - stdin fails on only whitespace
expecting success:
echo " create $a $m" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: whitespace before command: create $a $m" err
Cloning into 'sub1'...
Switched to branch 'master'
fatal: whitespace before command: create refs/heads/a refs/heads/master
ok 56 - stdin fails on leading whitespace
expecting success:
echo "unknown $a" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: unknown command: unknown $a" err
ok 83 - check-ref-format --branch from subdir
expecting success:
refname=$(git check-ref-format --normalize 'heads/foo') &&
test "$refname" = 'heads/foo'
ok 84 - ref name 'heads/foo' simplifies to 'heads/foo'
expecting success:
refname=$(git check-ref-format --normalize 'refs///heads/foo') &&
test "$refname" = 'refs/heads/foo'
fatal: unknown command: unknown refs/heads/a
ok 57 - stdin fails on unknown command
expecting success:
echo "create $a \"master" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: badly quoted argument: \\\"master" err
ok 85 - ref name 'refs///heads/foo' simplifies to 'refs/heads/foo'
expecting success:
refname=$(git check-ref-format --normalize '/heads/foo') &&
test "$refname" = 'heads/foo'
done.
fatal: badly quoted argument: "master
ok 58 - stdin fails on unbalanced quotes
expecting success:
echo "create $a \"ma\zter\"" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: badly quoted argument: \\\"ma\\\\zter\\\"" err
ok 86 - ref name '/heads/foo' simplifies to 'heads/foo'
expecting success:
refname=$(git check-ref-format --normalize '///heads/foo') &&
test "$refname" = 'heads/foo'
fatal: cannot lock ref 'refs/1p/c/x': 'refs/1p/c' exists; cannot create 'refs/1p/c/x'
fatal: badly quoted argument: "ma\zter"
ok 87 - ref name '///heads/foo' simplifies to 'heads/foo'
expecting success:
test_must_fail git check-ref-format --normalize 'foo'
ok 59 - stdin fails on invalid escape
expecting success:
echo "create \"$a\"master" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: unexpected character after quoted argument: \\\"$a\\\"master" err
ok 88 - check-ref-format --normalize rejects 'foo'
ok 3 - existing packed ref is a simple prefix of new
expecting success:
prefix=refs/2l &&
test_update_rejected $prefix "a c e" false "b c/x/y d" \
"$Q$prefix/c$Q exists; cannot create $Q$prefix/c/x/y$Q"
fatal: unexpected character after quoted argument: "refs/heads/a"master
expecting success:
test_must_fail git check-ref-format --normalize '/foo'
ok 60 - stdin fails on junk after quoted argument
expecting success:
echo "create " >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: create: missing <ref>" err
ok 89 - check-ref-format --normalize rejects '/foo'
expecting success:
test_must_fail git check-ref-format --normalize 'heads/foo/../bar'
fatal: create: missing <ref>
ok 61 - stdin fails create with no ref
expecting success:
echo "create $a" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: create $a: missing <newvalue>" err
ok 90 - check-ref-format --normalize rejects 'heads/foo/../bar'
expecting success:
test_must_fail git check-ref-format --normalize 'heads/./foo'
ok 91 - check-ref-format --normalize rejects 'heads/./foo'
expecting success:
test_must_fail git check-ref-format --normalize 'heads\foo'
fatal: create refs/heads/a: missing <newvalue>
ok 62 - stdin fails create with no new value
expecting success:
echo "create $a $m $m" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: create $a: extra input: $m" err
ok 92 - check-ref-format --normalize rejects 'heads\foo'
expecting success:
test_must_fail git check-ref-format --normalize 'heads/foo.lock'
ok 93 - check-ref-format --normalize rejects 'heads/foo.lock'
expecting success:
test_must_fail git check-ref-format --normalize 'heads///foo.lock'
fatal: create refs/heads/a: extra input: refs/heads/master
fatal: cannot lock ref 'refs/2l/c/x/y': 'refs/2l/c' exists; cannot create 'refs/2l/c/x/y'
ok 63 - stdin fails create with too many arguments
expecting success:
echo "update " >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: update: missing <ref>" err
ok 94 - check-ref-format --normalize rejects 'heads///foo.lock'
expecting success:
test_must_fail git check-ref-format --normalize 'foo.lock/bar'
ok 95 - check-ref-format --normalize rejects 'foo.lock/bar'
expecting success:
test_must_fail git check-ref-format --normalize 'foo.lock///bar'
fatal: update: missing <ref>
ok 4 - existing loose ref is a deeper prefix of new
expecting success:
prefix=refs/2p &&
test_update_rejected $prefix "a c e" true "b c/x/y d" \
"$Q$prefix/c$Q exists; cannot create $Q$prefix/c/x/y$Q"
ok 64 - stdin fails update with no ref
expecting success:
echo "update $a" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: update $a: missing <newvalue>" err
ok 96 - check-ref-format --normalize rejects 'foo.lock///bar'
Submodule path 'sub1': checked out '58630c04cd08e6914ad0ab5a3126bcfb71a3e6ca'
# passed all 96 test(s)
1..96
fatal: update refs/heads/a: missing <newvalue>
ok 65 - stdin fails update with no new value
expecting success:
echo "update $a $m $m $m" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: update $a: extra input: $m" err
fatal: update refs/heads/a: extra input: refs/heads/master
ok 66 - stdin fails update with too many arguments
expecting success:
echo "delete " >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: delete: missing <ref>" err
*** t1410-reflog.sh ***
fatal: delete: missing <ref>
ok 67 - stdin fails delete with no ref
expecting success:
echo "delete $a $m $m" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: delete $a: extra input: $m" err
fatal: delete refs/heads/a: extra input: refs/heads/master
ok 68 - stdin fails delete with too many arguments
expecting success:
echo "verify $a $m $m" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: verify $a: extra input: $m" err
fatal: cannot lock ref 'refs/2p/c/x/y': 'refs/2p/c' exists; cannot create 'refs/2p/c/x/y'
Branch replace_sub1_with_file set up to track remote branch replace_sub1_with_file from origin.
fatal: verify refs/heads/a: extra input: refs/heads/master
ok 69 - stdin fails verify with too many arguments
expecting success:
echo "option unknown" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: option unknown: unknown" err
test_must_fail: command succeeded: git read-tree -u -m replace_sub1_with_file
ok 5 - existing packed ref is a deeper prefix of new
expecting success:
prefix=refs/3l &&
test_update_rejected $prefix "a c/x e" false "b c d" \
"$Q$prefix/c/x$Q exists; cannot create $Q$prefix/c$Q"
fatal: option unknown: unknown
ok 70 - stdin fails option with unknown name
expecting success:
cat >stdin <<-EOF &&
create $a $m
create $b $m
create $a $m
EOF
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: Multiple updates for ref '$a' not allowed." err
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1410-reflog/.git/
not ok 10 - git read-tree -u -m: replace submodule with a file must fail # TODO known breakage
checking known breakage:
prolog &&
reset_work_tree_to add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_file origin/replace_sub1_with_file &&
replace_gitfile_with_git_dir sub1 &&
test_must_fail $command replace_sub1_with_file &&
test_superproject_content origin/add_sub1 &&
test_git_directory_is_unchanged sub1 &&
test_submodule_content sub1 origin/add_sub1
)
fatal: Multiple updates for ref 'refs/heads/a' not allowed.
ok 71 - stdin fails with duplicate refs
expecting success:
echo "create $a $m" >stdin &&
git update-ref --stdin <stdin &&
git rev-parse $m >expect &&
git rev-parse $a >actual &&
test_cmp expect actual
expecting success:
mkdir -p A/B &&
echo rat >C &&
echo ox >A/D &&
echo tiger >A/B/E &&
git add . &&
test_tick && git commit -m rabbit &&
H=`git rev-parse --verify HEAD` &&
A=`git rev-parse --verify HEAD:A` &&
B=`git rev-parse --verify HEAD:A/B` &&
C=`git rev-parse --verify HEAD:C` &&
D=`git rev-parse --verify HEAD:A/D` &&
E=`git rev-parse --verify HEAD:A/B/E` &&
check_fsck &&
test_chmod +x C &&
git add C &&
test_tick && git commit -m dragon &&
L=`git rev-parse --verify HEAD` &&
check_fsck &&
rm -f C A/B/E &&
echo snake >F &&
echo horse >A/G &&
git add F A/G &&
test_tick && git commit -a -m sheep &&
F=`git rev-parse --verify HEAD:F` &&
G=`git rev-parse --verify HEAD:A/G` &&
I=`git rev-parse --verify HEAD:A` &&
J=`git rev-parse --verify HEAD` &&
check_fsck &&
rm -f A/G &&
test_tick && git commit -a -m monkey &&
K=`git rev-parse --verify HEAD` &&
check_fsck &&
check_have A B C D E F G H I J K L &&
git prune &&
check_have A B C D E F G H I J K L &&
check_fsck &&
git reflog refs/heads/master >output &&
test_line_count = 4 output
fatal: cannot lock ref 'refs/3l/c': 'refs/3l/c/x' exists; cannot create 'refs/3l/c'
ok 72 - stdin create ref works
expecting success:
test_when_finished "git update-ref -d $outside" &&
echo "create $outside $m" >stdin &&
git update-ref --stdin <stdin &&
git rev-parse $m >expect &&
git rev-parse $outside >actual &&
test_cmp expect actual &&
test_must_fail git reflog exists $outside
ok 6 - new ref is a simple prefix of existing loose
expecting success:
prefix=refs/3p &&
test_update_rejected $prefix "a c/x e" true "b c d" \
"$Q$prefix/c/x$Q exists; cannot create $Q$prefix/c$Q"
[master (root-commit) 07fcc4f] rabbit
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 A/B/E
create mode 100644 A/D
create mode 100644 C
Cloning into 'submodule_update'...
ok 73 - stdin does not create reflogs by default
expecting success:
echo "create $outside $m" >stdin &&
git update-ref --create-reflog --stdin <stdin &&
git rev-parse $m >expect &&
git rev-parse $outside >actual &&
test_cmp expect actual &&
git reflog exists $outside
fatal: cannot lock ref 'refs/3p/c': 'refs/3p/c/x' exists; cannot create 'refs/3p/c'
done.
ok 7 - new ref is a simple prefix of existing packed
expecting success:
prefix=refs/4l &&
test_update_rejected $prefix "a c/x/y e" false "b c d" \
"$Q$prefix/c/x/y$Q exists; cannot create $Q$prefix/c$Q"
ok 74 - stdin creates reflogs with --create-reflog
expecting success:
git update-ref -d $a &&
echo "create $a \"$m\"" >stdin &&
git update-ref --stdin <stdin &&
git rev-parse $m >expect &&
git rev-parse $a >actual &&
test_cmp expect actual
Switched to a new branch 'add_sub1'
Branch add_sub1 set up to track remote branch add_sub1 from origin.
[master 7d1a0b8] dragon
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100644 => 100755 C
fatal: cannot lock ref 'refs/4l/c': 'refs/4l/c/x/y' exists; cannot create 'refs/4l/c'
ok 75 - stdin succeeds with quoted argument
expecting success:
git update-ref -d $a &&
echo "create $a \"ma\\163ter\"" >stdin &&
git update-ref --stdin <stdin &&
git rev-parse $m >expect &&
git rev-parse $a >actual &&
test_cmp expect actual
ok 8 - new ref is a deeper prefix of existing loose
expecting success:
prefix=refs/4p &&
test_update_rejected $prefix "a c/x/y e" true "b c d" \
"$Q$prefix/c/x/y$Q exists; cannot create $Q$prefix/c$Q"
ok 76 - stdin succeeds with escaped character
expecting success:
echo "update $b $m $Z" >stdin &&
git update-ref --stdin <stdin &&
git rev-parse $m >expect &&
git rev-parse $b >actual &&
test_cmp expect actual &&
git update-ref -d $b
[master 15ab5f0] sheep
Author: A U Thor <author@example.com>
4 files changed, 2 insertions(+), 2 deletions(-)
delete mode 100644 A/B/E
create mode 100644 A/G
delete mode 100755 C
create mode 100644 F
fatal: cannot lock ref 'refs/4p/c': 'refs/4p/c/x/y' exists; cannot create 'refs/4p/c'
ok 77 - stdin update ref creates with zero old value
expecting success:
echo "update $b $m $E" >stdin &&
git update-ref --stdin <stdin &&
git rev-parse $m >expect &&
git rev-parse $b >actual &&
test_cmp expect actual
ok 9 - new ref is a deeper prefix of existing packed
expecting success:
prefix=refs/5 &&
test_update_rejected $prefix "a e" false "b c c/x d" \
"cannot process $Q$prefix/c$Q and $Q$prefix/c/x$Q at the same time"
ok 78 - stdin update ref creates with empty old value
expecting success:
echo "create refs/blobs/pws \"$m:$pws\"" >stdin &&
git update-ref --stdin <stdin &&
git rev-parse "$m:$pws" >expect &&
git rev-parse refs/blobs/pws >actual &&
test_cmp expect actual &&
git update-ref -d refs/blobs/pws
[master 3ac530f] monkey
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 A/G
fatal: cannot lock ref 'refs/5/c': cannot process 'refs/5/c' and 'refs/5/c/x' at the same time
ok 10 - one new ref is a simple prefix of another
ok 79 - stdin create ref works with path with space to blob
expecting success:
echo "update $c $m $m~1" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: cannot lock ref '$c'" err &&
test_must_fail git rev-parse --verify -q $c
# passed all 10 test(s)
1..10
Submodule 'sub1' (/«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.) registered for path 'sub1'
tree
fatal: cannot lock ref 'refs/heads/c': unable to resolve reference refs/heads/c: No such file or directory
tree
ok 80 - stdin update ref fails with wrong old value
expecting success:
echo "update $c $m does-not-exist" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: update $c: invalid <oldvalue>: does-not-exist" err &&
test_must_fail git rev-parse --verify -q $c
*** t1411-reflog-show.sh ***
blob
fatal: update refs/heads/c: invalid <oldvalue>: does-not-exist
blob
ok 81 - stdin update ref fails with bad old value
expecting success:
echo "create $c does-not-exist" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: create $c: invalid <newvalue>: does-not-exist" err &&
test_must_fail git rev-parse --verify -q $c
blob
blob
fatal: create refs/heads/c: invalid <newvalue>: does-not-exist
blob
ok 82 - stdin create ref fails with bad new value
expecting success:
echo "create $c " >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: create $c: zero <newvalue>" err &&
test_must_fail git rev-parse --verify -q $c
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1411-reflog-show/.git/
commit
expecting success:
echo content >file &&
git add file &&
test_tick &&
git commit -m one
fatal: create refs/heads/c: zero <newvalue>
tree
Cloning into 'sub1'...
ok 83 - stdin create ref fails with zero new value
expecting success:
echo "update $b $m~1 $m" >stdin &&
git update-ref --stdin <stdin &&
git rev-parse $m~1 >expect &&
git rev-parse $b >actual &&
test_cmp expect actual
commit
commit
[master (root-commit) e46513e] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 1 - setup
commit
expecting success:
git log -g -1 >tmp &&
grep ^Reflog <tmp >actual &&
test_cmp expect actual
ok 84 - stdin update ref works with right old value
expecting success:
echo "delete $a $m~1" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: cannot lock ref '$a'" err &&
git rev-parse $m >expect &&
git rev-parse $a >actual &&
test_cmp expect actual
done.
ok 2 - log -g shows reflog headers
expecting success:
git log -g -1 --oneline >actual &&
test_cmp expect actual
tree
fatal: cannot lock ref 'refs/heads/a': ref refs/heads/a is at 777b7c02e1a7bb137bd7443e34eb5512b6a19d6c but expected 29d1ccdc7ee9fe415beb2415b6206b8a20f76b1c
tree
ok 3 - oneline reflog format
expecting success:
git reflog -1 >actual &&
test_cmp expect actual
blob
blob
ok 85 - stdin delete ref fails with wrong old value
expecting success:
echo "delete $a " >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: delete $a: zero <oldvalue>" err &&
git rev-parse $m >expect &&
git rev-parse $a >actual &&
test_cmp expect actual
ok 4 - reflog default format
blob
expecting success:
git reflog --format=short -1 >actual &&
test_cmp expect actual
fatal: delete refs/heads/a: zero <oldvalue>
blob
blob
ok 5 - override reflog default format
expecting success:
git log -g -1 HEAD@{now} >tmp &&
grep ^Reflog <tmp >actual &&
test_cmp expect actual
ok 86 - stdin delete ref fails with zero old value
expecting success:
git symbolic-ref TESTSYMREF $b &&
cat >stdin <<-EOF &&
option no-deref
update TESTSYMREF $a $b
EOF
git update-ref --stdin <stdin &&
git rev-parse TESTSYMREF >expect &&
git rev-parse $a >actual &&
test_cmp expect actual &&
git rev-parse $m~1 >expect &&
git rev-parse $b >actual &&
test_cmp expect actual
commit
tree
ok 6 - using @{now} syntax shows reflog date (multiline)
commit
expecting success:
git log -g -1 --oneline HEAD@{now} >actual &&
test_cmp expect actual
commit
commit
ok 7 - using @{now} syntax shows reflog date (oneline)
expecting success:
git log -g -1 --format=%gd HEAD@{now} >actual &&
test_cmp expect actual
Submodule path 'sub1': checked out '58630c04cd08e6914ad0ab5a3126bcfb71a3e6ca'
ok 8 - using @{now} syntax shows reflog date (format=%gd)
expecting success:
git log -g -1 --date=default >tmp &&
grep ^Reflog <tmp >actual &&
test_cmp expect actual
ok 87 - stdin update symref works option no-deref
expecting success:
git symbolic-ref TESTSYMREF $b &&
cat >stdin <<-EOF &&
option no-deref
delete TESTSYMREF $b
EOF
git update-ref --stdin <stdin &&
test_must_fail git rev-parse --verify -q TESTSYMREF &&
git rev-parse $m~1 >expect &&
git rev-parse $b >actual &&
test_cmp expect actual
ok 1 - setup
expecting success:
test_tick && git reset --hard HEAD~2 &&
test -f C &&
test -f A/B/E &&
! test -f F &&
! test -f A/G &&
check_have A B C D E F G H I J K L &&
git prune &&
check_have A B C D E F G H I J K L &&
git reflog refs/heads/master >output &&
test_line_count = 5 output
ok 9 - using --date= shows reflog date (multiline)
expecting success:
git log -g -1 --oneline --date=default >actual &&
test_cmp expect actual
HEAD is now at 7d1a0b8 dragon
ok 10 - using --date= shows reflog date (oneline)
Branch replace_sub1_with_file set up to track remote branch replace_sub1_with_file from origin.
expecting success:
git log -g -1 --format=%gd --date=raw >actual &&
test_cmp expect actual
tree
ok 88 - stdin delete symref works option no-deref
expecting success:
echo "delete $b $m~1" >stdin &&
git update-ref --stdin <stdin &&
test_must_fail git rev-parse --verify -q $b
tree
blob
ok 11 - using --date= shows reflog date (format=%gd)
expecting success:
test_config log.date raw &&
git log -g -1 >tmp &&
grep ^Reflog <tmp >actual &&
test_cmp expect actual
ok 89 - stdin delete ref works with right old value
expecting success:
cat >stdin <<-EOF &&
update $a $m
create $b $m
verify $c
EOF
git update-ref --stdin <stdin &&
git rev-parse $m >expect &&
git rev-parse $a >actual &&
test_cmp expect actual &&
git rev-parse $b >actual &&
test_cmp expect actual &&
test_must_fail git rev-parse --verify -q $c
blob
blob
blob
blob
commit
ok 12 - log.date does not invoke "--date" magic (multiline)
expecting success:
test_config log.date raw &&
git log -g -1 --oneline >actual &&
test_cmp expect actual
tree
commit
commit
ok 90 - stdin update/create/verify combination works
expecting success:
git rev-parse $m >expect &&
echo "verify $m $m" >stdin &&
git update-ref --stdin <stdin &&
git rev-parse $m >actual &&
test_cmp expect actual
commit
test_must_fail: command succeeded: git read-tree -u -m replace_sub1_with_file
ok 13 - log.date does not invoke "--date" magic (oneline)
expecting success:
test_config log.date raw &&
git log -g -1 --format=%gd >actual &&
test_cmp expect actual
ok 91 - stdin verify succeeds for correct value
expecting success:
echo "verify refs/heads/missing $Z" >stdin &&
git update-ref --stdin <stdin &&
test_must_fail git rev-parse --verify -q refs/heads/missing
tree
not ok 11 - git read-tree -u -m: replace submodule containing a .git directory with a file must fail # TODO known breakage
expecting success:
prolog &&
reset_work_tree_to add_sub1 &&
(
cd submodule_update &&
git branch -t modify_sub1 origin/modify_sub1 &&
$command modify_sub1 &&
test_superproject_content origin/modify_sub1 &&
test_submodule_content sub1 origin/add_sub1 &&
git submodule update &&
test_submodule_content sub1 origin/modify_sub1
)
tree
ok 92 - stdin verify succeeds for missing reference
expecting success:
echo "verify refs/heads/missing" >stdin &&
git update-ref --stdin <stdin &&
test_must_fail git rev-parse --verify -q refs/heads/missing
blob
ok 14 - log.date does not invoke "--date" magic (format=%gd)
expecting success:
git log -g -1 --format=%gd --date=raw HEAD@{0} >actual &&
test_cmp expect actual
blob
ok 93 - stdin verify treats no value as missing
expecting success:
git rev-parse $m >expect &&
echo "verify $m $m~1" >stdin &&
test_must_fail git update-ref --stdin <stdin &&
git rev-parse $m >actual &&
test_cmp expect actual
blob
ok 15 - --date magic does not override explicit @{0} syntax
expecting success:
git branch empty &&
git reflog expire --expire=all refs/heads/empty &&
git log -g empty >actual &&
test_cmp expect actual
blob
fatal: cannot lock ref 'refs/heads/master': ref refs/heads/master is at 777b7c02e1a7bb137bd7443e34eb5512b6a19d6c but expected 29d1ccdc7ee9fe415beb2415b6206b8a20f76b1c
blob
commit
ok 94 - stdin verify fails for wrong value
expecting success:
git rev-parse $m >expect &&
echo "verify $m $Z" >stdin &&
test_must_fail git update-ref --stdin <stdin &&
git rev-parse $m >actual &&
test_cmp expect actual
tree
commit
Cloning into 'submodule_update'...
fatal: cannot lock ref 'refs/heads/master': ref refs/heads/master is at 777b7c02e1a7bb137bd7443e34eb5512b6a19d6c but expected 0000000000000000000000000000000000000000
ok 16 - empty reflog file
expecting success:
test_commit two &&
git branch flipflop &&
git update-ref refs/heads/flipflop -m flip1 HEAD^ &&
git update-ref refs/heads/flipflop -m flop1 HEAD &&
git update-ref refs/heads/flipflop -m flip2 HEAD^ &&
git log -g -p flipflop >reflog &&
grep -v ^Reflog reflog >actual &&
git log -1 -p HEAD^ >log.one &&
git log -1 -p HEAD >log.two &&
(
cat log.one; echo
cat log.two; echo
cat log.one; echo
cat log.two
) >expect &&
test_cmp expect actual
commit
commit
ok 95 - stdin verify fails for mistaken null value
expecting success:
M=$(git rev-parse $m) &&
test_when_finished "git update-ref $m $M" &&
git rev-parse $m >expect &&
echo "verify $m" >stdin &&
test_must_fail git update-ref --stdin <stdin &&
git rev-parse $m >actual &&
test_cmp expect actual
[master fc3e0aa] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
ok 2 - rewind
expecting success:
corrupt $F &&
check_fsck "missing blob $F"
fatal: cannot lock ref 'refs/heads/master': ref refs/heads/master is at 777b7c02e1a7bb137bd7443e34eb5512b6a19d6c but expected 0000000000000000000000000000000000000000
done.
ok 96 - stdin verify fails for mistaken empty value
expecting success:
cat >stdin <<-EOF &&
update $a $m $m
update $b $m $m
update $c $Z $E
EOF
git update-ref --stdin <stdin &&
git rev-parse $m >expect &&
git rev-parse $a >actual &&
test_cmp expect actual &&
git rev-parse $b >actual &&
test_cmp expect actual &&
test_must_fail git rev-parse --verify -q $c
missing blob 9ae84adb2704cbd49549e52169b4043871e13432
ok 3 - corrupt and check
expecting success:
git reflog expire --dry-run \
--expire=$(($test_tick - 10000)) \
--expire-unreachable=$(($test_tick - 10000)) \
--stale-fix \
--all &&
git reflog refs/heads/master >output &&
test_line_count = 5 output &&
check_fsck "missing blob $F"
Switched to a new branch 'add_sub1'
Branch add_sub1 set up to track remote branch add_sub1 from origin.
would prune commit: sheep
would prune commit: monkey
would prune reset: moving to HEAD~2
would prune commit: sheep
would prune commit: monkey
would prune reset: moving to HEAD~2
ok 97 - stdin update refs works with identity updates
expecting success:
git update-ref $c $m &&
cat >stdin <<-EOF &&
update $a $m $m
update $b $m $m
update $c
EOF
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: cannot lock ref '$c'" err &&
git rev-parse $m >expect &&
git rev-parse $a >actual &&
test_cmp expect actual &&
git rev-parse $b >actual &&
test_cmp expect actual &&
git rev-parse $c >actual &&
test_cmp expect actual
missing blob 9ae84adb2704cbd49549e52169b4043871e13432
ok 4 - reflog expire --dry-run should not touch reflog
expecting success:
git reflog expire --verbose \
--expire=$(($test_tick - 10000)) \
--expire-unreachable=$(($test_tick - 10000)) \
--stale-fix \
--all &&
git reflog refs/heads/master >output &&
test_line_count = 2 output &&
check_fsck "dangling commit $K"
Marking reachable objects...
keep commit (initial): rabbit
keep commit: dragon
prune commit: sheep
prune commit: monkey
prune reset: moving to HEAD~2
keep commit (initial): rabbit
keep commit: dragon
prune commit: sheep
prune commit: monkey
prune reset: moving to HEAD~2
fatal: cannot lock ref 'refs/heads/c': ref refs/heads/c is at 777b7c02e1a7bb137bd7443e34eb5512b6a19d6c but expected 0000000000000000000000000000000000000000
ok 17 - git log -g -p shows diffs vs. parents
expecting success:
git reflog exists refs/heads/master &&
! git reflog exists refs/heads/nonexistent
dangling commit 3ac530f2f6c3a45206a6b2d455baf89d1c8f672d
ok 18 - reflog exists works
ok 5 - reflog expire
expecting success:
git prune &&
check_fsck &&
check_have A B C D E H L &&
check_dont_have F G I J K
ok 98 - stdin update refs fails with wrong old value
# passed all 18 test(s)
1..18
expecting success:
git pack-refs --all &&
git update-ref $c $m~1 &&
cat >stdin <<-EOF &&
delete $a $m
update $b $Z $m
update $c $E $m~1
EOF
git update-ref --stdin <stdin &&
test_must_fail git rev-parse --verify -q $a &&
test_must_fail git rev-parse --verify -q $b &&
test_must_fail git rev-parse --verify -q $c
*** t1412-reflog-loop.sh ***
tree
tree
blob
ok 99 - stdin delete refs works with packed and loose refs
expecting success:
>stdin &&
git update-ref -z --stdin <stdin &&
git rev-parse --verify -q $m
Submodule 'sub1' (/«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.) registered for path 'sub1'
blob
blob
777b7c02e1a7bb137bd7443e34eb5512b6a19d6c
ok 100 - stdin -z works on empty input
expecting success:
echo "" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: whitespace before command: " err
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1412-reflog-loop/.git/
commit
fatal: whitespace before command:
expecting success:
test_tick &&
echo content >file && git add file && git commit -m one &&
git tag one &&
echo content >>file && git add file && git commit -m two &&
git tag two
ok 101 - stdin -z fails on empty line
expecting success:
printf $F "" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: empty command in input" err
commit
fatal: git cat-file: could not get object info
fatal: git cat-file: could not get object info
fatal: empty command in input
ok 102 - stdin -z fails on empty command
expecting success:
printf $F " " >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: whitespace before command: " err
fatal: git cat-file: could not get object info
[master (root-commit) e46513e] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
fatal: whitespace before command:
ok 103 - stdin -z fails on only whitespace
expecting success:
printf $F " create $a" "$m" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: whitespace before command: create $a" err
fatal: git cat-file: could not get object info
fatal: git cat-file: could not get object info
fatal: whitespace before command: create refs/heads/a
ok 6 - prune and fsck
expecting success:
recover $F &&
check_fsck "dangling blob $F"
ok 104 - stdin -z fails on leading whitespace
expecting success:
printf $F "unknown $a" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: unknown command: unknown $a" err
Cloning into 'sub1'...
fatal: unknown command: unknown refs/heads/a
ok 105 - stdin -z fails on unknown command
expecting success:
printf $F "create " >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: create: missing <ref>" err
[master 441e5e0] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
fatal: create: missing <ref>
ok 106 - stdin -z fails create with no ref
expecting success:
printf $F "create $a" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: create $a: unexpected end of input when reading <newvalue>" err
dangling blob 9ae84adb2704cbd49549e52169b4043871e13432
ok 7 - recover and check
expecting success:
echo 1 > C &&
test_tick &&
git commit -m rat C &&
echo 2 > C &&
test_tick &&
git commit -m ox C &&
echo 3 > C &&
test_tick &&
git commit -m tiger C &&
HEAD_entry_count=$(git reflog | wc -l) &&
master_entry_count=$(git reflog show master | wc -l) &&
test $HEAD_entry_count = 5 &&
test $master_entry_count = 5 &&
git reflog delete master@{1} &&
git reflog show master > output &&
test $(($master_entry_count - 1)) = $(wc -l < output) &&
test $HEAD_entry_count = $(git reflog | wc -l) &&
! grep ox < output &&
master_entry_count=$(wc -l < output) &&
git reflog delete HEAD@{1} &&
test $(($HEAD_entry_count -1)) = $(git reflog | wc -l) &&
test $master_entry_count = $(git reflog show master | wc -l) &&
HEAD_entry_count=$(git reflog | wc -l) &&
git reflog delete master@{07.04.2005.15:15:00.-0700} &&
git reflog show master > output &&
test $(($master_entry_count - 1)) = $(wc -l < output) &&
! grep dragon < output
ok 1 - setup commits
expecting success:
git checkout -b topic &&
git reset one &&
git reset two &&
git reset one &&
git reset two
fatal: create refs/heads/a: unexpected end of input when reading <newvalue>
ok 107 - stdin -z fails create with no new value
expecting success:
printf $F "create $a" "$m" "$m" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: unknown command: $m" err
done.
fatal: unknown command: refs/heads/master
Switched to a new branch 'topic'
ok 108 - stdin -z fails create with too many arguments
expecting success:
printf $F "update " >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: update: missing <ref>" err
[master b60a214] rat
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Unstaged changes after reset:
M file
fatal: update: missing <ref>
ok 109 - stdin -z fails update with no ref
expecting success:
printf $F "update $a" "$m" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: update $a: unexpected end of input when reading <oldvalue>" err
[master 9908ef9] ox
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
fatal: update refs/heads/a: unexpected end of input when reading <oldvalue>
ok 110 - stdin -z fails update with too few args
expecting success:
git update-ref $a $m &&
printf $F "update $a" "" "" >stdin &&
git update-ref -z --stdin <stdin 2>err &&
grep "warning: update $a: missing <newvalue>, treating as zero" err &&
test_must_fail git rev-parse --verify -q $a
Unstaged changes after reset:
M file
[master b93561f] tiger
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
warning: update refs/heads/a: missing <newvalue>, treating as zero
ok 2 - setup reflog with alternating commits
expecting success:
cat >expect <<-\EOF &&
topic@{0} reset: moving to two
topic@{1} reset: moving to one
topic@{2} reset: moving to two
topic@{3} reset: moving to one
topic@{4} branch: Created from HEAD
EOF
git log -g --format="%gd %gs" topic >actual &&
test_cmp expect actual
ok 111 - stdin -z emits warning with empty new value
expecting success:
printf $F "update $a" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: update $a: unexpected end of input when reading <newvalue>" err
fatal: update refs/heads/a: unexpected end of input when reading <newvalue>
ok 112 - stdin -z fails update with no new value
expecting success:
printf $F "update $a" "$m" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: update $a: unexpected end of input when reading <oldvalue>" err
ok 3 - reflog shows all entries
# passed all 3 test(s)
1..3
fatal: update refs/heads/a: unexpected end of input when reading <oldvalue>
ok 113 - stdin -z fails update with no old value
expecting success:
printf $F "update $a" "$m" "$m" "$m" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: unknown command: $m" err
Submodule path 'sub1': checked out '58630c04cd08e6914ad0ab5a3126bcfb71a3e6ca'
fatal: unknown command: refs/heads/master
ok 114 - stdin -z fails update with too many arguments
expecting success:
printf $F "delete " >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: delete: missing <ref>" err
fatal: delete: missing <ref>
ok 115 - stdin -z fails delete with no ref
expecting success:
printf $F "delete $a" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: delete $a: unexpected end of input when reading <oldvalue>" err
*** t1413-reflog-detach.sh ***
fatal: delete refs/heads/a: unexpected end of input when reading <oldvalue>
ok 116 - stdin -z fails delete with no old value
expecting success:
printf $F "delete $a" "$m" "$m" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: unknown command: $m" err
fatal: unknown command: refs/heads/master
ok 117 - stdin -z fails delete with too many arguments
expecting success:
printf $F "verify $a" "$m" "$m" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: unknown command: $m" err
Branch modify_sub1 set up to track remote branch modify_sub1 from origin.
fatal: unknown command: refs/heads/master
ok 118 - stdin -z fails verify with too many arguments
expecting success:
printf $F "verify $a" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: verify $a: unexpected end of input when reading <oldvalue>" err
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1413-reflog-detach/.git/
fatal: verify refs/heads/a: unexpected end of input when reading <oldvalue>
ok 119 - stdin -z fails verify with no old value
expecting success:
printf $F "option unknown" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: option unknown: unknown" err
expecting success:
test_tick &&
git commit --allow-empty -m initial &&
git branch side &&
test_tick &&
git commit --allow-empty -m second &&
cat .git/logs/HEAD >saved_reflog
fatal: option unknown: unknown
ok 120 - stdin -z fails option with unknown name
expecting success:
printf $F "create $a" "$m" "create $b" "$m" "create $a" "$m" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: Multiple updates for ref '$a' not allowed." err
ok 8 - delete
expecting success:
test_tick && git reset --hard HEAD~2 &&
git reflog refs/heads/master >output &&
test_line_count = 4 output
[master (root-commit) 66fe8b3] initial
Author: A U Thor <author@example.com>
fatal: Multiple updates for ref 'refs/heads/a' not allowed.
ok 121 - stdin -z fails with duplicate refs
expecting success:
printf $F "create $a" "$m" >stdin &&
git update-ref -z --stdin <stdin &&
git rev-parse $m >expect &&
git rev-parse $a >actual &&
test_cmp expect actual
HEAD is now at b60a214 rat
ok 9 - rewind2
[master
5ce2b00] second
Author: A U Thor <author@example.com>
expecting success:
git reflog expire --verbose \
--expire=never \
--expire-unreachable=never \
--all &&
git reflog refs/heads/master >output &&
test_line_count = 4 output
ok 1 - setup
expecting success:
reset_state &&
git rev-parse master master^ >expect &&
git log -g --format=%H >actual &&
test_cmp expect actual
ok 122 - stdin -z create ref works
expecting success:
printf $F "update $b" "$m" "$Z" >stdin &&
git update-ref -z --stdin <stdin &&
git rev-parse $m >expect &&
git rev-parse $b >actual &&
test_cmp expect actual &&
git update-ref -d $b
keep commit (initial): rabbit
keep commit: rat
keep commit: tiger
keep reset: moving to HEAD~2
keep commit (initial): rabbit
keep commit: dragon
keep commit: rat
keep commit: tiger
keep reset: moving to HEAD~2
Already on 'master'
ok 10 - --expire=never
expecting success:
git config gc.reflogexpire never &&
git config gc.reflogexpireunreachable never &&
git reflog expire --verbose --all &&
git reflog refs/heads/master >output &&
test_line_count = 4 output
ok 123 - stdin -z update ref creates with zero old value
expecting success:
printf $F "update $b" "$m" "" >stdin &&
git update-ref -z --stdin <stdin &&
git rev-parse $m >expect &&
git rev-parse $b >actual &&
test_cmp expect actual
ok 2 - baseline
expecting success:
reset_state &&
git rev-parse side master master^ >expect &&
git checkout side &&
git log -g --format=%H >actual &&
test_cmp expect actual
keep commit (initial): rabbit
keep commit: rat
keep commit: tiger
keep reset: moving to HEAD~2
keep commit (initial): rabbit
keep commit: dragon
keep commit: rat
keep commit: tiger
keep reset: moving to HEAD~2
Already on 'master'
ok 124 - stdin -z update ref creates with empty old value
expecting success:
printf $F "create refs/blobs/pws" "$m:$pws" >stdin &&
git update-ref -z --stdin <stdin &&
git rev-parse "$m:$pws" >expect &&
git rev-parse refs/blobs/pws >actual &&
test_cmp expect actual &&
git update-ref -d refs/blobs/pws
ok 11 - gc.reflogexpire=never
expecting success:
git config gc.reflogexpire false &&
git config gc.reflogexpireunreachable false &&
git reflog expire --verbose --all &&
git reflog refs/heads/master >output &&
test_line_count = 4 output &&
git config --unset gc.reflogexpire &&
git config --unset gc.reflogexpireunreachable
Switched to branch 'side'
ok 3 - switch to branch
expecting success:
reset_state &&
git rev-parse master side master master^ >expect &&
git checkout side &&
git checkout master^0 &&
git log -g --format=%H >actual &&
test_cmp expect actual
keep commit (initial): rabbit
keep commit: rat
keep commit: tiger
keep reset: moving to HEAD~2
keep commit (initial): rabbit
keep commit: dragon
keep commit: rat
keep commit: tiger
keep reset: moving to HEAD~2
Switched to branch 'master'
ok 125 - stdin -z create ref works with path with space to blob
expecting success:
printf $F "update $c" "$m" "$m~1" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: cannot lock ref '$c'" err &&
test_must_fail git rev-parse --verify -q $c
fatal: cannot lock ref 'refs/heads/c': unable to resolve reference refs/heads/c: No such file or directory
ok 126 - stdin -z update ref fails with wrong old value
expecting success:
printf $F "update $c" "$m" "does-not-exist" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: update $c: invalid <oldvalue>: does-not-exist" err &&
test_must_fail git rev-parse --verify -q $c
Switched to branch 'side'
ok 12 - gc.reflogexpire=false
expecting success:
test $(git reflog master | wc -l) = 4 &&
git branch foo &&
git pack-refs --all &&
git checkout foo &&
test $(git reflog master | wc -l) = 4
Note: checking out 'master^0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 5ce2b00... second
fatal: update refs/heads/c: invalid <oldvalue>: does-not-exist
ok 127 - stdin -z update ref fails with bad old value
expecting success:
git update-ref $c $m &&
git rev-parse "$c" >expect &&
printf $F "create $c" "$m~1" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: cannot lock ref '$c'" err &&
git rev-parse "$c" >actual &&
test_cmp expect actual
ok 4 - detach to other
expecting success:
reset_state &&
git rev-parse master master master^ >expect &&
git checkout master^0 &&
git log -g --format=%H >actual &&
test_cmp expect actual
Switched to branch 'master'
Switched to branch 'foo'
Submodule path 'sub1': checked out '853843e63cd0418826f5b5ca76d712e9cd620078'
fatal: cannot lock ref 'refs/heads/c': ref refs/heads/c is at 777b7c02e1a7bb137bd7443e34eb5512b6a19d6c but expected 0000000000000000000000000000000000000000
ok 13 - checkout should not delete log for packed ref
expecting success:
test_when_finished "git branch -d one || git branch -d one/two" &&
git branch one/two master &&
echo "one/two@{0} branch: Created from master" >expect &&
git log -g --format="%gd %gs" one/two >actual &&
test_cmp expect actual &&
git branch -d one/two &&
# now logs/refs/heads/one is a stale directory, but
# we should move it out of the way to create "one" reflog
git branch one master &&
echo "one@{0} branch: Created from master" >expect &&
git log -g --format="%gd %gs" one >actual &&
test_cmp expect actual
ok 128 - stdin -z create ref fails when ref exists
expecting success:
git update-ref -d "$c" &&
printf $F "create $c" "does-not-exist" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: create $c: invalid <newvalue>: does-not-exist" err &&
test_must_fail git rev-parse --verify -q $c
Note: checking out 'master^0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 5ce2b00... second
fatal: create refs/heads/c: invalid <newvalue>: does-not-exist
ok 129 - stdin -z create ref fails with bad new value
expecting success:
printf $F "create $c" "" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: create $c: missing <newvalue>" err &&
test_must_fail git rev-parse --verify -q $c
ok 5 - detach to self
expecting success:
reset_state &&
git rev-parse master master master master^ >expect &&
git checkout master^0 &&
git checkout master &&
git log -g --format=%H >actual &&
test_cmp expect actual
Deleted branch one/two (was b60a214).
ok 12 - git read-tree -u -m: modified submodule does not update submodule work tree
expecting success:
prolog &&
reset_work_tree_to add_sub1 &&
(
cd submodule_update &&
git branch -t invalid_sub1 origin/invalid_sub1 &&
$command invalid_sub1 &&
test_superproject_content origin/invalid_sub1 &&
test_submodule_content sub1 origin/add_sub1 &&
test_must_fail git submodule update &&
test_submodule_content sub1 origin/add_sub1
)
fatal: create refs/heads/c: missing <newvalue>
Switched to branch 'master'
ok 130 - stdin -z create ref fails with empty new value
expecting success:
printf $F "update $b" "$m~1" "$m" >stdin &&
git update-ref -z --stdin <stdin &&
git rev-parse $m~1 >expect &&
git rev-parse $b >actual &&
test_cmp expect actual
Note: checking out 'master^0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 5ce2b00... second
Deleted branch one (was b60a214).
ok 14 - stale dirs do not cause d/f conflicts (reflogs on)
expecting success:
test_when_finished "git branch -d one || git branch -d one/two" &&
git branch one/two master &&
echo "one/two@{0} branch: Created from master" >expect &&
git log -g --format="%gd %gs" one/two >actual &&
test_cmp expect actual &&
git branch -d one/two &&
# same as before, but we only create a reflog for "one" if
# it already exists, which it does not
git -c core.logallrefupdates=false branch one master &&
: >expect &&
git log -g --format="%gd %gs" one >actual &&
test_cmp expect actual
Switched to branch 'master'
ok 131 - stdin -z update ref works with right old value
expecting success:
printf $F "delete $a" "$m~1" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: cannot lock ref '$a'" err &&
git rev-parse $m >expect &&
git rev-parse $a >actual &&
test_cmp expect actual
fatal: cannot lock ref 'refs/heads/a': ref refs/heads/a is at 777b7c02e1a7bb137bd7443e34eb5512b6a19d6c but expected 29d1ccdc7ee9fe415beb2415b6206b8a20f76b1c
ok 6 - attach to self
expecting success:
reset_state &&
git rev-parse side master master master^ >expect &&
git checkout master^0 &&
git checkout side &&
git log -g --format=%H >actual &&
test_cmp expect actual
Already on 'master'
Cloning into 'submodule_update'...
Deleted branch one/two (was b60a214).
ok 132 - stdin -z delete ref fails with wrong old value
expecting success:
printf $F "delete $a" "$Z" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: delete $a: zero <oldvalue>" err &&
git rev-parse $m >expect &&
git rev-parse $a >actual &&
test_cmp expect actual
fatal: delete refs/heads/a: zero <oldvalue>
Note: checking out 'master^0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 5ce2b00... second
done.
ok 133 - stdin -z delete ref fails with zero old value
expecting success:
git symbolic-ref TESTSYMREF $b &&
printf $F "option no-deref" "update TESTSYMREF" "$a" "$b" >stdin &&
git update-ref -z --stdin <stdin &&
git rev-parse TESTSYMREF >expect &&
git rev-parse $a >actual &&
test_cmp expect actual &&
git rev-parse $m~1 >expect &&
git rev-parse $b >actual &&
test_cmp expect actual
warning: unable to unlink .git/logs/refs/heads/one: Is a directory
Deleted branch one (was b60a214).
Previous HEAD position was 5ce2b00... second
Switched to branch 'side'
ok 15 - stale dirs do not cause d/f conflicts (reflogs off)
expecting success:
git checkout -b reflogskip &&
z38=00000000000000000000000000000000000000 &&
ident="abc <xyz> 0000000001 +0000" &&
for i in $(test_seq 1 75); do
printf "$z38%02d $z38%02d %s\t" $i $(($i+1)) "$ident" &&
if test $i = 75; then
for j in $(test_seq 1 89); do
printf X
done
else
printf X
fi &&
printf "\n"
done >.git/logs/refs/heads/reflogskip &&
git rev-parse reflogskip@{73} >actual &&
echo ${z38}03 >expect &&
test_cmp expect actual
ok 7 - attach to other
Switched to a new branch 'reflogskip'
# passed all 7 test(s)
1..7
Switched to a new branch 'add_sub1'
Branch add_sub1 set up to track remote branch add_sub1 from origin.
*** t1420-lost-found.sh ***
ok 134 - stdin -z update symref works option no-deref
expecting success:
git symbolic-ref TESTSYMREF $b &&
printf $F "option no-deref" "delete TESTSYMREF" "$b" >stdin &&
git update-ref -z --stdin <stdin &&
test_must_fail git rev-parse --verify -q TESTSYMREF &&
git rev-parse $m~1 >expect &&
git rev-parse $b >actual &&
test_cmp expect actual
ok 16 - parsing reverse reflogs at BUFSIZ boundaries
# passed all 16 test(s)
1..16
ok 135 - stdin -z delete symref works option no-deref
expecting success:
printf $F "delete $b" "$m~1" >stdin &&
git update-ref -z --stdin <stdin &&
test_must_fail git rev-parse --verify -q $b
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1420-lost-found/.git/
*** t1430-bad-ref-name.sh ***
expecting success:
git config core.logAllRefUpdates 0 &&
: > file1 &&
git add file1 &&
test_tick &&
git commit -m initial &&
echo 1 > file1 &&
echo 2 > file2 &&
git add file1 file2 &&
test_tick &&
git commit -m second &&
echo 3 > file3 &&
git add file3
ok 136 - stdin -z delete ref works with right old value
expecting success:
printf $F "update $a" "$m" "" "create $b" "$m" "verify $c" "" >stdin &&
git update-ref -z --stdin <stdin &&
git rev-parse $m >expect &&
git rev-parse $a >actual &&
test_cmp expect actual &&
git rev-parse $b >actual &&
test_cmp expect actual &&
test_must_fail git rev-parse --verify -q $c
[master (root-commit) 9bb1ae9] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file1
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1430-bad-ref-name/.git/
expecting success:
test_commit one &&
test_commit two
[master 8ad33be] second
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 file2
ok 137 - stdin -z update/create/verify combination works
expecting success:
git rev-parse $m >expect &&
printf $F "verify $m" "$m" >stdin &&
git update-ref -z --stdin <stdin &&
git rev-parse $m >actual &&
test_cmp expect actual
ok 1 - setup
expecting success:
git rev-parse HEAD > lost-commit &&
git rev-parse :file3 > lost-other &&
test_tick &&
git reset --hard HEAD^ &&
git fsck --lost-found &&
test 2 = $(ls .git/lost-found/*/* | wc -l) &&
test -f .git/lost-found/commit/$(cat lost-commit) &&
test -f .git/lost-found/other/$(cat lost-other)
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
ok 138 - stdin -z verify succeeds for correct value
expecting success:
printf $F "verify refs/heads/missing" "$Z" >stdin &&
git update-ref -z --stdin <stdin &&
test_must_fail git rev-parse --verify -q refs/heads/missing
Submodule 'sub1' (/«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.) registered for path 'sub1'
HEAD is now at 9bb1ae9 initial
ok 139 - stdin -z verify succeeds for missing reference
expecting success:
printf $F "verify refs/heads/missing" "" >stdin &&
git update-ref -z --stdin <stdin &&
test_must_fail git rev-parse --verify -q refs/heads/missing
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
ok 140 - stdin -z verify treats no value as missing
expecting success:
git rev-parse $m >expect &&
printf $F "verify $m" "$m~1" >stdin &&
test_must_fail git update-ref -z --stdin <stdin &&
git rev-parse $m >actual &&
test_cmp expect actual
dangling blob 00750edc07d6415dcc07ae0351e9397b0222b7ba
dangling commit 8ad33beea8de8e15812274614acd0a26d73b60f8
ok 1 - setup
expecting success:
test_when_finished "rm -f .git/objects/pack_* .git/objects/index_*" &&
cat >input <<-INPUT_END &&
commit .badbranchname
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT
corrupt
COMMIT
from refs/heads/master
INPUT_END
test_must_fail git fast-import <input
ok 2 - lost and found something
fatal: cannot lock ref 'refs/heads/master': ref refs/heads/master is at 777b7c02e1a7bb137bd7443e34eb5512b6a19d6c but expected 29d1ccdc7ee9fe415beb2415b6206b8a20f76b1c
# passed all 2 test(s)
1..2
fatal: Branch name doesn't conform to GIT standards: .badbranchname
fast-import: dumping crash report to .git/fast_import_crash_4503
ok 141 - stdin -z verify fails for wrong value
expecting success:
git rev-parse $m >expect &&
printf $F "verify $m" "$Z" >stdin &&
test_must_fail git update-ref -z --stdin <stdin &&
git rev-parse $m >actual &&
test_cmp expect actual
ok 2 - fast-import: fail on invalid branch name ".badbranchname"
expecting success:
test_when_finished "rm -f .git/objects/pack_* .git/objects/index_*" &&
cat >input <<-INPUT_END &&
commit bad[branch]name
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT
corrupt
COMMIT
from refs/heads/master
INPUT_END
test_must_fail git fast-import <input
*** t1450-fsck.sh ***
fatal: cannot lock ref 'refs/heads/master': ref refs/heads/master is at 777b7c02e1a7bb137bd7443e34eb5512b6a19d6c but expected 0000000000000000000000000000000000000000
fatal: Branch name doesn't conform to GIT standards: bad[branch]name
fast-import: dumping crash report to .git/fast_import_crash_4526
ok 3 - fast-import: fail on invalid branch name "bad[branch]name"
expecting success:
cp .git/refs/heads/master .git/refs/heads/broken...ref &&
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
git branch >output &&
grep -e "broken\.\.\.ref" output
ok 142 - stdin -z verify fails for mistaken null value
expecting success:
M=$(git rev-parse $m) &&
test_when_finished "git update-ref $m $M" &&
git rev-parse $m >expect &&
printf $F "verify $m" "" >stdin &&
test_must_fail git update-ref -z --stdin <stdin &&
git rev-parse $m >actual &&
test_cmp expect actual
Cloning into 'sub1'...
broken...ref
ok 4 - git branch shows badly named ref
expecting success:
cp .git/refs/heads/master .git/refs/heads/broken...ref &&
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
git branch -d broken...ref &&
git branch >output &&
! grep -e "broken\.\.\.ref" output
fatal: cannot lock ref 'refs/heads/master': ref refs/heads/master is at 777b7c02e1a7bb137bd7443e34eb5512b6a19d6c but expected 0000000000000000000000000000000000000000
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/.git/
Deleted branch broken...ref (was broken).
expecting success:
git config gc.auto 0 &&
git config i18n.commitencoding ISO-8859-1 &&
test_commit A fileA one &&
git config --unset i18n.commitencoding &&
git checkout HEAD^0 &&
test_commit B fileB two &&
git tag -d A B &&
git reflog expire --expire=now --all &&
>empty
ok 143 - stdin -z verify fails for mistaken empty value
expecting success:
printf $F "update $a" "$m" "$m" "update $b" "$m" "$m" "update $c" "$Z" "" >stdin &&
git update-ref -z --stdin <stdin &&
git rev-parse $m >expect &&
git rev-parse $a >actual &&
test_cmp expect actual &&
git rev-parse $b >actual &&
test_cmp expect actual &&
test_must_fail git rev-parse --verify -q $c
done.
ok 5 - branch -d can delete badly named ref
expecting success:
cp .git/refs/heads/master .git/refs/heads/broken...ref &&
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
git branch -D broken...ref &&
git branch >output &&
! grep -e "broken\.\.\.ref" output
Deleted branch broken...ref (was broken).
[master (root-commit) 1347563] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fileA
ok 6 - branch -D can delete badly named ref
expecting success:
echo precious >.git/my-private-file &&
echo precious >expect &&
test_must_fail git branch -D ../../my-private-file &&
test_cmp expect .git/my-private-file
ok 144 - stdin -z update refs works with identity updates
expecting success:
git update-ref $c $m &&
printf $F "update $a" "$m" "$m" "update $b" "$m" "$m" "update $c" "$m" "$Z" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: cannot lock ref '$c'" err &&
git rev-parse $m >expect &&
git rev-parse $a >actual &&
test_cmp expect actual &&
git rev-parse $b >actual &&
test_cmp expect actual &&
git rev-parse $c >actual &&
test_cmp expect actual
error: branch '../../my-private-file' not found.
ok 7 - branch -D cannot delete non-ref in .git dir
expecting success:
git rev-parse HEAD >.git/my-private-file &&
git rev-parse HEAD >expect &&
git branch foo/legit &&
test_must_fail git branch -D foo////./././../../../my-private-file &&
test_cmp expect .git/my-private-file
Note: checking out 'HEAD^0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 1347563... A
fatal: cannot lock ref 'refs/heads/c': ref refs/heads/c is at 777b7c02e1a7bb137bd7443e34eb5512b6a19d6c but expected 0000000000000000000000000000000000000000
error: branch 'foo////./././../../../my-private-file' not found.
ok 8 - branch -D cannot delete ref in .git dir
expecting success:
git branch -f extra &&
test_must_fail git branch -D "$(pwd)/.git/refs/heads/extra" &&
test_cmp_rev HEAD extra
[detached HEAD c9145d6] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fileB
Submodule path 'sub1': checked out '58630c04cd08e6914ad0ab5a3126bcfb71a3e6ca'
error: branch '/«PKGBUILDDIR»/t/trash directory.t1430-bad-ref-name/.git/refs/heads/extra' not found.
Deleted tag 'A' (was 1347563)
Deleted tag 'B' (was c9145d6)
ok 145 - stdin -z update refs fails with wrong old value
expecting success:
git pack-refs --all &&
git update-ref $c $m~1 &&
printf $F "delete $a" "$m" "update $b" "$Z" "$m" "update $c" "" "$m~1" >stdin &&
git update-ref -z --stdin <stdin &&
test_must_fail git rev-parse --verify -q $a &&
test_must_fail git rev-parse --verify -q $b &&
test_must_fail git rev-parse --verify -q $c
ok 9 - branch -D cannot delete absolute path
expecting success:
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
test_must_fail git branch broken...ref &&
git branch >output &&
! grep -e "broken\.\.\.ref" output
ok 1 - setup
expecting success:
mkdir another &&
(
cd another &&
git init &&
echo ../../../.git/objects >.git/objects/info/alternates &&
test_commit C fileC one &&
git fsck --no-dangling >../actual 2>&1
) &&
test_cmp empty actual
fatal: 'broken...ref' is not a valid branch name.
warning: update refs/heads/c: missing <newvalue>, treating as zero
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/another/.git/
ok 10 - git branch cannot create a badly named ref
expecting success:
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
test_might_fail git branch -D goodref &&
git branch goodref &&
test_must_fail git branch -m goodref broken...ref &&
test_cmp_rev master goodref &&
git branch >output &&
! grep -e "broken\.\.\.ref" output
error: branch 'goodref' not found.
Branch invalid_sub1 set up to track remote branch invalid_sub1 from origin.
fatal: 'broken...ref' is not a valid branch name.
ok 146 - stdin -z delete refs works with packed and loose refs
[master (root-commit) 1aac250] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fileC
checking prerequisite: ULIMIT_FILE_DESCRIPTORS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&run_with_limited_open_files true
)
prerequisite ULIMIT_FILE_DESCRIPTORS ok
expecting success:
(
for i in $(test_seq 33)
do
echo "create refs/heads/$i HEAD"
done >large_input &&
run_with_limited_open_files git update-ref --stdin <large_input &&
git rev-parse --verify -q refs/heads/33
)
ok 11 - branch -m cannot rename to a bad ref name
checking known breakage:
cp .git/refs/heads/master .git/refs/heads/broken...ref &&
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
git branch -m broken...ref renamed &&
test_cmp_rev master renamed &&
git branch >output &&
! grep -e "broken\.\.\.ref" output
ok 2 - loose objects borrowed from alternate are not missing
expecting success:
git fsck >actual 2>&1 &&
test_cmp empty actual
fatal: Invalid branch name: 'broken...ref'
not ok 12 - branch -m can rename from a bad ref name # TODO known breakage
expecting success:
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
test_must_fail git push "file://$(pwd)" HEAD:refs/heads/broken...ref &&
git branch >output &&
! grep -e "broken\.\.\.ref" output
fatal: remote part of refspec is not a valid name in HEAD:refs/heads/broken...ref
ok 3 - HEAD is part of refs, valid objects appear valid
expecting success:
sha1_file() {
echo "$*" | sed "s#..#.git/objects/&/#"
} &&
remove_object() {
file=$(sha1_file "$*") &&
test -e "$file" &&
rm -f "$file"
}
ok 4 - setup: helpers for corruption tests
expecting success:
sha=$(echo blob | git hash-object -w --stdin) &&
old=$(echo $sha | sed "s+^..+&/+") &&
new=$(dirname $old)/ffffffffffffffffffffffffffffffffffffff &&
sha="$(dirname $new)$(basename $new)" &&
mv .git/objects/$old .git/objects/$new &&
test_when_finished "remove_object $sha" &&
git update-index --add --cacheinfo 100644 $sha foo &&
test_when_finished "git read-tree -u --reset HEAD" &&
tree=$(git write-tree) &&
test_when_finished "remove_object $tree" &&
cmt=$(echo bogus | git commit-tree $tree) &&
test_when_finished "remove_object $cmt" &&
git update-ref refs/heads/bogus $cmt &&
test_when_finished "git update-ref -d refs/heads/bogus" &&
test_must_fail git fsck 2>out &&
cat out &&
grep "$sha.*corrupt" out
ok 13 - push cannot create a badly named ref
checking known breakage:
top=$(pwd) &&
git init src &&
git init dest &&
(
cd src &&
test_commit one
) &&
(
cd dest &&
test_commit two &&
git checkout --detach &&
cp .git/refs/heads/master .git/refs/heads/broken...ref
) &&
git -C src push --mirror "file://$top/dest" &&
git -C dest branch >output &&
! grep -e "broken\.\.\.ref" output
777b7c02e1a7bb137bd7443e34eb5512b6a19d6c
ok 147 - large transaction creating branches does not burst open file limit
expecting success:
(
for i in $(test_seq 33)
do
echo "delete refs/heads/$i HEAD"
done >large_input &&
run_with_limited_open_files git update-ref --stdin <large_input &&
test_must_fail git rev-parse --verify -q refs/heads/33
)
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1430-bad-ref-name/src/.git/
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1430-bad-ref-name/dest/.git/
[master (root-commit) 4331c28] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
ok 148 - large transaction deleting branches does not burst open file limit
# passed all 148 test(s)
1..148
missing blob 63ffffffffffffffffffffffffffffffffffffff
error: sha1 mismatch 63ffffffffffffffffffffffffffffffffffffff
error: 63ffffffffffffffffffffffffffffffffffffff: object corrupt or missing
error: 63ffffffffffffffffffffffffffffffffffffff: object corrupt or missing
[master (root-commit) 9db02ea] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
*** t1500-rev-parse.sh ***
Note: checking out 'HEAD'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 9db02ea... two
ok 5 - object with bad sha1
expecting success:
git rev-parse HEAD^{tree} >.git/refs/heads/invalid &&
test_when_finished "git update-ref -d refs/heads/invalid" &&
test_must_fail git fsck 2>out &&
cat out &&
grep "not a commit" out
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1500-rev-parse/.git/
error: refs/heads/invalid: not a commit
error: refs/heads/invalid: not a commit
expecting success: test 'false' = "$(git rev-parse --is-bare-repository)"
ok 6 - branch pointing to non-commit
ok 1 - toplevel: is-bare-repository
expecting success:
test_when_finished "mv .git/SAVED_HEAD .git/HEAD" &&
mv .git/HEAD .git/SAVED_HEAD &&
echo 0000000000000000000000000000000000000000 >.git/HEAD &&
# avoid corrupt/broken HEAD from interfering with repo discovery
test_must_fail env GIT_DIR=.git git fsck 2>out &&
cat out &&
grep "detached HEAD points" out
expecting success: test 'false' = "$(git rev-parse --is-inside-git-dir)"
ok 2 - toplevel: is-inside-git-dir
expecting success: test 'true' = "$(git rev-parse --is-inside-work-tree)"
To file:///«PKGBUILDDIR»/t/trash directory.t1430-bad-ref-name/dest
+ 9db02ea...4331c28 master -> master (forced update)
- [deleted] two
* [new tag] one -> one
ok 3 - toplevel: is-inside-work-tree
expecting success: test '' = "$(git rev-parse --show-prefix)"
dangling commit c9145d6720f85544cc4bb6009a2e541660aa156b
fatal: reference is not a tree: 0123456789012345678901234567890123456789
Unable to checkout '0123456789012345678901234567890123456789' in submodule path 'sub1'
error: HEAD: detached HEAD points at nothing
broken...ref
not ok 14 - push --mirror can delete badly named ref # TODO known breakage
expecting success:
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
git branch shadow one &&
cp .git/refs/heads/master .git/refs/heads/broken...ref &&
git symbolic-ref refs/tags/shadow refs/heads/broken...ref &&
git rev-parse --verify one >expect &&
git rev-parse --verify shadow >actual 2>err &&
test_cmp expect actual &&
test_i18ngrep "ignoring.*refs/tags/shadow" err
ok 4 - toplevel: prefix
expecting success: test '.git' = "$(git rev-parse --git-dir)"
error: HEAD: detached HEAD points at nothing
ok 7 - HEAD link pointing at a funny object
expecting success:
test_when_finished "mv .git/SAVED_HEAD .git/HEAD" &&
mv .git/HEAD .git/SAVED_HEAD &&
echo "ref: refs/funny/place" >.git/HEAD &&
# avoid corrupt/broken HEAD from interfering with repo discovery
test_must_fail env GIT_DIR=.git git fsck 2>out &&
cat out &&
grep "HEAD points to something strange" out
ok 5 - toplevel: git-dir
expecting success: test 'false' = "$(git rev-parse --is-bare-repository)"
ok 6 - .git/: is-bare-repository
expecting success: test 'true' = "$(git rev-parse --is-inside-git-dir)"
dangling commit c9145d6720f85544cc4bb6009a2e541660aa156b
error: HEAD points to something strange (refs/funny/place)
ok 7 - .git/: is-inside-git-dir
expecting success: test 'false' = "$(git rev-parse --is-inside-work-tree)"
error: HEAD points to something strange (refs/funny/place)
ok 8 - .git/: is-inside-work-tree
ok 8 - HEAD link pointing at a funny place
expecting success: test '' = "$(git rev-parse --show-prefix)"
expecting success:
git cat-file commit HEAD >basis &&
sed "s/@/AT/" basis >okay &&
new=$(git hash-object -t commit -w --stdin <okay) &&
test_when_finished "remove_object $new" &&
git update-ref refs/heads/bogus "$new" &&
test_when_finished "git update-ref -d refs/heads/bogus" &&
git fsck 2>out &&
cat out &&
! grep "commit $new" out
ok 13 - git read-tree -u -m: modified submodule does not update submodule work tree to invalid commit
expecting success:
prolog &&
reset_work_tree_to invalid_sub1 &&
(
cd submodule_update &&
git branch -t valid_sub1 origin/valid_sub1 &&
$command valid_sub1 &&
test_superproject_content origin/valid_sub1 &&
test_dir_is_empty sub1 &&
git submodule update --init --recursive &&
test_submodule_content sub1 origin/valid_sub1
)
warning: ignoring dangling symref refs/tags/shadow.
ok 9 - .git/: prefix
expecting success: test '.' = "$(git rev-parse --git-dir)"
ok 15 - rev-parse skips symref pointing to broken name
expecting success:
git symbolic-ref refs/heads/badname refs/heads/broken...ref &&
test_when_finished "rm -f .git/refs/heads/badname" &&
test_path_is_file .git/refs/heads/badname &&
git update-ref --no-deref -d refs/heads/badname &&
test_path_is_missing .git/refs/heads/badname
ok 10 - .git/: git-dir
expecting success: test 'false' = "$(git rev-parse --is-bare-repository)"
ok 11 - .git/objects/: is-bare-repository
expecting success: test 'true' = "$(git rev-parse --is-inside-git-dir)"
ok 16 - update-ref --no-deref -d can delete reference to broken name
expecting success:
cp .git/refs/heads/master .git/refs/heads/broken...ref &&
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
git update-ref -d refs/heads/broken...ref &&
git branch >output &&
! grep -e "broken\.\.\.ref" output
ok 12 - .git/objects/: is-inside-git-dir
expecting success: test 'false' = "$(git rev-parse --is-inside-work-tree)"
ok 13 - .git/objects/: is-inside-work-tree
expecting success: test '' = "$(git rev-parse --show-prefix)"
ok 14 - .git/objects/: prefix
expecting success: test '/«PKGBUILDDIR»/t/trash directory.t1500-rev-parse/.git' = "$(git rev-parse --git-dir)"
ok 17 - update-ref -d can delete broken name
expecting success:
echo precious >.git/my-private-file &&
echo precious >expect &&
test_must_fail git update-ref -d my-private-file &&
test_cmp expect .git/my-private-file
ok 15 - .git/objects/: git-dir
error: cannot lock ref 'my-private-file': unable to resolve reference my-private-file: Invalid argument
expecting success: test 'false' = "$(git rev-parse --is-bare-repository)"
ok 18 - update-ref -d cannot delete non-ref in .git dir
expecting success:
git branch -f extra &&
test_must_fail git update-ref -d "$(pwd)/.git/refs/heads/extra" &&
test_cmp_rev HEAD extra
Cloning into 'submodule_update'...
ok 16 - subdirectory: is-bare-repository
expecting success: test 'false' = "$(git rev-parse --is-inside-git-dir)"
ok 9 - email without @ is okay
expecting success:
git cat-file commit HEAD >basis &&
sed "s/@[a-z]/&>/" basis >bad-email &&
new=$(git hash-object -t commit -w --stdin <bad-email) &&
test_when_finished "remove_object $new" &&
git update-ref refs/heads/bogus "$new" &&
test_when_finished "git update-ref -d refs/heads/bogus" &&
test_must_fail git fsck 2>out &&
cat out &&
grep "error in commit $new" out
ok 17 - subdirectory: is-inside-git-dir
expecting success: test 'true' = "$(git rev-parse --is-inside-work-tree)"
error: cannot lock ref '/«PKGBUILDDIR»/t/trash directory.t1430-bad-ref-name/.git/refs/heads/extra': unable to resolve reference /«PKGBUILDDIR»/t/trash directory.t1430-bad-ref-name/.git/refs/heads/extra: Invalid argument
ok 18 - subdirectory: is-inside-work-tree
expecting success: test 'sub/dir/' = "$(git rev-parse --show-prefix)"
ok 19 - update-ref -d cannot delete absolute path
expecting success:
echo "create ~a refs/heads/master" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: invalid ref format: ~a" err
ok 19 - subdirectory: prefix
expecting success: test '/«PKGBUILDDIR»/t/trash directory.t1500-rev-parse/.git' = "$(git rev-parse --git-dir)"
done.
ok 20 - subdirectory: git-dir
fatal: invalid ref format: ~a
ok 20 - update-ref --stdin fails create with bad ref name
expecting success:
echo "update ~a refs/heads/master" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: invalid ref format: ~a" err
expecting success: test 'true' = "$(git rev-parse --is-bare-repository)"
fatal: invalid ref format: ~a
ok 21 - core.bare = true: is-bare-repository
ok 21 - update-ref --stdin fails update with bad ref name
error in commit af421232fcba11d582d625f9041afbe3fccc01d9: missingSpaceBeforeDate: invalid author/committer line - missing space before date
expecting success: test 'false' = "$(git rev-parse --is-inside-git-dir)"
expecting success:
echo "delete ~a refs/heads/master" >stdin &&
test_must_fail git update-ref --stdin <stdin 2>err &&
grep "fatal: invalid ref format: ~a" err
error in commit af421232fcba11d582d625f9041afbe3fccc01d9: missingSpaceBeforeDate: invalid author/committer line - missing space before date
ok 22 - core.bare = true: is-inside-git-dir
expecting success: test 'false' = "$(git rev-parse --is-inside-work-tree)"
fatal: invalid ref format: ~a
ok 22 - update-ref --stdin fails delete with bad ref name
expecting success:
printf "%s\0" "create ~a " refs/heads/master >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: invalid ref format: ~a " err
Switched to a new branch 'invalid_sub1'
Branch invalid_sub1 set up to track remote branch invalid_sub1 from origin.
ok 23 - core.bare = true: is-inside-work-tree
ok 10 - email with embedded > is not okay
expecting success:
git cat-file commit HEAD >basis &&
sed "s/<//" basis >bad-email-2 &&
new=$(git hash-object -t commit -w --stdin <bad-email-2) &&
test_when_finished "remove_object $new" &&
git update-ref refs/heads/bogus "$new" &&
test_when_finished "git update-ref -d refs/heads/bogus" &&
test_must_fail git fsck 2>out &&
cat out &&
grep "error in commit $new.* - bad name" out
fatal: invalid ref format: ~a
ok 23 - update-ref --stdin -z fails create with bad ref name
expecting success:
printf "%s\0" "update ~a" refs/heads/master "" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: invalid ref format: ~a" err
expecting success: test 'false' = "$(git rev-parse --is-bare-repository)"
ok 24 - core.bare undefined: is-bare-repository
expecting success: test 'false' = "$(git rev-parse --is-inside-git-dir)"
fatal: invalid ref format: ~a
ok 24 - update-ref --stdin -z fails update with bad ref name
expecting success:
printf "%s\0" "delete ~a" refs/heads/master >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&
grep "fatal: invalid ref format: ~a" err
ok 25 - core.bare undefined: is-inside-git-dir
fatal: Needed a single revision
expecting success: test 'true' = "$(git rev-parse --is-inside-work-tree)"
fatal: invalid ref format: ~a
ok 25 - update-ref --stdin -z fails delete with bad ref name
ok 26 - core.bare undefined: is-inside-work-tree
Branch valid_sub1 set up to track remote branch valid_sub1 from origin.
# still have 2 known breakage(s)
# passed all remaining 23 test(s)
1..25
expecting success: test 'false' = "$(git rev-parse --is-bare-repository)"
error in commit c4b6d356e934be1cc10cb58c734fbcc5fa3a5285: badName: invalid author/committer line - bad name
ok 27 - GIT_DIR=../.git, core.bare = false: is-bare-repository
error in commit c4b6d356e934be1cc10cb58c734fbcc5fa3a5285: badName: invalid author/committer line - bad name
expecting success: test 'false' = "$(git rev-parse --is-inside-git-dir)"
ok 28 - GIT_DIR=../.git, core.bare = false: is-inside-git-dir
expecting success: test 'true' = "$(git rev-parse --is-inside-work-tree)"
ok 29 - GIT_DIR=../.git, core.bare = false: is-inside-work-tree
expecting success: test '' = "$(git rev-parse --show-prefix)"
ok 11 - missing < email delimiter is reported nicely
expecting success:
git cat-file commit HEAD >basis &&
sed "s/[a-z]* <[^>]*>//" basis >bad-email-3 &&
new=$(git hash-object -t commit -w --stdin <bad-email-3) &&
test_when_finished "remove_object $new" &&
git update-ref refs/heads/bogus "$new" &&
test_when_finished "git update-ref -d refs/heads/bogus" &&
test_must_fail git fsck 2>out &&
cat out &&
grep "error in commit $new.* - missing email" out
ok 30 - GIT_DIR=../.git, core.bare = false: prefix
*** t1501-worktree.sh ***
expecting success: test 'true' = "$(git rev-parse --is-bare-repository)"
ok 31 - GIT_DIR=../.git, core.bare = true: is-bare-repository
expecting success: test 'false' = "$(git rev-parse --is-inside-git-dir)"
ok 32 - GIT_DIR=../.git, core.bare = true: is-inside-git-dir
expecting success: test 'false' = "$(git rev-parse --is-inside-work-tree)"
ok 33 - GIT_DIR=../.git, core.bare = true: is-inside-work-tree
expecting success: test '' = "$(git rev-parse --show-prefix)"
error in commit 35319efb0a67194811f8583362d460866d58b499: missingEmail: invalid author/committer line - missing email
ok 34 - GIT_DIR=../.git, core.bare = true: prefix
error in commit 35319efb0a67194811f8583362d460866d58b499: missingEmail: invalid author/committer line - missing email
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1501-worktree/.git/
expecting success: test 'false' = "$(git rev-parse --is-bare-repository)"
ok 35 - GIT_DIR=../.git, core.bare undefined: is-bare-repository
expecting success: test 'false' = "$(git rev-parse --is-inside-git-dir)"
expecting success:
EMPTY_TREE=$(git write-tree) &&
EMPTY_BLOB=$(git hash-object -t blob --stdin </dev/null) &&
CHANGED_BLOB=$(echo changed | git hash-object -t blob --stdin) &&
EMPTY_BLOB7=$(echo $EMPTY_BLOB | sed "s/\(.......\).*/\1/") &&
CHANGED_BLOB7=$(echo $CHANGED_BLOB | sed "s/\(.......\).*/\1/") &&
mkdir -p work/sub/dir &&
mkdir -p work2 &&
mv .git repo.git
ok 12 - missing email is reported nicely
expecting success:
git cat-file commit HEAD >basis &&
sed "s/ </> </" basis >bad-email-4 &&
new=$(git hash-object -t commit -w --stdin <bad-email-4) &&
test_when_finished "remove_object $new" &&
git update-ref refs/heads/bogus "$new" &&
test_when_finished "git update-ref -d refs/heads/bogus" &&
test_must_fail git fsck 2>out &&
cat out &&
grep "error in commit $new" out
ok 36 - GIT_DIR=../.git, core.bare undefined: is-inside-git-dir
expecting success: test 'true' = "$(git rev-parse --is-inside-work-tree)"
ok 37 - GIT_DIR=../.git, core.bare undefined: is-inside-work-tree
expecting success: test '' = "$(git rev-parse --show-prefix)"
ok 38 - GIT_DIR=../.git, core.bare undefined: prefix
expecting success: test 'false' = "$(git rev-parse --is-bare-repository)"
ok 39 - GIT_DIR=../repo.git, core.bare = false: is-bare-repository
expecting success: test 'false' = "$(git rev-parse --is-inside-git-dir)"
ok 1 - setup
expecting success:
test_rev_parse() {
echo $1 >expected.bare &&
echo $2 >expected.inside-git &&
echo $3 >expected.inside-worktree &&
if test $# -ge 4
then
echo $4 >expected.prefix
fi &&
git rev-parse --is-bare-repository >actual.bare &&
git rev-parse --is-inside-git-dir >actual.inside-git &&
git rev-parse --is-inside-work-tree >actual.inside-worktree &&
if test $# -ge 4
then
git rev-parse --show-prefix >actual.prefix
fi &&
test_cmp expected.bare actual.bare &&
test_cmp expected.inside-git actual.inside-git &&
test_cmp expected.inside-worktree actual.inside-worktree &&
if test $# -ge 4
then
# rev-parse --show-prefix should output
# a single newline when at the top of the work tree,
# but we test for that separately.
test -z "$4" && ! test -s actual.prefix ||
test_cmp expected.prefix actual.prefix
fi
}
ok 2 - setup: helper for testing rev-parse
expecting success:
sane_unset GIT_WORK_TREE &&
GIT_DIR=repo.git &&
GIT_CONFIG="$(pwd)"/$GIT_DIR/config &&
export GIT_DIR GIT_CONFIG &&
git config core.worktree ../work
error in commit 301380051321b3e224015eea93b0ebc550c88198: badName: invalid author/committer line - bad name
error in commit 301380051321b3e224015eea93b0ebc550c88198: badName: invalid author/committer line - bad name
ok 40 - GIT_DIR=../repo.git, core.bare = false: is-inside-git-dir
expecting success: test 'true' = "$(git rev-parse --is-inside-work-tree)"
ok 3 - setup: core.worktree = relative path
expecting success:
test_rev_parse false false false
ok 41 - GIT_DIR=../repo.git, core.bare = false: is-inside-work-tree
expecting success: test '' = "$(git rev-parse --show-prefix)"
ok 13 - > in name is reported
expecting success:
git cat-file commit HEAD >basis &&
sed "s/^\\(author .*>\\) [0-9]*/\\1 18446744073709551617/" \
<basis >bad-timestamp &&
new=$(git hash-object -t commit -w --stdin <bad-timestamp) &&
test_when_finished "remove_object $new" &&
git update-ref refs/heads/bogus "$new" &&
test_when_finished "git update-ref -d refs/heads/bogus" &&
test_must_fail git fsck 2>out &&
cat out &&
grep "error in commit $new.*integer overflow" out
Submodule 'sub1' (/«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.) registered for path 'sub1'
ok 42 - GIT_DIR=../repo.git, core.bare = false: prefix
expecting success: test 'true' = "$(git rev-parse --is-bare-repository)"
ok 43 - GIT_DIR=../repo.git, core.bare = true: is-bare-repository
ok 4 - outside
expecting success: test 'false' = "$(git rev-parse --is-inside-git-dir)"
expecting success:
(
cd work &&
GIT_DIR=../repo.git &&
GIT_CONFIG="$(pwd)"/$GIT_DIR/config &&
test_rev_parse false false true ""
)
ok 44 - GIT_DIR=../repo.git, core.bare = true: is-inside-git-dir
expecting success: test 'false' = "$(git rev-parse --is-inside-work-tree)"
ok 45 - GIT_DIR=../repo.git, core.bare = true: is-inside-work-tree
expecting success: test '' = "$(git rev-parse --show-prefix)"
error in commit c8453435c3587d0404f88f925c28a5944b73be1a: badDateOverflow: invalid author/committer line - date causes integer overflow
ok 46 - GIT_DIR=../repo.git, core.bare = true: prefix
error in commit c8453435c3587d0404f88f925c28a5944b73be1a: badDateOverflow: invalid author/committer line - date causes integer overflow
expecting success: test 'false' = "$(git rev-parse --is-bare-repository)"
ok 5 - inside work tree
expecting success:
echo >expected &&
(
cd work &&
GIT_DIR=../repo.git &&
GIT_CONFIG="$(pwd)"/$GIT_DIR/config &&
git rev-parse --show-prefix >../actual
) &&
test_cmp expected actual
ok 47 - GIT_DIR=../repo.git, core.bare undefined: is-bare-repository
expecting success: test 'false' = "$(git rev-parse --is-inside-git-dir)"
ok 14 - integer overflow in timestamps is reported
expecting success:
test_when_finished "git update-ref -d refs/tags/wrong" &&
test_when_finished "remove_object \$T" &&
T=$(
GIT_INDEX_FILE=test-index &&
export GIT_INDEX_FILE &&
rm -f test-index &&
>x &&
git add x &&
T=$(git write-tree) &&
(
git cat-file tree $T &&
git cat-file tree $T
) |
git hash-object -w -t tree --stdin
) &&
test_must_fail git fsck 2>out &&
grep "error in tree .*contains duplicate file entries" out
ok 48 - GIT_DIR=../repo.git, core.bare undefined: is-inside-git-dir
expecting success: test 'true' = "$(git rev-parse --is-inside-work-tree)"
ok 6 - empty prefix is actually written out
expecting success:
(
cd work/sub/dir &&
GIT_DIR=../../../repo.git &&
GIT_CONFIG="$(pwd)"/$GIT_DIR/config &&
test_rev_parse false false true sub/dir/
)
ok 49 - GIT_DIR=../repo.git, core.bare undefined: is-inside-work-tree
expecting success: test '' = "$(git rev-parse --show-prefix)"
Cloning into 'sub1'...
ok 50 - GIT_DIR=../repo.git, core.bare undefined: prefix
# passed all 50 test(s)
1..50
done.
ok 7 - subdir of work tree
*** t1502-rev-parse-parseopt.sh ***
expecting success:
sane_unset GIT_WORK_TREE &&
GIT_DIR=$(pwd)/repo.git &&
GIT_CONFIG=$GIT_DIR/config &&
export GIT_DIR GIT_CONFIG &&
git config core.worktree "$(pwd)/work"
dangling tree 7997631de77b8a212b5c3e01eff5e9cf1d3c7580
error in tree 7997631de77b8a212b5c3e01eff5e9cf1d3c7580: duplicateEntries: contains duplicate file entries
ok 8 - setup: core.worktree = absolute path
expecting success:
test_rev_parse false false false &&
(
cd work2 &&
test_rev_parse false false false
)
ok 15 - malformatted tree object
expecting success:
cat >invalid-tag <<-\EOF &&
object ffffffffffffffffffffffffffffffffffffffff
type commit
tag invalid
tagger T A Gger <tagger@example.com> 1234567890 -0000
This is an invalid tag.
EOF
tag=$(git hash-object -t tag -w --stdin <invalid-tag) &&
test_when_finished "remove_object $tag" &&
echo $tag >.git/refs/tags/invalid &&
test_when_finished "git update-ref -d refs/tags/invalid" &&
test_must_fail git fsck --tags >out &&
cat out &&
grep "broken link" out
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1502-rev-parse-parseopt/.git/
expecting success:
sed -e "s/^|//" >optionspec <<\EOF
|some-command [options] <args>...
|
|some-command does foo and bar!
|--
|h,help show the help
|
|foo some nifty option --foo
|bar= some cool option --bar with an argument
|b,baz a short and long option
|
| An option group Header
|C? option C with an optional argument
|d,data? short and long option with an optional argument
|
| Argument hints
|B=arg short option required argument
|bar2=arg long option required argument
|e,fuz=with-space short and long option required argument
|s?some short option optional argument
|long?data long option optional argument
|g,fluf?path short and long option optional argument
|longest=very-long-argument-hint a very long argument hint
|pair=key=value with an equals sign in the hint
|short-hint=a with a one symbol hint
|
|Extras
|extra1 line above used to cause a segfault but no longer does
EOF
ok 1 - setup optionspec
expecting success:
sed -e "s/^|//" >expect <<\END_EXPECT &&
|cat <<\EOF
|usage: some-command [options] <args>...
|
| some-command does foo and bar!
|
| -h, --help show the help
| --foo some nifty option --foo
| --bar ... some cool option --bar with an argument
| -b, --baz a short and long option
|
|An option group Header
| -C[...] option C with an optional argument
| -d, --data[=...] short and long option with an optional argument
|
|Argument hints
| -B <arg> short option required argument
| --bar2 <arg> long option required argument
| -e, --fuz <with-space>
| short and long option required argument
| -s[<some>] short option optional argument
| --long[=<data>] long option optional argument
| -g, --fluf[=<path>] short and long option optional argument
| --longest <very-long-argument-hint>
| a very long argument hint
| --pair <key=value> with an equals sign in the hint
| --short-hint <a> with a one symbol hint
|
|Extras
| --extra1 line above used to cause a segfault but no longer does
|
|EOF
END_EXPECT
test_expect_code 129 git rev-parse --parseopt -- -h > output < optionspec &&
test_i18ncmp expect output
tagged commit ffffffffffffffffffffffffffffffffffffffff (invalid) in 1b6f5c03992c29264810d290b006c47651933356
broken link from tag 1b6f5c03992c29264810d290b006c47651933356
to commit ffffffffffffffffffffffffffffffffffffffff
missing commit ffffffffffffffffffffffffffffffffffffffff
broken link from tag 1b6f5c03992c29264810d290b006c47651933356
ok 9 - outside
expecting success:
(
cd work &&
test_rev_parse false false true ""
)
ok 2 - test --parseopt help output
expecting success:
cat > expect <<EOF
set -- --foo --bar 'ham' -b -- 'arg'
EOF
ok 16 - tag pointing to nonexistent
ok 3 - setup expect.1
expecting success:
sha=$(echo blob | git hash-object -w --stdin) &&
test_when_finished "remove_object $sha" &&
cat >wrong-tag <<-EOF &&
object $sha
type commit
tag wrong
tagger T A Gger <tagger@example.com> 1234567890 -0000
This is an invalid tag.
EOF
tag=$(git hash-object -t tag -w --stdin <wrong-tag) &&
test_when_finished "remove_object $tag" &&
echo $tag >.git/refs/tags/wrong &&
test_when_finished "git update-ref -d refs/tags/wrong" &&
test_must_fail git fsck --tags
expecting success:
git rev-parse --parseopt -- --foo --bar=ham --baz arg < optionspec > output &&
test_cmp expect output
ok 4 - test --parseopt
expecting success:
git rev-parse --parseopt -- --foo arg --bar=ham --baz < optionspec > output &&
test_cmp expect output
Submodule path 'sub1': checked out '58630c04cd08e6914ad0ab5a3126bcfb71a3e6ca'
ok 5 - test --parseopt with mixed options and arguments
expecting success:
cat > expect <<EOF
set -- --foo -- 'arg' '--bar=ham'
EOF
ok 6 - setup expect.2
expecting success:
git rev-parse --parseopt -- --foo -- arg --bar=ham < optionspec > output &&
test_cmp expect output
ok 10 - inside work tree
expecting success:
(
cd work/sub/dir &&
test_rev_parse false false true sub/dir/
)
error: object 63499e4ea8e096b831515ceb1d5a7593e4d87ae5 is a blob, not a commit
error in tag 66f6581d549f70e05ca586bc2df5c15a95662c36: broken links
error in tag 66f6581d549f70e05ca586bc2df5c15a95662c36: badTagObject: could not load tagged object
broken link from tag 66f6581d549f70e05ca586bc2df5c15a95662c36
broken link from unknown unknown
dangling blob 63499e4ea8e096b831515ceb1d5a7593e4d87ae5
ok 7 - test --parseopt with --
expecting success:
git rev-parse --parseopt --stop-at-non-option -- --foo arg --bar=ham < optionspec > output &&
test_cmp expect output
ok 8 - test --parseopt --stop-at-non-option
expecting success:
cat > expect <<EOF
set -- --foo -- '--' 'arg' '--bar=ham'
EOF
ok 9 - setup expect.3
expecting success:
git rev-parse --parseopt --keep-dashdash -- --foo -- arg --bar=ham < optionspec > output &&
test_cmp expect output
ok 17 - tag pointing to something else than its type
expecting success:
sha=$(git rev-parse HEAD) &&
cat >wrong-tag <<-EOF &&
object $sha
type commit
tag wrong name format
This is an invalid tag.
EOF
tag=$(git hash-object -t tag -w --stdin <wrong-tag) &&
test_when_finished "remove_object $tag" &&
echo $tag >.git/refs/tags/wrong &&
test_when_finished "git update-ref -d refs/tags/wrong" &&
git fsck --tags 2>out &&
cat >expect <<-EOF &&
warning in tag $tag: badTagName: invalid 'tag' name: wrong name format
warning in tag $tag: missingTaggerEntry: invalid format - expected 'tagger' line
EOF
test_cmp expect out
ok 11 - subdir of work tree
expecting success:
GIT_DIR=$(pwd)/repo.git &&
GIT_CONFIG=$GIT_DIR/config &&
git config core.worktree non-existent &&
GIT_WORK_TREE=work &&
export GIT_DIR GIT_CONFIG GIT_WORK_TREE
ok 10 - test --parseopt --keep-dashdash
expecting success:
cat >expect <<EOF
set -- --foo -- '--' 'arg' '--spam=ham'
EOF
ok 11 - setup expect.4
expecting success:
git rev-parse --parseopt --keep-dashdash --stop-at-non-option -- --foo -- arg --spam=ham <optionspec >output &&
test_cmp expect output
ok 12 - setup: GIT_WORK_TREE=relative (override core.worktree)
expecting success:
test_rev_parse false false false &&
(
cd work2 &&
test_rev_parse false false false
)
ok 12 - test --parseopt --keep-dashdash --stop-at-non-option with --
expecting success:
cat > expect <<EOF
set -- --foo -- 'arg' '--spam=ham'
EOF
ok 13 - setup expect.5
expecting success:
git rev-parse --parseopt --keep-dashdash --stop-at-non-option -- --foo arg --spam=ham <optionspec >output &&
test_cmp expect output
tagged commit c9145d6720f85544cc4bb6009a2e541660aa156b (wrong name format) in 6d73f1b4d41e4fdac4ba717a11e7409876bb75c3
ok 14 - git read-tree -u -m: modified submodule does not update submodule work tree from invalid commit
expecting success:
prolog &&
reset_work_tree_to no_submodule &&
(
cd submodule_update &&
git branch -t add_sub1 origin/add_sub1 &&
$command add_sub1 &&
test_superproject_content origin/add_sub1 &&
test_dir_is_empty sub1 &&
git submodule update --init --recursive &&
test_submodule_content sub1 origin/add_sub1
)
ok 14 - test --parseopt --keep-dashdash --stop-at-non-option without --
expecting success:
cat > expect <<EOF
set -- --foo --bar='z' --baz -C'Z' --data='A' -- 'arg'
EOF
ok 15 - setup expect.6
expecting success:
git rev-parse --parseopt --stuck-long -- --foo --bar=z -b arg -CZ -dA <optionspec >output &&
test_cmp expect output
ok 16 - test --parseopt --stuck-long
expecting success:
cat > expect <<EOF
set -- --data='' -C --baz -- 'arg'
EOF
ok 18 - tag with incorrect tag name & missing tagger
expecting success:
sha=$(git rev-parse HEAD) &&
cat >wrong-tag <<-EOF &&
object $sha
type commit
tag not-quite-wrong
tagger Bad Tagger Name
This is an invalid tag.
EOF
tag=$(git hash-object --literally -t tag -w --stdin <wrong-tag) &&
test_when_finished "remove_object $tag" &&
echo $tag >.git/refs/tags/wrong &&
test_when_finished "git update-ref -d refs/tags/wrong" &&
test_must_fail git fsck --tags 2>out &&
grep "error in tag .*: invalid author/committer" out
ok 17 - setup expect.7
expecting success:
git rev-parse --parseopt --stuck-long -- --data= arg -C -b <optionspec >output &&
test_cmp expect output
ok 18 - test --parseopt --stuck-long and empty optional argument
expecting success:
cat > expect <<EOF
set -- --data --baz -- 'arg'
EOF
ok 13 - outside
expecting success:
(
cd work &&
GIT_WORK_TREE=. &&
test_rev_parse false false true ""
)
ok 19 - setup expect.8
expecting success:
git rev-parse --parseopt --stuck-long -- --data arg -b <optionspec >output &&
test_cmp expect output
ok 20 - test --parseopt --stuck-long and long option with unset optional argument
expecting success:
git rev-parse --parseopt --stuck-long -- -d arg -b <optionspec >output &&
test_cmp expect output
error in tag d037dcc834669cc0c5d3416130c899572cb1aedd: missingEmail: invalid author/committer line - missing email
ok 21 - test --parseopt --stuck-long and short option with unset optional argument
Cloning into 'submodule_update'...
# passed all 21 test(s)
1..21
ok 19 - tag with bad tagger
expecting success:
git fsck >actual 2>&1 &&
test_cmp empty actual
ok 14 - inside work tree
expecting success:
(
cd work/sub/dir &&
GIT_WORK_TREE=../.. &&
test_rev_parse false false true sub/dir/
)
*** t1503-rev-parse-verify.sh ***
ok 20 - cleaned up
expecting success:
git rev-list --verify-objects --all >/dev/null 2>out &&
test_cmp empty out
done.
ok 21 - rev-list --verify-objects
expecting success:
sha=$(echo blob | git hash-object -w --stdin) &&
old=$(echo $sha | sed "s+^..+&/+") &&
new=$(dirname $old)/ffffffffffffffffffffffffffffffffffffff &&
sha="$(dirname $new)$(basename $new)" &&
mv .git/objects/$old .git/objects/$new &&
test_when_finished "remove_object $sha" &&
git update-index --add --cacheinfo 100644 $sha foo &&
test_when_finished "git read-tree -u --reset HEAD" &&
tree=$(git write-tree) &&
test_when_finished "remove_object $tree" &&
cmt=$(echo bogus | git commit-tree $tree) &&
test_when_finished "remove_object $cmt" &&
git update-ref refs/heads/bogus $cmt &&
test_when_finished "git update-ref -d refs/heads/bogus" &&
test_might_fail git rev-list --verify-objects refs/heads/bogus >/dev/null 2>out &&
cat out &&
grep -q "error: sha1 mismatch 63ffffffffffffffffffffffffffffffffffffff" out
ok 15 - subdir of work tree
expecting success:
mv work repo.git/work &&
mv work2 repo.git/work2 &&
GIT_DIR=$(pwd)/repo.git &&
GIT_CONFIG=$GIT_DIR/config &&
GIT_WORK_TREE=$(pwd)/repo.git/work &&
export GIT_DIR GIT_CONFIG GIT_WORK_TREE
Switched to a new branch 'no_submodule'
Branch no_submodule set up to track remote branch no_submodule from origin.
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1503-rev-parse-verify/.git/
ok 16 - setup: GIT_WORK_TREE=absolute, below git dir
expecting success:
echo outside &&
test_rev_parse false false false
outside
expecting success:
add_line_into_file "1: Hello World" hello &&
HASH1=$(git rev-parse --verify HEAD) &&
add_line_into_file "2: A new day for git" hello &&
HASH2=$(git rev-parse --verify HEAD) &&
add_line_into_file "3: Another new day for git" hello &&
HASH3=$(git rev-parse --verify HEAD) &&
add_line_into_file "4: Ciao for now" hello &&
HASH4=$(git rev-parse --verify HEAD)
Branch add_sub1 set up to track remote branch add_sub1 from origin.
ok 17 - outside
expecting success:
(
cd repo.git &&
test_rev_parse false true false
) &&
(
cd repo.git/objects &&
test_rev_parse false true false
) &&
(
cd repo.git/work2 &&
test_rev_parse false true false
)
error: sha1 mismatch 63ffffffffffffffffffffffffffffffffffffff
ok 22 - rev-list --verify-objects with bad sha1
expecting success:
git cat-file commit HEAD >basis &&
sed "s/^author .*/&,&/" <basis | tr , \\n >multiple-authors &&
new=$(git hash-object -t commit -w --stdin <multiple-authors) &&
test_when_finished "remove_object $new" &&
git update-ref refs/heads/bogus "$new" &&
test_when_finished "git update-ref -d refs/heads/bogus" &&
test_must_fail git fsck &&
git -c fsck.multipleAuthors=ignore fsck
ok 1 - set up basic repo with 1 file (hello) and 4 commits
expecting success:
rev_hash1=$(git rev-parse --verify $HASH1) &&
test "$rev_hash1" = "$HASH1" &&
rev_hash2=$(git rev-parse --verify $HASH2) &&
test "$rev_hash2" = "$HASH2" &&
rev_hash3=$(git rev-parse --verify $HASH3) &&
test "$rev_hash3" = "$HASH3" &&
rev_hash4=$(git rev-parse --verify $HASH4) &&
test "$rev_hash4" = "$HASH4" &&
rev_master=$(git rev-parse --verify master) &&
test "$rev_master" = "$HASH4" &&
rev_head=$(git rev-parse --verify HEAD) &&
test "$rev_head" = "$HASH4"
ok 18 - in repo.git
expecting success:
(
cd repo.git/work &&
test_rev_parse false true true ""
)
error in commit 3d94ae45b63882b239b90285e1f253e2d4cd5e9f: multipleAuthors: invalid format - multiple 'author' lines
ok 2 - works with one good rev
expecting success:
test_must_fail git rev-parse --verify 2>error &&
grep "single revision" error &&
test_must_fail git rev-parse --verify foo 2>error &&
grep "single revision" error &&
test_must_fail git rev-parse --verify HEAD bar 2>error &&
grep "single revision" error &&
test_must_fail git rev-parse --verify baz HEAD 2>error &&
grep "single revision" error &&
test_must_fail git rev-parse --verify $HASH2 HEAD 2>error &&
grep "single revision" error
ok 19 - inside work tree
expecting success:
(
cd repo.git/work/sub/dir &&
test_rev_parse false true true sub/dir/
)
ok 23 - force fsck to ignore double author
expecting success:
(git init null-blob &&
cd null-blob &&
sha=$(printf "100644 file$_bz$_bz20" |
git hash-object -w --stdin -t tree) &&
git fsck 2>out &&
cat out &&
grep "warning.*null sha1" out
)
fatal: Needed a single revision
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/null-blob/.git/
fatal: Needed a single revision
Submodule 'sub1' (/«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.) registered for path 'sub1'
fatal: Needed a single revision
notice: HEAD points to an unborn branch (master)
warning in tree aaf928e9279b56c88bcc8d79f881e5c820ea23e8: nullSha1: contains entries pointing to null sha1
notice: No default references
ok 20 - subdir of work tree
expecting success:
echo sub/dir/untracked >expected &&
cat <<-\EOF >repo.git/work/.gitignore &&
expected.*
actual.*
.gitignore
EOF
>repo.git/work/sub/dir/untracked &&
(
cd repo.git &&
git ls-files --others --exclude-standard >../actual
) &&
test_cmp expected actual
warning in tree aaf928e9279b56c88bcc8d79f881e5c820ea23e8: nullSha1: contains entries pointing to null sha1
ok 24 - fsck notices blob entry pointing to null sha1
expecting success:
(git init null-commit &&
cd null-commit &&
sha=$(printf "160000 submodule$_bz$_bz20" |
git hash-object -w --stdin -t tree) &&
git fsck 2>out &&
cat out &&
grep "warning.*null sha1" out
)
fatal: Needed a single revision
fatal: Needed a single revision
ok 3 - fails with any bad rev or many good revs
expecting success:
test_must_fail git rev-parse --verify --quiet 2>error &&
test_must_be_empty error &&
test_must_fail git rev-parse -q --verify foo 2>error &&
test_must_be_empty error &&
test_must_fail git rev-parse --verify -q HEAD bar 2>error &&
test_must_be_empty error &&
test_must_fail git rev-parse --quiet --verify baz HEAD 2>error &&
test_must_be_empty error &&
test_must_fail git rev-parse -q --verify $HASH2 HEAD 2>error &&
test_must_be_empty error
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/null-commit/.git/
ok 21 - find work tree from repo
expecting success:
echo sub/dir/tracked >expected &&
>repo.git/work/sub/dir/tracked &&
(
cd repo.git/work/sub/dir &&
git --git-dir=../../.. add tracked
) &&
(
cd repo.git &&
git ls-files >../actual
) &&
test_cmp expected actual
ok 22 - find work tree from work tree
expecting success:
(
cd repo.git/work/sub/dir &&
GIT_DIR=../../.. &&
GIT_WORK_TREE=../.. &&
GIT_PAGER= &&
export GIT_DIR GIT_WORK_TREE GIT_PAGER &&
git diff --exit-code tracked &&
echo changed >tracked &&
test_must_fail git diff --exit-code tracked
)
notice: HEAD points to an unborn branch (master)
warning in tree f87f3eabd15018382578c00e3a71a46c842e17e6: nullSha1: contains entries pointing to null sha1
notice: No default references
warning in tree f87f3eabd15018382578c00e3a71a46c842e17e6: nullSha1: contains entries pointing to null sha1
ok 25 - fsck notices submodule entry pointing to null sha1
expecting success:
(
git init $name-$type &&
cd $name-$type &&
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse :file) &&
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
grep "warning.*tree $bad_tree" out
)
ok 4 - fails silently when using -q
expecting success:
ref=$(git rev-parse HEAD) &&
git update-ref --create-reflog -m "message for refs/test" refs/test "$ref" &&
git reflog delete --updateref --rewrite refs/test@{0} &&
test_must_fail git rev-parse -q --verify refs/test@{0} >error 2>&1 &&
test_must_be_empty error
diff --git a/sub/dir/tracked b/sub/dir/tracked
index e69de29..5ea2ed4 100644
--- a/sub/dir/tracked
+++ b/sub/dir/tracked
@@ -0,0 +1 @@
+changed
ok 23 - _gently() groks relative GIT_DIR & GIT_WORK_TREE
expecting success:
cat >diff-index-cached.expected <<-EOF &&
:000000 100644 $_z40 $EMPTY_BLOB A sub/dir/tracked
EOF
cat >diff-index.expected <<-EOF &&
:000000 100644 $_z40 $_z40 A sub/dir/tracked
EOF
(
GIT_DIR=repo.git &&
GIT_WORK_TREE=repo.git/work &&
export GIT_DIR GIT_WORK_TREE &&
Cloning into 'sub1'...
git diff-index $EMPTY_TREE >diff-index.actual &&
git diff-index --cached $EMPTY_TREE >diff-index-cached.actual
) &&
test_cmp diff-index.expected diff-index.actual &&
test_cmp diff-index-cached.expected diff-index-cached.actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/dot-blob/.git/
ok 5 - fails silently when using -q with deleted reflogs
expecting success:
ref=$(git rev-parse HEAD) &&
git update-ref --create-reflog -m "message for refs/test2" refs/test2 "$ref" &&
test_must_fail git rev-parse -q --verify refs/test2@{999} >error 2>&1 &&
test_must_be_empty error
ok 24 - diff-index respects work tree under .git dir
expecting success:
cat >diff-files.expected <<-EOF &&
:100644 100644 $EMPTY_BLOB $_z40 M sub/dir/tracked
EOF
(
GIT_DIR=repo.git &&
GIT_WORK_TREE=repo.git/work &&
export GIT_DIR GIT_WORK_TREE &&
git diff-files >diff-files.actual
) &&
test_cmp diff-files.expected diff-files.actual
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
done.
ok 25 - diff-files respects work tree under .git dir
expecting success:
cat >diff-TREE.expected <<-EOF &&
diff --git a/sub/dir/tracked b/sub/dir/tracked
new file mode 100644
index 0000000..$CHANGED_BLOB7
--- /dev/null
+++ b/sub/dir/tracked
@@ -0,0 +1 @@
+changed
EOF
cat >diff-TREE-cached.expected <<-EOF &&
diff --git a/sub/dir/tracked b/sub/dir/tracked
new file mode 100644
index 0000000..$EMPTY_BLOB7
EOF
cat >diff-FILES.expected <<-EOF &&
diff --git a/sub/dir/tracked b/sub/dir/tracked
index $EMPTY_BLOB7..$CHANGED_BLOB7 100644
--- a/sub/dir/tracked
+++ b/sub/dir/tracked
@@ -0,0 +1 @@
+changed
EOF
(
GIT_DIR=repo.git &&
GIT_WORK_TREE=repo.git/work &&
export GIT_DIR GIT_WORK_TREE &&
git diff $EMPTY_TREE >diff-TREE.actual &&
git diff --cached $EMPTY_TREE >diff-TREE-cached.actual &&
git diff >diff-FILES.actual
) &&
test_cmp diff-TREE.expected diff-TREE.actual &&
test_cmp diff-TREE-cached.expected diff-TREE-cached.actual &&
test_cmp diff-FILES.expected diff-FILES.actual
ok 6 - fails silently when using -q with not enough reflogs
expecting success:
ref=$(git rev-parse HEAD) &&
git update-ref --create-reflog -m "message for refs/test3" refs/test3 "$ref" &&
git rev-parse -q --verify refs/test3@{1.year.ago} >actual 2>error &&
test_must_be_empty error &&
echo "$ref" >expect &&
test_cmp expect actual
warning in tree 4d6a3deda84474ed5f701962ea9bf83c5fe08185: hasDot: contains '.'
ok 7 - succeeds silently with -q and reflogs that do not go far back enough in time
expecting success:
test -z "$(git rev-parse --verify)" &&
test -z "$(git rev-parse --verify foo)" &&
test -z "$(git rev-parse --verify baz HEAD)" &&
test -z "$(git rev-parse --verify HEAD bar)" &&
test -z "$(git rev-parse --verify $HASH2 HEAD)"
warning in tree 4d6a3deda84474ed5f701962ea9bf83c5fe08185: hasDot: contains '.'
ok 26 - fsck notices . as blob
expecting success:
(
git init $name-$type &&
cd $name-$type &&
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse :file) &&
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
grep "warning.*tree $bad_tree" out
)
fatal: Needed a single revision
ok 26 - git diff respects work tree under .git dir
expecting success:
echo dir/tracked >expected.grep &&
(
cd repo.git/work/sub &&
GIT_DIR=../.. &&
GIT_WORK_TREE=.. &&
export GIT_DIR GIT_WORK_TREE &&
git grep -l changed >../../../actual.grep
) &&
test_cmp expected.grep actual.grep
fatal: Needed a single revision
fatal: Needed a single revision
ok 27 - git grep
expecting success:
(
cd repo.git &&
GIT_DIR=. GIT_WORK_TREE=work git commit -a -m done
)
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/dot-tree/.git/
fatal: Needed a single revision
fatal: Needed a single revision
ok 8 - no stdout output on error
expecting success:
git rev-parse --verify --default master &&
git rev-parse --verify --default master HEAD &&
git rev-parse --default master --verify &&
git rev-parse --default master --verify HEAD &&
git rev-parse --verify HEAD --default master &&
test_must_fail git rev-parse --verify foo --default master &&
test_must_fail git rev-parse --default HEAD --verify bar &&
test_must_fail git rev-parse --verify --default HEAD baz &&
test_must_fail git rev-parse --default foo --verify &&
test_must_fail git rev-parse --verify --default bar
[master (root-commit) 85cdc17] done
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 sub/dir/tracked
32a594a3fdac2d57cf6d02987e30eec68511498c
ok 28 - git commit
expecting success:
(
cd repo.git &&
test_might_fail git config --unset core.worktree &&
test_must_fail git log HEAD -- /home
)
32a594a3fdac2d57cf6d02987e30eec68511498c
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Submodule path 'sub1': checked out '58630c04cd08e6914ad0ab5a3126bcfb71a3e6ca'
32a594a3fdac2d57cf6d02987e30eec68511498c
fatal: /home: '/home' is outside repository
32a594a3fdac2d57cf6d02987e30eec68511498c
ok 29 - absolute pathspec should fail gracefully
expecting success:
>dummy_file &&
echo git --git-dir="$(pwd)//repo.git" --work-tree="$(pwd)" add dummy_file &&
git --git-dir="$(pwd)//repo.git" --work-tree="$(pwd)" add dummy_file
git --git-dir=/«PKGBUILDDIR»/t/trash directory.t1501-worktree//repo.git --work-tree=/«PKGBUILDDIR»/t/trash directory.t1501-worktree add dummy_file
32a594a3fdac2d57cf6d02987e30eec68511498c
fatal: Needed a single revision
ok 30 - make_relative_path handles double slashes in GIT_DIR
expecting success:
GIT_DIR=repo.git GIT_WORK_TREE=repo.git/work \
test-subprocess --setup-work-tree rev-parse --show-toplevel >actual &&
echo "$(pwd)/repo.git/work" >expected &&
test_cmp expected actual
fatal: Needed a single revision
fatal: Needed a single revision
warning in tree 8984d55df404e56c99a9c5a2e5a168084a913e8f: hasDot: contains '.'
fatal: Needed a single revision
ok 31 - relative $GIT_WORK_TREE and git subprocesses
expecting success:
mkdir work &&
mkdir -p repo.git/repos/foo &&
cp repo.git/HEAD repo.git/index repo.git/repos/foo &&
test_might_fail cp repo.git/sharedindex.* repo.git/repos/foo &&
sane_unset GIT_DIR GIT_CONFIG GIT_WORK_TREE
warning in tree 8984d55df404e56c99a9c5a2e5a168084a913e8f: hasDot: contains '.'
ok 27 - fsck notices . as tree
expecting success:
(
git init $name-$type &&
cd $name-$type &&
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse :file) &&
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
grep "warning.*tree $bad_tree" out
)
fatal: Needed a single revision
ok 9 - use --default
expecting success:
N=$(git reflog | wc -l) &&
Nm1=$(($N-1)) &&
Np1=$(($N+1)) &&
git rev-parse --verify master@{0} &&
git rev-parse --verify master@{1} &&
git rev-parse --verify master@{$Nm1} &&
test_must_fail git rev-parse --verify master@{$N} &&
test_must_fail git rev-parse --verify master@{$Np1}
cp: cannot stat 'repo.git/sharedindex.*': No such file or directory
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/dotdot-blob/.git/
ok 32 - Multi-worktree setup
expecting success:
echo "gitdir: repo.git/repos/foo" >gitfile &&
echo ../.. >repo.git/repos/foo/commondir &&
(
cd work &&
GIT_DIR=../gitfile git rev-parse --git-common-dir >actual &&
test-path-utils real_path "$TRASH_DIRECTORY/repo.git" >expect &&
test_cmp expect actual
)
32a594a3fdac2d57cf6d02987e30eec68511498c
ok 33 - GIT_DIR set (1)
expecting success:
echo "gitdir: repo.git/repos/foo" >gitfile &&
echo "$(pwd)/repo.git" >repo.git/repos/foo/commondir &&
(
cd work &&
GIT_DIR=../gitfile git rev-parse --git-common-dir >actual &&
test-path-utils real_path "$TRASH_DIRECTORY/repo.git" >expect &&
test_cmp expect actual
)
3de952f2416b6084f557ec417709eac740c6818c
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
88bcdc1839f0ad191ffdd65cae2a2a862d682151
fatal: Log for 'master' only has 4 entries.
ok 15 - git read-tree -u --reset: added submodule creates empty directory
expecting success:
prolog &&
reset_work_tree_to no_submodule &&
(
cd submodule_update &&
git branch -t add_sub1 origin/add_sub1 &&
mkdir sub1 &&
$command add_sub1 &&
test_superproject_content origin/add_sub1 &&
test_dir_is_empty sub1 &&
git submodule update --init --recursive &&
test_submodule_content sub1 origin/add_sub1
)
ok 34 - GIT_DIR set (2)
expecting success:
echo "gitdir: repo.git/repos/foo" >.git &&
echo ../.. >repo.git/repos/foo/commondir &&
(
cd work &&
git rev-parse --git-common-dir >actual &&
test-path-utils real_path "$TRASH_DIRECTORY/repo.git" >expect &&
test_cmp expect actual &&
echo haha >data1 &&
git add data1 &&
git ls-files --full-name :/ | grep data1 >actual &&
echo work/data1 >expect &&
test_cmp expect actual
)
fatal: Log for 'master' only has 4 entries.
ok 10 - master@{n} for various n
# passed all 10 test(s)
1..10
warning in tree 879560d9e3297f45ca9c25d4eea563f8dd179a32: hasDotdot: contains '..'
warning in tree 879560d9e3297f45ca9c25d4eea563f8dd179a32: hasDotdot: contains '..'
ok 28 - fsck notices .. as blob
expecting success:
(
git init $name-$type &&
cd $name-$type &&
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse :file) &&
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
grep "warning.*tree $bad_tree" out
)
*** t1504-ceiling-dirs.sh ***
ok 35 - Auto discovery
expecting success:
mkdir elsewhere &&
git --git-dir=repo.git config core.worktree "$TRASH_DIRECTORY/elsewhere" &&
echo "gitdir: repo.git/repos/foo" >.git &&
echo ../.. >repo.git/repos/foo/commondir &&
(
cd work &&
git rev-parse --git-common-dir >actual &&
test-path-utils real_path "$TRASH_DIRECTORY/repo.git" >expect &&
test_cmp expect actual &&
echo haha >data2 &&
git add data2 &&
git ls-files --full-name :/ | grep data2 >actual &&
echo work/data2 >expect &&
test_cmp expect actual
)
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/dotdot-tree/.git/
Cloning into 'submodule_update'...
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1504-ceiling-dirs/.git/
expecting success: test '' = "$(git rev-parse --show-prefix)"
done.
ok 36 - $GIT_DIR/common overrides core.worktree
expecting success:
echo "gitdir: repo.git/repos/foo" >.git &&
echo ../.. >repo.git/repos/foo/commondir &&
(
cd work &&
echo haha >data3 &&
git --git-dir=../.git --work-tree=. add data3 &&
git ls-files --full-name -- :/ | grep data3 >actual &&
echo data3 >expect &&
test_cmp expect actual
)
ok 1 - no_ceil
expecting success: test '' = "$(git rev-parse --show-prefix)"
ok 2 - ceil_empty
expecting success: test '' = "$(git rev-parse --show-prefix)"
ok 37 - $GIT_WORK_TREE overrides $GIT_DIR/common
warning in tree e704ff9811f799e752c8894dbc145bc74e4561fa: hasDotdot: contains '..'
ok 3 - ceil_at_parent
expecting success: test '' = "$(git rev-parse --show-prefix)"
# passed all 37 test(s)
1..37
warning in tree e704ff9811f799e752c8894dbc145bc74e4561fa: hasDotdot: contains '..'
ok 29 - fsck notices .. as tree
expecting success:
(
git init $name-$type &&
cd $name-$type &&
echo content >file &&
git add file &&
Switched to a new branch 'no_submodule'
git commit -m base &&
blob=$(git rev-parse :file) &&
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
grep "warning.*tree $bad_tree" out
)
Branch no_submodule set up to track remote branch no_submodule from origin.
ok 4 - ceil_at_parent_slash
expecting success: test '' = "$(git rev-parse --show-prefix)"
ok 5 - ceil_at_trash
expecting success: test '' = "$(git rev-parse --show-prefix)"
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/dotgit-blob/.git/
ok 6 - ceil_at_trash_slash
expecting success: test '' = "$(git rev-parse --show-prefix)"
Branch add_sub1 set up to track remote branch add_sub1 from origin.
ok 7 - ceil_at_sub
expecting success: test '' = "$(git rev-parse --show-prefix)"
*** t1505-rev-parse-last.sh ***
ok 8 - ceil_at_sub_slash
checking prerequisite: SYMLINKS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# test whether the filesystem supports symbolic links
ln -s x y && test -h y
)
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
prerequisite SYMLINKS ok
expecting success: test 'sub/dir/' = "$(git rev-parse --show-prefix)"
ok 9 - subdir_no_ceil
expecting success: test 'sub/dir/' = "$(git rev-parse --show-prefix)"
ok 10 - subdir_ceil_empty
expecting success:
test_expect_code 128 git rev-parse --show-prefix
fatal: Not a git repository (or any of the parent directories): .git
ok 11 - subdir_ceil_at_trash: prefix
expecting success:
test_expect_code 128 git rev-parse --show-prefix
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1505-rev-parse-last/.git/
warning in tree 8ac5f64528d35de17a03755d2f3387af1de58b5a: hasDotgit: contains '.git'
fatal: Not a git repository (or any of the parent directories): .git
ok 12 - subdir_ceil_at_trash_slash: prefix
expecting success:
test_expect_code 128 git rev-parse --show-prefix
expecting success:
make_commit 1 &&
git branch side &&
make_commit 2 &&
make_commit 3 &&
git checkout side &&
make_commit 4 &&
git merge master &&
git checkout master
warning in tree 8ac5f64528d35de17a03755d2f3387af1de58b5a: hasDotgit: contains '.git'
fatal: Not a git repository (or any of the parent directories): .git
ok 30 - fsck notices .git as blob
ok 13 - subdir_ceil_at_sub: prefix
expecting success:
(
git init $name-$type &&
cd $name-$type &&
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse :file) &&
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
grep "warning.*tree $bad_tree" out
)
expecting success:
test_expect_code 128 git rev-parse --show-prefix
fatal: Not a git repository (or any of the parent directories): .git
ok 14 - subdir_ceil_at_sub_slash: prefix
expecting success:
test_expect_code 128 git rev-parse --show-prefix
fatal: Not a git repository (or any of the parent directories): .git
ok 15 - subdir_ceil_at_top: prefix
expecting success:
test_expect_code 128 git rev-parse --show-prefix
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/dotgit-tree/.git/
fatal: Not a git repository (or any of the parent directories): .git
ok 16 - subdir_ceil_at_top_slash: prefix
expecting success: test 'sub/dir/' = "$(git rev-parse --show-prefix)"
[master (root-commit) df33a3a] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1
ok 17 - subdir_ceil_at_top_no_resolve
expecting success: test 'sub/dir/' = "$(git rev-parse --show-prefix)"
ok 18 - subdir_ceil_at_top_slash_no_resolve
expecting success: test 'sub/dir/' = "$(git rev-parse --show-prefix)"
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 19 - subdir_ceil_at_subdir
expecting success: test 'sub/dir/' = "$(git rev-parse --show-prefix)"
ok 20 - subdir_ceil_at_subdir_slash
expecting success: test 'sub/dir/' = "$(git rev-parse --show-prefix)"
[master bb5de15] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2
ok 21 - subdir_ceil_at_su
expecting success: test 'sub/dir/' = "$(git rev-parse --show-prefix)"
ok 22 - subdir_ceil_at_su_slash
expecting success: test 'sub/dir/' = "$(git rev-parse --show-prefix)"
ok 23 - subdir_ceil_at_sub_di
expecting success: test 'sub/dir/' = "$(git rev-parse --show-prefix)"
warning in tree 69237360529ca48e6b6c1af14e753faabe339fb7: hasDotgit: contains '.git'
warning in tree 69237360529ca48e6b6c1af14e753faabe339fb7: hasDotgit: contains '.git'
[master 6e485f2] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 3
ok 31 - fsck notices .git as tree
expecting success:
(
git init $name-$type &&
cd $name-$type &&
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse :file) &&
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
grep "warning.*tree $bad_tree" out
)
ok 24 - subdir_ceil_at_sub_di_slash
expecting success: test 'sub/dir/' = "$(git rev-parse --show-prefix)"
Switched to branch 'side'
ok 25 - subdir_ceil_at_subdi
expecting success: test 'sub/dir/' = "$(git rev-parse --show-prefix)"
Submodule 'sub1' (/«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.) registered for path 'sub1'
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/dotgit-case-blob/.git/
ok 26 - subdir_ceil_at_subdi_slash
expecting success:
test_expect_code 128 git rev-parse --show-prefix
fatal: Not a git repository (or any of the parent directories): .git
ok 27 - second_of_two: prefix
expecting success:
test_expect_code 128 git rev-parse --show-prefix
[side eefe273] 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 4
fatal: Not a git repository (or any of the parent directories): .git
ok 28 - first_of_two: prefix
expecting success:
test_expect_code 128 git rev-parse --show-prefix
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
fatal: Not a git repository (or any of the parent directories): .git
ok 29 - second_of_three: prefix
expecting success: test '' = "$(git rev-parse --show-prefix)"
Merging:
eefe273 4
virtual master
found 1 common ancestor:
df33a3a 1
Merge made by the 'recursive' strategy.
ok 30 - git_dir_specified
2 | 1 +
3 | 1 +
2 files changed, 2 insertions(+)
create mode 100644 2
create mode 100644 3
expecting success: test 's/d/' = "$(git rev-parse --show-prefix)"
ok 31 - sd_no_ceil
expecting success: test 's/d/' = "$(git rev-parse --show-prefix)"
Switched to branch 'master'
ok 1 - setup
expecting success:
test_cmp_rev side @{-1}
ok 32 - sd_ceil_empty
expecting success:
test_expect_code 128 git rev-parse --show-prefix
fatal: Not a git repository (or any of the parent directories): .git
ok 33 - sd_ceil_at_trash: prefix
expecting success:
test_expect_code 128 git rev-parse --show-prefix
warning in tree 56bac0d7a0a3c1451521352e3d40117e5ffc602e: hasDotgit: contains '.git'
fatal: Not a git repository (or any of the parent directories): .git
ok 34 - sd_ceil_at_trash_slash: prefix
expecting success:
test_expect_code 128 git rev-parse --show-prefix
warning in tree 56bac0d7a0a3c1451521352e3d40117e5ffc602e: hasDotgit: contains '.git'
ok 32 - fsck notices .GIT as blob
expecting success:
(
git init $name-$type &&
cd $name-$type &&
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse :file) &&
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
grep "warning.*tree $bad_tree" out
)
fatal: Not a git repository (or any of the parent directories): .git
ok 35 - sd_ceil_at_s: prefix
ok 2 - @{-1} works
expecting success:
test_expect_code 128 git rev-parse --show-prefix
expecting success:
test_cmp_rev side~2 @{-1}~2
Cloning into 'sub1'...
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/dotgit-case-tree/.git/
fatal: Not a git repository (or any of the parent directories): .git
ok 36 - sd_ceil_at_s_slash: prefix
expecting success: test 's/d/' = "$(git rev-parse --show-prefix)"
ok 37 - sd_ceil_at_sd
expecting success: test 's/d/' = "$(git rev-parse --show-prefix)"
ok 3 - @{-1}~2 works
expecting success:
test_cmp_rev side^2 @{-1}^2
ok 38 - sd_ceil_at_sd_slash
expecting success: test 's/d/' = "$(git rev-parse --show-prefix)"
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
done.
ok 39 - sd_ceil_at_su
expecting success: test 's/d/' = "$(git rev-parse --show-prefix)"
ok 40 - sd_ceil_at_su_slash
expecting success: test 's/d/' = "$(git rev-parse --show-prefix)"
ok 4 - @{-1}^2 works
expecting success:
test_cmp_rev side@{1} @{-1}@{1}
ok 41 - sd_ceil_at_s_di
expecting success: test 's/d/' = "$(git rev-parse --show-prefix)"
ok 42 - sd_ceil_at_s_di_slash
expecting success: test 's/d/' = "$(git rev-parse --show-prefix)"
ok 43 - sd_ceil_at_sdi
expecting success: test 's/d/' = "$(git rev-parse --show-prefix)"
ok 5 - @{-1}@{1} works
expecting success:
test_cmp_rev master @{-2}
ok 44 - sd_ceil_at_sdi_slash
warning in tree 968a2dfde1e164e0513456c00ef656b2497434a3: hasDotgit: contains '.git'
# passed all 44 test(s)
1..44
warning in tree 968a2dfde1e164e0513456c00ef656b2497434a3: hasDotgit: contains '.git'
ok 33 - fsck notices .GIT as tree
expecting success:
(
git init $name-$type &&
cd $name-$type &&
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse :file) &&
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
grep "warning.*tree $bad_tree" out
)
ok 6 - @{-2} works
expecting success:
test_must_fail git rev-parse @{-3}
fatal: ambiguous argument '@{-3}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
@{-3}
ok 7 - @{-3} fails
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/dotgit-unicode-blob/.git/
*** t1506-rev-parse-diagnosis.sh ***
# passed all 7 test(s)
1..7
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Submodule path 'sub1': checked out '58630c04cd08e6914ad0ab5a3126bcfb71a3e6ca'
*** t1507-rev-parse-upstream.sh ***
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1506-rev-parse-diagnosis/.git/
expecting success:
echo one > file.txt &&
mkdir subdir &&
echo two > subdir/file.txt &&
echo three > subdir/file2.txt &&
git add . &&
git commit -m init &&
echo four > index-only.txt &&
git add index-only.txt &&
echo five > disk-only.txt
warning in tree 2b65491a1b39699fb2bffda8e997c85fcb9c7beb: hasDotgit: contains '.git'
warning in tree 2b65491a1b39699fb2bffda8e997c85fcb9c7beb: hasDotgit: contains '.git'
ok 34 - fsck notices .gI{u200c}T as blob
expecting success:
(
git init $name-$type &&
cd $name-$type &&
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse :file) &&
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
grep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1507-rev-parse-upstream/.git/
expecting success:
test_commit 1 &&
git checkout -b side &&
test_commit 2 &&
git checkout master &&
git clone . clone &&
test_commit 3 &&
(cd clone &&
test_commit 4 &&
git branch --track my-side origin/side &&
git branch --track local-master master &&
git branch --track fun@ny origin/side &&
git branch --track @funny origin/side &&
git branch --track funny@ origin/side &&
git remote add -t master master-only .. &&
git fetch master-only &&
git branch bad-upstream &&
git config branch.bad-upstream.remote master-only &&
git config branch.bad-upstream.merge refs/heads/side
)
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/dotgit-unicode-tree/.git/
[master (root-commit) d3d3f97] init
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 file.txt
create mode 100644 subdir/file.txt
create mode 100644 subdir/file2.txt
ok 1 - set up basic repo
expecting success:
HASH_file=$(git rev-parse HEAD:file.txt) &&
git rev-parse HEAD:subdir/file.txt &&
git rev-parse :index-only.txt &&
(cd subdir &&
git rev-parse HEAD:subdir/file2.txt &&
test $HASH_file = $(git rev-parse HEAD:file.txt) &&
test $HASH_file = $(git rev-parse :file.txt) &&
test $HASH_file = $(git rev-parse :0:file.txt) )
[master (root-commit) d0dcf97] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1.t
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
f719efd430d52bcfc8566a43b2eb655688d38871
ok 16 - git read-tree -u --reset: added submodule leaves existing empty directory alone
expecting success:
prolog &&
reset_work_tree_to no_submodule &&
(
cd submodule_update &&
git branch -t add_sub1 origin/add_sub1 &&
>sub1 &&
$command add_sub1 &&
test_superproject_content origin/add_sub1 &&
test_dir_is_empty sub1
)
8510665149157c2bc901848c3e0b746954e9cbd9
2bdf67abb163a4ffb2d7f3f0880c9fe5068ce782
Switched to a new branch 'side'
warning in tree 6a547d921721f1cf91601a53fcc7aae232947d23: hasDotgit: contains '.git'
ok 2 - correct file objects
expecting success:
git rev-parse :file.txt >expected &&
git rev-parse :./file.txt >result &&
test_cmp expected result &&
git rev-parse :0:./file.txt >result &&
test_cmp expected result
[side 82335b2] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2.t
warning in tree 6a547d921721f1cf91601a53fcc7aae232947d23: hasDotgit: contains '.git'
ok 35 - fsck notices .gI{u200c}T as tree
expecting success:
(
git init $name-$type &&
cd $name-$type &&
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse :file) &&
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
grep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/dotgit-case2-blob/.git/
Switched to branch 'master'
ok 3 - correct relative file objects (0)
expecting success:
git rev-parse HEAD:file.txt >expected &&
git rev-parse HEAD:./file.txt >result &&
test_cmp expected result
Cloning into 'clone'...
Cloning into 'submodule_update'...
ok 4 - correct relative file objects (1)
expecting success:
(
cd subdir &&
git rev-parse HEAD:../file.txt >result &&
test_cmp ../expected result
)
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
done.
ok 5 - correct relative file objects (2)
expecting success:
(
cd subdir &&
git rev-parse HEAD:../subdir/../file.txt >result &&
test_cmp ../expected result
)
done.
ok 6 - correct relative file objects (3)
expecting success:
git rev-parse HEAD:subdir/file.txt >expected &&
(
cd subdir &&
git rev-parse HEAD:./file.txt >result &&
test_cmp ../expected result
)
[master 8f489d0] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 3.t
ok 7 - correct relative file objects (4)
expecting success:
git rev-parse :subdir/file.txt >expected &&
(
cd subdir &&
git rev-parse :./file.txt >result &&
test_cmp ../expected result &&
git rev-parse :0:./file.txt >result &&
test_cmp ../expected result
)
warning in tree 3e29dd65f814deffead951c60da749fdf8a668c8: hasDotgit: contains '.git'
warning in tree 3e29dd65f814deffead951c60da749fdf8a668c8: hasDotgit: contains '.git'
Switched to a new branch 'no_submodule'
Branch no_submodule set up to track remote branch no_submodule from origin.
ok 36 - fsck notices .Git as blob
expecting success:
(
git init $name-$type &&
cd $name-$type &&
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse :file) &&
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
grep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/dotgit-case2-tree/.git/
ok 8 - correct relative file objects (5)
expecting success:
git rev-parse :file.txt >expected &&
(
cd subdir &&
git rev-parse :../file.txt >result &&
test_cmp ../expected result &&
git rev-parse :0:../file.txt >result &&
test_cmp ../expected result
)
[master 6efda21] 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 4.t
Branch add_sub1 set up to track remote branch add_sub1 from origin.
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Branch my-side set up to track remote branch side from origin.
ok 9 - correct relative file objects (6)
expecting success:
test_must_fail git rev-parse foobar:file.txt 2>error &&
grep "Invalid object name 'foobar'." error &&
test_must_fail git rev-parse foobar 2> error &&
grep "unknown revision or path not in the working tree." error
foobar:file.txt
fatal: Invalid object name 'foobar'.
Branch local-master set up to track local branch master.
foobar
fatal: ambiguous argument 'foobar': unknown revision or path not in the working tree.
ok 10 - incorrect revision id
expecting success:
test_must_fail git rev-parse HEAD:nothing.txt 2> error &&
grep "fatal: Path 'nothing.txt' does not exist in 'HEAD'" error &&
test_must_fail git rev-parse HEAD:index-only.txt 2> error &&
grep "fatal: Path 'index-only.txt' exists on disk, but not in 'HEAD'." error &&
(cd subdir &&
test_must_fail git rev-parse HEAD:file2.txt 2> error &&
test_did_you_mean HEAD subdir/ file2.txt exists )
Branch fun@ny set up to track remote branch side from origin.
HEAD:nothing.txt
ok 17 - git read-tree -u --reset: added submodule does remove untracked unignored file with same name when forced
expecting success:
prolog &&
reset_work_tree_to replace_sub1_with_file &&
(
cd submodule_update &&
git branch -t replace_file_with_sub1 origin/replace_file_with_sub1 &&
$command replace_file_with_sub1 &&
test_superproject_content origin/replace_file_with_sub1 &&
test_dir_is_empty sub1 &&
git submodule update --init --recursive &&
test_submodule_content sub1 origin/replace_file_with_sub1
)
fatal: Path 'nothing.txt' does not exist in 'HEAD'
Branch @funny set up to track remote branch side from origin.
warning in tree 50c7c9624762f2fe0d4efe5cba98835f58822ef4: hasDotgit: contains '.git'
HEAD:index-only.txt
warning in tree 50c7c9624762f2fe0d4efe5cba98835f58822ef4: hasDotgit: contains '.git'
ok 37 - fsck notices .Git as tree
expecting success:
(
git init $name-$type &&
cd $name-$type &&
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse :file) &&
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
grep "warning.*tree $bad_tree" out
)
fatal: Path 'index-only.txt' exists on disk, but not in 'HEAD'.
Branch funny@ set up to track remote branch side from origin.
HEAD:file2.txt
ok 11 - incorrect file in sha1:path
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/git-tilde1-blob/.git/
expecting success:
test_must_fail git rev-parse :nothing.txt 2> error &&
grep "fatal: Path 'nothing.txt' does not exist (neither on disk nor in the index)." error &&
test_must_fail git rev-parse :1:nothing.txt 2> error &&
grep "Path 'nothing.txt' does not exist (neither on disk nor in the index)." error &&
test_must_fail git rev-parse :1:file.txt 2> error &&
test_did_you_mean ":0" "" file.txt "is in the index" "at stage 1" &&
(cd subdir &&
test_must_fail git rev-parse :1:file.txt 2> error &&
test_did_you_mean ":0" "" file.txt "is in the index" "at stage 1" &&
test_must_fail git rev-parse :file2.txt 2> error &&
test_did_you_mean ":0" subdir/ file2.txt "is in the index" &&
test_must_fail git rev-parse :2:file2.txt 2> error &&
test_did_you_mean :0 subdir/ file2.txt "is in the index") &&
test_must_fail git rev-parse :disk-only.txt 2> error &&
grep "fatal: Path 'disk-only.txt' exists on disk, but not in the index." error
:nothing.txt
fatal: Path 'nothing.txt' does not exist (neither on disk nor in the index).
Cloning into 'submodule_update'...
:1:nothing.txt
fatal: Path 'nothing.txt' does not exist (neither on disk nor in the index).
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
:1:file.txt
done.
:1:file.txt
From ..
* [new branch] master -> master-only/master
* [new tag] 3 -> 3
:file2.txt
:2:file2.txt
warning in tree 1206e1b64fcedc2a9e7b8195c1c4c1a278285b20: hasDotgit: contains '.git'
Switched to a new branch 'replace_sub1_with_file'
Branch replace_sub1_with_file set up to track remote branch replace_sub1_with_file from origin.
warning in tree 1206e1b64fcedc2a9e7b8195c1c4c1a278285b20: hasDotgit: contains '.git'
ok 38 - fsck notices git~1 as blob
expecting success:
(
git init $name-$type &&
cd $name-$type &&
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse :file) &&
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
grep "warning.*tree $bad_tree" out
)
:disk-only.txt
ok 1 - setup
expecting success:
test refs/remotes/origin/master = "$(full_name @{upstream})"
fatal: Path 'disk-only.txt' exists on disk, but not in the index.
ok 12 - incorrect file in :path and :N:path
expecting success:
test_must_fail git rev-parse master@{99999} >output 2>error &&
test -z "$(cat output)" &&
grep "fatal: Log for [^ ]* only has [0-9][0-9]* entries." error &&
test_must_fail git rev-parse --verify master@{99999} >output 2>error &&
test -z "$(cat output)" &&
grep "fatal: Log for [^ ]* only has [0-9][0-9]* entries." error
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/git-tilde1-tree/.git/
t1013-read-tree-submodule.sh: 159: cd: can't cd to sub1
Branch replace_file_with_sub1 set up to track remote branch replace_file_with_sub1 from origin.
ok 2 - @{upstream} resolves to correct full name
expecting success:
test refs/remotes/origin/master = "$(full_name @{u})"
fatal: Log for 'master' only has 1 entries.
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 3 - @{u} resolves to correct full name
expecting success:
test refs/remotes/origin/side = "$(full_name my-side@{u})"
fatal: Log for 'master' only has 1 entries.
ok 13 - invalid @{n} reference
expecting success:
(
cd subdir &&
test_must_fail git rev-parse HEAD:./nonexistent.txt 2>error &&
grep subdir/nonexistent.txt error
)
ok 4 - my-side@{upstream} resolves to correct full name
expecting success:
full_name fun@ny@{u} >actual &&
echo refs/remotes/origin/side >expect &&
test_cmp expect actual
HEAD:./nonexistent.txt
fatal: Path 'subdir/nonexistent.txt' does not exist in 'HEAD'
ok 14 - relative path not found
expecting success:
test_must_fail git rev-parse HEAD:../file.txt >output 2>error &&
test -z "$(cat output)" &&
grep "outside repository" error
ok 5 - upstream of branch with @ in middle
expecting success:
full_name @funny@{u} >actual &&
echo refs/remotes/origin/side >expect &&
test_cmp expect actual
fatal: '../file.txt' is outside repository
ok 15 - relative path outside worktree
expecting success:
test_must_fail git --git-dir=.git --work-tree=subdir rev-parse HEAD:./file.txt >output 2>error &&
test -z "$(cat output)" &&
grep "relative path syntax can.t be used outside working tree." error
ok 6 - upstream of branch with @ at start
expecting success:
full_name funny@@{u} >actual &&
echo refs/remotes/origin/side >expect &&
test_cmp expect actual
warning in tree 06f99accfb778f3318c72f3ae1c809cca146d27c: hasDotgit: contains '.git'
warning in tree 06f99accfb778f3318c72f3ae1c809cca146d27c: hasDotgit: contains '.git'
ok 39 - fsck notices git~1 as tree
expecting success:
(
git init $name-$type &&
cd $name-$type &&
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse :file) &&
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
grep "warning.*tree $bad_tree" out
)
ok 7 - upstream of branch with @ at end
expecting success:
test_must_fail full_name refs/heads/my-side@{upstream}
fatal: relative path syntax can't be used outside working tree.
ok 16 - relative path when cwd is outside worktree
expecting success:
test_must_fail test-match-trees HEAD:./file.txt HEAD:./file.txt 2>error &&
grep "BUG: startup_info struct is not initialized." error
fatal: no such branch: 'refs/heads/my-side'
ok 8 - refs/heads/my-side@{upstream} does not resolve to my-side{upstream}
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/dotgitdot-blob/.git/
expecting success:
git checkout side &&
test_commit 5 &&
(cd clone && git fetch) &&
test 2 = "$(commit_subject my-side)" &&
test 5 = "$(commit_subject my-side@{u})"
fatal: BUG: startup_info struct is not initialized.
ok 17 - relative path when startup_info is NULL
expecting success:
test_must_fail git rev-parse file.txt HEAD:file.txt 1>actual 2>error &&
test_i18ngrep ! "exists on disk" error &&
test_i18ngrep "no such path in the working tree" error &&
cat >expect <<-\EOF &&
file.txt
HEAD:file.txt
EOF
test_cmp expect actual
Switched to branch 'side'
fatal: HEAD:file.txt: no such path in the working tree.
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 18 - <commit>:file correctly diagnosed after a pathname
expecting success:
( H=$(git rev-parse HEAD) && echo $H && echo ^$H ) >expect &&
git rev-parse HEAD.. >actual &&
test_cmp expect actual &&
git rev-parse ..HEAD >actual &&
test_cmp expect actual &&
echo .. >expect &&
git rev-parse .. >actual &&
test_cmp expect actual
[side e3f9627] 5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 5.t
ok 19 - dotdot is not an empty set
expecting success:
test_must_fail git rev-parse foobar -- 2>stderr &&
test_i18ngrep "bad revision" stderr
warning in tree 08554698725ae2bc2c2ae0172779111c62bda7a2: hasDotgit: contains '.git'
warning in tree 08554698725ae2bc2c2ae0172779111c62bda7a2: hasDotgit: contains '.git'
ok 40 - fsck notices .git. as blob
expecting success:
(
git init $name-$type &&
cd $name-$type &&
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse :file) &&
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
grep "warning.*tree $bad_tree" out
)
fatal: bad revision 'foobar'
ok 20 - arg before dashdash must be a revision (missing)
expecting success:
>foobar &&
test_must_fail git rev-parse foobar -- 2>stderr &&
test_i18ngrep "bad revision" stderr
Submodule 'sub1' (/«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.) registered for path 'sub1'
fatal: bad revision 'foobar'
ok 21 - arg before dashdash must be a revision (file)
expecting success:
>foobar &&
git update-ref refs/heads/foobar HEAD &&
{
# we do not want to use rev-parse here, because
# we are testing it
cat .git/refs/heads/foobar &&
printf "%s\n" --
} >expect &&
git rev-parse foobar -- >actual &&
test_cmp expect actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/dotgitdot-tree/.git/
From /«PKGBUILDDIR»/t/trash directory.t1507-rev-parse-upstream/.
d0dcf97..8f489d0 master -> origin/master
82335b2..e3f9627 side -> origin/side
* [new tag] 5 -> 5
ok 22 - arg before dashdash must be a revision (ambiguous)
# passed all 22 test(s)
1..22
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 9 - my-side@{u} resolves to correct commit
expecting success:
test_must_fail full_name non-tracking@{u} &&
(cd clone && git checkout --no-track -b non-tracking) &&
test_must_fail full_name non-tracking@{u}
*** t1508-at-combinations.sh ***
fatal: no such branch: 'non-tracking'
Switched to a new branch 'non-tracking'
Cloning into 'sub1'...
fatal: no upstream configured for branch 'non-tracking'
ok 10 - not-tracking@{u} fails
expecting success:
test_commit 6 &&
(cd clone && git fetch) &&
test 5 = $(commit_subject my-side@{u}@{1})
warning in tree 4d7df7e65b79aeef4640dbfba95705b94a2bc266: hasDotgit: contains '.git'
warning in tree 4d7df7e65b79aeef4640dbfba95705b94a2bc266: hasDotgit: contains '.git'
ok 41 - fsck notices .git. as tree
expecting success:
(
git init $name-$type &&
cd $name-$type &&
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse :file) &&
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
grep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/dot-backslash-case-blob/.git/
done.
[side 8bf5882] 6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 6.t
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1508-at-combinations/.git/
expecting success:
test_commit master-one &&
test_commit master-two &&
git checkout -b upstream-branch &&
test_commit upstream-one &&
test_commit upstream-two &&
git checkout -b @/at-test &&
git checkout -b @@/at-test &&
git checkout -b @at-test &&
git checkout -b old-branch &&
test_commit old-one &&
test_commit old-two &&
git checkout -b new-branch &&
test_commit new-one &&
test_commit new-two &&
git branch -u master old-branch &&
git branch -u upstream-branch new-branch
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master (root-commit) 8ff5a25] master-one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 master-one.t
warning in tree 4447c608c557aa9e2d0d226c7af1f06937133ea1: hasDotgit: contains '.git'
[master 8164ab4] master-two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 master-two.t
warning in tree 4447c608c557aa9e2d0d226c7af1f06937133ea1: hasDotgit: contains '.git'
ok 42 - fsck notices .\.GIT\foobar as blob
expecting success:
(
git init $name-$type &&
cd $name-$type &&
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse :file) &&
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
grep "warning.*tree $bad_tree" out
)
From /«PKGBUILDDIR»/t/trash directory.t1507-rev-parse-upstream/.
e3f9627..8bf5882 side -> origin/side
* [new tag] 6 -> 6
Switched to a new branch 'upstream-branch'
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/dot-backslash-case-tree/.git/
Submodule path 'sub1': checked out '58630c04cd08e6914ad0ab5a3126bcfb71a3e6ca'
ok 11 - <branch>@{u}@{1} resolves correctly
expecting success:
git checkout HEAD^0 &&
test_must_fail git rev-parse @{u}
Note: checking out 'HEAD^0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
[upstream-branch 101729d] upstream-one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 upstream-one.t
HEAD is now at 8bf5882... 6
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
fatal: HEAD does not point to a branch
ok 12 - @{u} without specifying branch fails on a detached HEAD
expecting success:
(
cd clone &&
git checkout -b new my-side@{u} &&
git rev-parse --symbolic-full-name my-side@{u} >expect &&
git rev-parse --symbolic-full-name new@{u} >actual &&
test_cmp expect actual
)
Switched to a new branch 'new'
Branch new set up to track remote branch side from origin.
[upstream-branch 77f4b7f] upstream-two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 upstream-two.t
warning in tree a8562dc6d26106f039fc8af6b2aa6fed2b1e14d4: hasDotgit: contains '.git'
warning in tree a8562dc6d26106f039fc8af6b2aa6fed2b1e14d4: hasDotgit: contains '.git'
ok 13 - checkout -b new my-side@{u} forks from the same
expecting success:
(
cd clone || exit
git checkout master || exit
git branch -D new ;# can fail but is ok
git branch -t new my-side@{u} &&
git merge -s ours new@{u} &&
git show -s --pretty=tformat:%s >actual &&
echo "Merge remote-tracking branch ${sq}origin/side${sq}" >expect &&
test_cmp expect actual
)
ok 43 - fsck notices .\.GIT\foobar as tree
expecting success:
(
git init $name-$type &&
cd $name-$type &&
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse :file) &&
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
grep "warning.*tree $bad_tree" out
)
Switched to a new branch '@/at-test'
ok 18 - git read-tree -u --reset: replace tracked file with submodule creates empty directory
expecting success:
prolog &&
reset_work_tree_to replace_sub1_with_directory &&
(
cd submodule_update &&
git branch -t replace_directory_with_sub1 origin/replace_directory_with_sub1 &&
$command replace_directory_with_sub1 &&
test_superproject_content origin/replace_directory_with_sub1 &&
test_dir_is_empty sub1 &&
git submodule update --init --recursive &&
test_submodule_content sub1 origin/replace_directory_with_sub1
)
Switched to branch 'master'
Your branch and 'origin/master' have diverged,
and have 1 and 1 different commit each, respectively.
(use "git pull" to merge the remote branch into yours)
Switched to a new branch '@@/at-test'
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/dotgit-case-backslash-blob/.git/
Deleted branch new (was 8bf5882).
Switched to a new branch '@at-test'
Branch new set up to track remote branch side from origin.
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Switched to a new branch 'old-branch'
Merge made by the 'ours' strategy.
[old-branch 4e4e7fa] old-one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 old-one.t
ok 14 - merge my-side@{u} records the correct name
expecting success:
git checkout -t -b other master &&
git branch -d @{u} &&
git for-each-ref refs/heads/master >actual &&
>expect &&
test_cmp expect actual
warning in tree 707c253cde8e3742e9f02a3cf02fdc4ca0f55652: hasDotgit: contains '.git'
warning in tree 707c253cde8e3742e9f02a3cf02fdc4ca0f55652: hasDotgit: contains '.git'
ok 44 - fsck notices .git\foobar as blob
expecting success:
(
git init $name-$type &&
cd $name-$type &&
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse :file) &&
tree=$(git rev-parse HEAD^{tree}) &&
value=$(eval "echo \$$type") &&
printf "$mode $type %s\t%s" "$value" "$path" >bad &&
bad_tree=$(git mktree <bad) &&
git fsck 2>out &&
cat out &&
grep "warning.*tree $bad_tree" out
)
Previous HEAD position was 8bf5882... 6
Cloning into 'submodule_update'...
Switched to a new branch 'other'
Branch other set up to track local branch master.
[old-branch 3273d4d] old-two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 old-two.t
Deleted branch master (was 8f489d0).
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/dotgit-case-backslash-tree/.git/
ok 15 - branch -d other@{u}
expecting success:
git branch -f master HEAD &&
git checkout -t -b another master &&
git checkout @{u} &&
git symbolic-ref HEAD >actual &&
echo refs/heads/master >expect &&
test_cmp expect actual
Switched to a new branch 'new-branch'
done.
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Switched to a new branch 'another'
Branch another set up to track local branch master.
[new-branch e49ce93] new-one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 new-one.t
Switched to branch 'master'
Switched to a new branch 'replace_sub1_with_directory'
ok 16 - checkout other@{u}
expecting success:
test refs/heads/master = "$(full_name local-master@{u})"
Branch replace_sub1_with_directory set up to track remote branch replace_sub1_with_directory from origin.
ok 17 - branch@{u} works when tracking a local branch
expecting success:
cat >expect <<-EOF &&
fatal: no upstream configured for branch ${sq}non-tracking${sq}
EOF
error_message non-tracking@{u} 2>actual &&
test_i18ncmp expect actual
warning in tree caa586f8ddde64c3fc9157a3a262c9bd6a6a41ff: hasDotgit: contains '.git'
[new-branch c493e4b] new-two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 new-two.t
warning in tree caa586f8ddde64c3fc9157a3a262c9bd6a6a41ff: hasDotgit: contains '.git'
ok 45 - fsck notices .git\foobar as tree
expecting success:
(
git init not-dotgit &&
cd not-dotgit &&
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse :file) &&
printf "100644 blob $blob\t.\\305\\207it" >tree &&
tree=$(git mktree <tree) &&
git fsck 2>err &&
test_line_count = 0 err
)
ok 18 - branch@{u} error message when no upstream
expecting success:
cat >expect <<-EOF &&
fatal: no upstream configured for branch ${sq}master${sq}
EOF
test_must_fail git rev-parse --verify @{u} 2>actual &&
test_i18ncmp expect actual
error: 8ed2e6719f8484ce01fa3ce133fe42d25c2441b8^{commit}: expected commit type, but the object dereferences to tree type
fatal: Needed a single revision
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/not-dotgit/.git/
Branch old-branch set up to track local branch master.
ok 19 - @{u} error message when no upstream
expecting success:
cat >expect <<-EOF &&
fatal: no such branch: ${sq}no-such-branch${sq}
EOF
error_message no-such-branch@{u} 2>actual &&
test_i18ncmp expect actual
Branch new-branch set up to track local branch upstream-branch.
ok 1 - setup
expecting success:
echo 'refs/heads/new-branch' >expect &&
if test 'ref' = 'commit'
then
git log -1 --format=%s 'HEAD' >actual
elif test 'ref' = 'ref'
then
git rev-parse --symbolic-full-name 'HEAD' >actual
else
git cat-file -p 'HEAD' >actual
fi &&
test_cmp expect actual
Branch replace_directory_with_sub1 set up to track remote branch replace_directory_with_sub1 from origin.
ok 20 - branch@{u} error message with misspelt branch
expecting success:
cat >expect <<-EOF &&
fatal: HEAD does not point to a branch
EOF
git checkout HEAD^0 &&
test_must_fail git rev-parse --verify @{u} 2>actual &&
test_i18ncmp expect actual
ok 2 - HEAD = refs/heads/new-branch
expecting success:
echo 'new-one' >expect &&
if test 'commit' = 'commit'
then
git log -1 --format=%s '@{1}' >actual
elif test 'commit' = 'ref'
then
git rev-parse --symbolic-full-name '@{1}' >actual
else
git cat-file -p '@{1}' >actual
fi &&
test_cmp expect actual
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Note: checking out 'HEAD^0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 8f489d0... 3
ok 3 - @{1} = new-one
expecting success:
echo 'new-one' >expect &&
if test 'commit' = 'commit'
then
git log -1 --format=%s 'HEAD@{1}' >actual
elif test 'commit' = 'ref'
then
git rev-parse --symbolic-full-name 'HEAD@{1}' >actual
else
git cat-file -p 'HEAD@{1}' >actual
fi &&
test_cmp expect actual
ok 21 - @{u} error message when not on a branch
expecting success:
cat >expect <<-EOF &&
fatal: upstream branch ${sq}refs/heads/side${sq} not stored as a remote-tracking branch
EOF
error_message bad-upstream@{u} 2>actual &&
test_i18ncmp expect actual
ok 4 - HEAD@{1} = new-one
expecting success:
echo 'new-two' >expect &&
if test 'commit' = 'commit'
then
git log -1 --format=%s '@{now}' >actual
elif test 'commit' = 'ref'
then
git rev-parse --symbolic-full-name '@{now}' >actual
else
git cat-file -p '@{now}' >actual
fi &&
test_cmp expect actual
ok 46 - fsck allows .Ňit
expecting success:
create_repo_missing HEAD:subdir/file &&
test_must_fail git -C missing fsck
ok 22 - branch@{u} error message if upstream branch not fetched
expecting success:
(
cd clone &&
git checkout local-master &&
git pull
)
ok 5 - @{now} = new-two
expecting success:
echo 'new-two' >expect &&
if test 'commit' = 'commit'
then
git log -1 --format=%s 'HEAD@{now}' >actual
elif test 'commit' = 'ref'
then
git rev-parse --symbolic-full-name 'HEAD@{now}' >actual
else
git cat-file -p 'HEAD@{now}' >actual
fi &&
test_cmp expect actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/missing/.git/
Switched to branch 'local-master'
Your branch is behind 'master' by 4 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
ok 6 - HEAD@{now} = new-two
expecting success:
echo 'refs/heads/old-branch' >expect &&
if test 'ref' = 'commit'
then
git log -1 --format=%s '@{-1}' >actual
elif test 'ref' = 'ref'
then
git rev-parse --symbolic-full-name '@{-1}' >actual
else
git cat-file -p '@{-1}' >actual
fi &&
test_cmp expect actual
ok 7 - @{-1} = refs/heads/old-branch
[master (root-commit) expecting success:
echo 'old-two' >expect &&
if test 'commit' = 'commit'
then
git log -1 --format=%s '@{-1}@{0}' >actual
elif test 'commit' = 'ref'
then
git rev-parse --symbolic-full-name '@{-1}@{0}' >actual
else
git cat-file -p '@{-1}@{0}' >actual
fi &&
test_cmp expect actual
d38f542] one
Author: A U Thor <author@example.com>
ok 8 - @{-1}@{0} = old-two
expecting success:
echo 'old-one' >expect &&
if test 'commit' = 'commit'
then
git log -1 --format=%s '@{-1}@{1}' >actual
elif test 'commit' = 'ref'
then
git rev-parse --symbolic-full-name '@{-1}@{1}' >actual
else
git cat-file -p '@{-1}@{1}' >actual
fi &&
test_cmp expect actual
ok 9 - @{-1}@{1} = old-one
expecting success:
echo 'refs/heads/upstream-branch' >expect &&
if test 'ref' = 'commit'
then
git log -1 --format=%s '@{u}' >actual
elif test 'ref' = 'ref'
then
git rev-parse --symbolic-full-name '@{u}' >actual
else
git cat-file -p '@{u}' >actual
fi &&
test_cmp expect actual
[master ca32bda] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subdir/file
From .
* branch master -> FETCH_HEAD
ok 10 - @{u} = refs/heads/upstream-branch
expecting success:
echo 'refs/heads/upstream-branch' >expect &&
if test 'ref' = 'commit'
then
git log -1 --format=%s 'HEAD@{u}' >actual
elif test 'ref' = 'ref'
then
git rev-parse --symbolic-full-name 'HEAD@{u}' >actual
else
git cat-file -p 'HEAD@{u}' >actual
fi &&
test_cmp expect actual
ok 11 - HEAD@{u} = refs/heads/upstream-branch
expecting success:
echo 'upstream-one' >expect &&
if test 'commit' = 'commit'
then
git log -1 --format=%s '@{u}@{1}' >actual
elif test 'commit' = 'ref'
then
git rev-parse --symbolic-full-name '@{u}@{1}' >actual
else
git cat-file -p '@{u}@{1}' >actual
fi &&
test_cmp expect actual
Updating 6efda21..ac35135
Fast-forward
ok 23 - pull works when tracking a local branch
expecting success:
test refs/heads/master = "$(full_name @{u})"
ok 12 - @{u}@{1} = upstream-one
expecting success:
echo 'refs/heads/master' >expect &&
if test 'ref' = 'commit'
then
git log -1 --format=%s '@{-1}@{u}' >actual
elif test 'ref' = 'ref'
then
git rev-parse --symbolic-full-name '@{-1}@{u}' >actual
else
git cat-file -p '@{-1}@{u}' >actual
fi &&
test_cmp expect actual
ok 24 - @{u} works when tracking a local branch
ok 13 - @{-1}@{u} = refs/heads/master
expecting success:
echo 'master-one' >expect &&
if test 'commit' = 'commit'
then
git log -1 --format=%s '@{-1}@{u}@{1}' >actual
elif test 'commit' = 'ref'
then
git rev-parse --symbolic-full-name '@{-1}@{u}@{1}' >actual
else
git cat-file -p '@{-1}@{u}@{1}' >actual
fi &&
test_cmp expect actual
expecting success:
git log -1 -g other@{u} >actual &&
test_cmp expect actual
Submodule 'sub1' (/«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.) registered for path 'sub1'
missing blob d95f3ad14dee633a758d2e331151e950dd13e4ed
ok 47 - fsck notices missing blob
expecting success:
create_repo_missing HEAD:subdir &&
test_must_fail git -C missing fsck
ok 14 - @{-1}@{u}@{1} = master-one
expecting success:
echo 'new-two' >expect &&
if test 'commit' = 'commit'
then
git log -1 --format=%s '@' >actual
elif test 'commit' = 'ref'
then
git rev-parse --symbolic-full-name '@' >actual
else
git cat-file -p '@' >actual
fi &&
test_cmp expect actual
ok 25 - log -g other@{u}
expecting success:
git log -1 -g other@{u}@{now} >actual &&
test_cmp expect actual
ok 15 - @ = new-two
expecting success:
echo 'refs/heads/upstream-branch' >expect &&
if test 'ref' = 'commit'
then
git log -1 --format=%s '@@{u}' >actual
elif test 'ref' = 'ref'
then
git rev-parse --symbolic-full-name '@@{u}' >actual
else
git cat-file -p '@@{u}' >actual
fi &&
test_cmp expect actual
ok 26 - log -g other@{u}@{now}
expecting success:
echo content >@{yesterday} &&
git add @{yesterday} &&
git commit -m "funny reflog file" &&
git hash-object @{yesterday} >expect &&
git rev-parse HEAD:@{yesterday} >actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/missing/.git/
ok 16 - @@{u} = refs/heads/upstream-branch
expecting success:
echo 'refs/heads/@@/at-test' >expect &&
if test 'ref' = 'commit'
then
git log -1 --format=%s '@@/at-test' >actual
elif test 'ref' = 'ref'
then
git rev-parse --symbolic-full-name '@@/at-test' >actual
else
git cat-file -p '@@/at-test' >actual
fi &&
test_cmp expect actual
[master (root-commit) ok 17 - @@/at-test = refs/heads/@@/at-test
d38f542] one
Author: A U Thor <author@example.com>
expecting success:
echo 'refs/heads/@/at-test' >expect &&
if test 'ref' = 'commit'
then
git log -1 --format=%s '@/at-test' >actual
elif test 'ref' = 'ref'
then
git rev-parse --symbolic-full-name '@/at-test' >actual
else
git cat-file -p '@/at-test' >actual
fi &&
test_cmp expect actual
ok 18 - @/at-test = refs/heads/@/at-test
expecting success:
echo 'refs/heads/@at-test' >expect &&
if test 'ref' = 'commit'
then
git log -1 --format=%s '@at-test' >actual
elif test 'ref' = 'ref'
then
git rev-parse --symbolic-full-name '@at-test' >actual
else
git cat-file -p '@at-test' >actual
fi &&
test_cmp expect actual
[detached HEAD eae0df2] funny reflog file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 @{yesterday}
ok 19 - @at-test = refs/heads/@at-test
expecting success:
test_must_fail git rev-parse --verify '@{u}@{-1}'
[master ca32bda] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subdir/file
Cloning into 'sub1'...
ok 27 - @{reflog}-parsing does not look beyond colon
expecting success:
echo content >@{upstream} &&
git add @{upstream} &&
git commit -m "funny upstream file" &&
git hash-object @{upstream} >expect &&
git rev-parse HEAD:@{upstream} >actual
fatal: Needed a single revision
ok 20 - @{u}@{-1} is nonsensical
expecting success:
test_must_fail git rev-parse --verify '@{0}@{0}'
fatal: Needed a single revision
ok 21 - @{0}@{0} is nonsensical
expecting success:
test_must_fail git rev-parse --verify '@{1}@{u}'
fatal: no such branch: '@{1}'
ok 22 - @{1}@{u} is nonsensical
expecting success:
test_must_fail git rev-parse --verify 'HEAD@{-1}'
fatal: Needed a single revision
ok 23 - HEAD@{-1} is nonsensical
expecting success:
test_must_fail git rev-parse --verify '@{-1}@{-1}'
fatal: Needed a single revision
ok 24 - @{-1}@{-1} is nonsensical
expecting success:
echo 'old-two' >expect &&
if test 'commit' = 'commit'
then
git log -1 --format=%s 'HEAD@{3}' >actual
elif test 'commit' = 'ref'
then
git rev-parse --symbolic-full-name 'HEAD@{3}' >actual
else
git cat-file -p 'HEAD@{3}' >actual
fi &&
test_cmp expect actual
ok 25 - HEAD@{3} = old-two
expecting success:
test_must_fail git rev-parse --verify '@{3}'
[detached HEAD c358789] funny upstream file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 @{upstream}
fatal: Log for 'new-branch' only has 3 entries.
ok 26 - @{3} is nonsensical
expecting success:
git checkout old-branch
done.
ok 28 - @{upstream}-parsing does not look beyond colon
Switched to branch 'old-branch'
Your branch is ahead of 'master' by 4 commits.
(use "git push" to publish your local commits)
ok 27 - switch to old-branch
expecting success:
echo 'refs/heads/old-branch' >expect &&
if test 'ref' = 'commit'
then
git log -1 --format=%s 'HEAD' >actual
elif test 'ref' = 'ref'
then
git rev-parse --symbolic-full-name 'HEAD' >actual
else
git cat-file -p 'HEAD' >actual
fi &&
test_cmp expect actual
error: 07753f428765ac1afe2020b24e40785869bd4a85: invalid sha1 pointer in cache-tree
broken link from tree 5f9d5fe4279246e5b2ddcd446efc2aed53a52304
to tree 07753f428765ac1afe2020b24e40785869bd4a85
missing tree 07753f428765ac1afe2020b24e40785869bd4a85
ok 48 - fsck notices missing subtree
expecting success:
create_repo_missing HEAD^{tree} &&
test_must_fail git -C missing fsck
# passed all 28 test(s)
1..28
ok 28 - HEAD = refs/heads/old-branch
expecting success:
echo 'new-two' >expect &&
if test 'commit' = 'commit'
then
git log -1 --format=%s 'HEAD@{1}' >actual
elif test 'commit' = 'ref'
then
git rev-parse --symbolic-full-name 'HEAD@{1}' >actual
else
git cat-file -p 'HEAD@{1}' >actual
fi &&
test_cmp expect actual
ok 29 - HEAD@{1} = new-two
expecting success:
echo 'old-one' >expect &&
if test 'commit' = 'commit'
then
git log -1 --format=%s '@{1}' >actual
elif test 'commit' = 'ref'
then
git rev-parse --symbolic-full-name '@{1}' >actual
else
git cat-file -p '@{1}' >actual
fi &&
test_cmp expect actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/missing/.git/
ok 30 - @{1} = old-one
expecting success:
echo content >normal &&
echo content >fun@ny &&
git add normal fun@ny &&
git commit -m "funny path"
[master (root-commit) d38f542] one
Author: A U Thor <author@example.com>
*** t1509-root-worktree.sh ***
[old-branch 9d022ac] funny path
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 fun@ny
create mode 100644 normal
ok 31 - create path with @
expecting success:
echo 'content' >expect &&
if test 'blob' = 'commit'
then
git log -1 --format=%s '@:normal' >actual
elif test 'blob' = 'ref'
then
git rev-parse --symbolic-full-name '@:normal' >actual
else
git cat-file -p '@:normal' >actual
fi &&
test_cmp expect actual
ok 32 - @:normal = content
expecting success:
echo 'content' >expect &&
if test 'blob' = 'commit'
then
git log -1 --format=%s '@:fun@ny' >actual
elif test 'blob' = 'ref'
then
git rev-parse --symbolic-full-name '@:fun@ny' >actual
else
git cat-file -p '@:fun@ny' >actual
fi &&
test_cmp expect actual
[master ca32bda] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subdir/file
Submodule path 'sub1': checked out '58630c04cd08e6914ad0ab5a3126bcfb71a3e6ca'
ok 33 - @:fun@ny = content
# passed all 33 test(s)
1..33
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1509-root-worktree/.git/
1..0 # SKIP Test requiring writable / skipped. Read this test if you want to run it
error: 5f9d5fe4279246e5b2ddcd446efc2aed53a52304: invalid sha1 pointer in cache-tree
broken link from commit ca32bdaaf4ee9eab00bafa6471c9a2fa98fc42c3
to tree 5f9d5fe4279246e5b2ddcd446efc2aed53a52304
missing tree 5f9d5fe4279246e5b2ddcd446efc2aed53a52304
ok 49 - fsck notices missing root tree
expecting success:
create_repo_missing HEAD^ &&
test_must_fail git -C missing fsck
*** t1510-repo-setup.sh ***
*** t1511-rev-parse-caret.sh ***
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/missing/.git/
ok 19 - git read-tree -u --reset: replace directory with submodule
expecting success:
prolog &&
reset_work_tree_to add_sub1 &&
(
cd submodule_update &&
git branch -t remove_sub1 origin/remove_sub1 &&
$command remove_sub1 &&
test_superproject_content origin/remove_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
[master (root-commit) d38f542] one
Author: A U Thor <author@example.com>
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1511-rev-parse-caret/.git/
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1510-repo-setup/.git/
expecting success:
echo blob >a-blob &&
git tag -a -m blob blob-tag `git hash-object -w a-blob` &&
mkdir a-tree &&
echo moreblobs >a-tree/another-blob &&
git add . &&
TREE_SHA1=`git write-tree` &&
git tag -a -m tree tree-tag "$TREE_SHA1" &&
git commit -m Initial &&
git tag -a -m commit commit-tag &&
git branch ref &&
git checkout master &&
echo modified >>a-blob &&
git add -u &&
git commit -m Modified
expecting success:
try_repo 0 unset unset unset "" unset \
.git "$here/0" "$here/0" "(null)" \
.git "$here/0" "$here/0" sub/ 2>message &&
! test -s message
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1510-repo-setup/0/.git/
[master ca32bda] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subdir/file
Cloning into 'submodule_update'...
ok 1 - #0: nonbare repo, no explicit configuration
expecting success:
mkdir -p wt &&
try_repo 1 "$here" unset unset "" unset \
"$here/1/.git" "$here" "$here" 1/ \
"$here/1/.git" "$here" "$here" 1/sub/ 2>message &&
! test -s message
[master (root-commit) e73b1e7] Initial
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 a-blob
create mode 100644 a-tree/another-blob
missing commit d38f542f2d868bcbbb09173528a3bb403f53a0f0
ok 50 - fsck notices missing parent
expecting success:
create_repo_missing tag^{blob} &&
test_must_fail git -C missing fsck
done.
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1510-repo-setup/1/.git/
Already on 'master'
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/missing/.git/
[master 13f1d88] Modified
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - setup
expecting success:
test_must_fail git rev-parse ref^{non-existent}
Switched to a new branch 'add_sub1'
Branch add_sub1 set up to track remote branch add_sub1 from origin.
fatal: ambiguous argument 'ref^{non-existent}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
[master (root-commit) d38f542] one
Author: A U Thor <author@example.com>
'git <command> [<revision>...] -- [<file>...]'
ref^{non-existent}
ok 2 - ref^{non-existent}
expecting success:
git rev-parse ref >expected &&
git rev-parse ref^{} >actual &&
test_cmp expected actual &&
git rev-parse commit-tag^{} >actual &&
test_cmp expected actual
ok 2 - #1: GIT_WORK_TREE without explicit GIT_DIR is accepted
expecting success:
try_repo 2 unset "$here/2/.git" unset "" unset \
"$here/2/.git" "$here/2" "$here/2" "(null)" \
"$here/2/.git" "$here/2/sub" "$here/2/sub" "(null)"
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1510-repo-setup/2/.git/
[master ca32bda] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subdir/file
ok 3 - ref^{}
expecting success:
git rev-parse ref >expected &&
git rev-parse ref^{commit} >actual &&
test_cmp expected actual &&
git rev-parse commit-tag^{commit} >actual &&
test_cmp expected actual &&
test_must_fail git rev-parse tree-tag^{commit} &&
test_must_fail git rev-parse blob-tag^{commit}
error: tree-tag^{commit}: expected commit type, but the object dereferences to tree type
error: tree-tag^{commit}: expected commit type, but the object dereferences to tree type
fatal: ambiguous argument 'tree-tag^{commit}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
tree-tag^{commit}
ok 3 - #2: worktree defaults to cwd with explicit GIT_DIR
expecting success:
try_repo 2b unset ".git" unset "" unset \
".git" "$here/2b" "$here/2b" "(null)" \
"../.git" "$here/2b/sub" "$here/2b/sub" "(null)"
error: blob-tag^{commit}: expected commit type, but the object dereferences to blob type
error: blob-tag^{commit}: expected commit type, but the object dereferences to blob type
fatal: ambiguous argument 'blob-tag^{commit}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
broken link from tag 7c115056e13b1f41142fe9e6f6cb98a1c077facd
to blob c21c9352f7526e9576892a6631e0e8cf1fccd34d
missing blob c21c9352f7526e9576892a6631e0e8cf1fccd34d
blob-tag^{commit}
ok 4 - ref^{commit}
expecting success:
echo $TREE_SHA1 >expected &&
git rev-parse ref^{tree} >actual &&
test_cmp expected actual &&
git rev-parse commit-tag^{tree} >actual &&
test_cmp expected actual &&
git rev-parse tree-tag^{tree} >actual &&
test_cmp expected actual &&
test_must_fail git rev-parse blob-tag^{tree}
ok 51 - fsck notices missing tagged object
expecting success:
create_repo_missing HEAD &&
test_must_fail git -C missing fsck
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1510-repo-setup/2b/.git/
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/missing/.git/
error: blob-tag^{tree}: expected tree type, but the object dereferences to blob type
error: blob-tag^{tree}: expected tree type, but the object dereferences to blob type
fatal: ambiguous argument 'blob-tag^{tree}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
blob-tag^{tree}
ok 5 - ref^{tree}
expecting success:
test_must_fail git rev-parse HEAD^{tag} &&
git rev-parse commit-tag >expected &&
git rev-parse commit-tag^{tag} >actual &&
test_cmp expected actual
error: HEAD^{tag}: expected tag type, but the object dereferences to tree type
error: HEAD^{tag}: expected tag type, but the object dereferences to tree type
fatal: ambiguous argument 'HEAD^{tag}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
HEAD^{tag}
[master (root-commit) d38f542] one
Author: A U Thor <author@example.com>
ok 4 - #2b: relative GIT_DIR
expecting success:
setup_repo 3 unset "" unset &&
mkdir -p 3/sub/sub 3/wt/sub
ok 6 - ref^{tag}
expecting success:
git rev-parse master >expected &&
git rev-parse master^{/.} >actual &&
test_cmp expected actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1510-repo-setup/3/.git/
[master ca32bda] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subdir/file
Submodule 'sub1' (/«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.) registered for path 'sub1'
ok 5 - #3: setup
expecting success:
try_case $N "$here/$N" .git \
"$dotgit" "$here/$N" "$here/$N" "(null)" &&
try_case $N . .git \
"$dotgit" "$here/$N" "$here/$N" "(null)" &&
try_case $N "$here/$N" "$here/$N/.git" \
"$absgit" "$here/$N" "$here/$N" "(null)" &&
try_case $N . "$here/$N/.git" \
"$absgit" "$here/$N" "$here/$N" "(null)"
ok 7 - ref^{/.}
expecting success:
test_must_fail git rev-parse master^{/non-existent}
fatal: ambiguous argument 'master^{/non-existent}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
master^{/non-existent}
ok 8 - ref^{/non-existent}
expecting success:
git rev-parse ref >expected &&
git rev-parse master^{/Initial} >actual &&
test_cmp expected actual
error: HEAD: invalid sha1 pointer ca32bdaaf4ee9eab00bafa6471c9a2fa98fc42c3
error: refs/heads/master: invalid sha1 pointer ca32bdaaf4ee9eab00bafa6471c9a2fa98fc42c3
ok 9 - ref^{/Initial}
error: refs/heads/master: invalid reflog entry ca32bdaaf4ee9eab00bafa6471c9a2fa98fc42c3
error: HEAD: invalid reflog entry ca32bdaaf4ee9eab00bafa6471c9a2fa98fc42c3
ok 52 - fsck notices ref pointing to missing commit
expecting success:
create_repo_missing tag &&
test_must_fail git -C missing fsck
# passed all 9 test(s)
1..9
Cloning into 'sub1'...
*** t1512-rev-parse-disambiguation.sh ***
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/missing/.git/
ok 6 - #3: explicit GIT_WORK_TREE and GIT_DIR at toplevel
expecting success:
try_case $N/sub/sub "$here/$N" ../../.git \
"$absgit" "$here/$N" "$here/$N" sub/sub/ &&
try_case $N/sub/sub ../.. ../../.git \
"$absgit" "$here/$N" "$here/$N" sub/sub/ &&
try_case $N/sub/sub "$here/$N" "$here/$N/.git" \
"$absgit" "$here/$N" "$here/$N" sub/sub/ &&
try_case $N/sub/sub ../.. "$here/$N/.git" \
"$absgit" "$here/$N" "$here/$N" sub/sub/
[master (root-commit) d38f542] one
Author: A U Thor <author@example.com>
done.
[master ca32bda] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subdir/file
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1512-rev-parse-disambiguation/.git/
expecting success:
test_tick &&
(
for i in 0 1 2 3 4 5 6 7 8 9
do
echo $i
done
echo
echo b1rwzyc3
) >a0blgqsjc &&
# create one blob 0000000000b36
git add a0blgqsjc &&
# create one tree 0000000000cdc
git write-tree
0000000000cdcf04beb2fab69e65622616294984
ok 1 - blob and tree
expecting success:
test_must_fail git rev-parse --verify 000000000^{commit} 2>actual &&
grep "short SHA1 000000000 is ambiguous" actual
error: short SHA1 000000000 is ambiguous.
ok 2 - warn ambiguity when no candidate matches type hint
expecting success:
# feed tree-ish in an unambiguous way
git rev-parse --verify 0000000000cdc:a0blgqsjc &&
# ambiguous at the object name level, but there is only one
# such tree-ish (the other is a blob)
git rev-parse --verify 000000000:a0blgqsjc
ok 7 - #3: explicit GIT_WORK_TREE and GIT_DIR in subdir
expecting success:
try_case $N "$here/$N/wt" .git \
"$dotgit" "$here/$N/wt" "$here/$N" "(null)" &&
try_case $N wt .git \
"$dotgit" "$here/$N/wt" "$here/$N" "(null)" &&
try_case $N wt "$here/$N/.git" \
"$absgit" "$here/$N/wt" "$here/$N" "(null)" &&
try_case $N "$here/$N/wt" "$here/$N/.git" \
"$absgit" "$here/$N/wt" "$here/$N" "(null)"
error: refs/tags/tag: invalid sha1 pointer 7c115056e13b1f41142fe9e6f6cb98a1c077facd
dangling blob c21c9352f7526e9576892a6631e0e8cf1fccd34d
ok 53 - fsck notices ref pointing to missing tag
0000000000b36b6aa7ea4b75318ed078f55505c3
expecting success:
rm -rf connectivity-only &&
git init connectivity-only &&
(
cd connectivity-only &&
touch empty &&
git add empty &&
test_commit empty &&
empty=.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 &&
rm -f $empty &&
echo invalid >$empty &&
test_must_fail git fsck --strict &&
git fsck --strict --connectivity-only &&
tree=$(git rev-parse HEAD:) &&
suffix=${tree#??} &&
tree=.git/objects/${tree%$suffix}/$suffix &&
rm -f $tree &&
echo invalid >$tree &&
test_must_fail git fsck --strict --connectivity-only
)
0000000000b36b6aa7ea4b75318ed078f55505c3
ok 3 - disambiguate tree-ish
expecting success:
sed -e "s/|$//" >patch <<-EOF &&
diff --git a/frotz b/frotz
index 000000000..ffffff 100644
--- a/frotz
+++ b/frotz
@@ -10,3 +10,4 @@
9
|
b1rwzyc3
+irwry
EOF
(
GIT_INDEX_FILE=frotz &&
export GIT_INDEX_FILE &&
git apply --build-fake-ancestor frotz patch &&
git cat-file blob :frotz >actual
) &&
test_cmp a0blgqsjc actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1450-fsck/connectivity-only/.git/
Submodule path 'sub1': checked out '58630c04cd08e6914ad0ab5a3126bcfb71a3e6ca'
ok 4 - disambiguate blob
expecting success:
commit=$(echo "d7xm" | git commit-tree 000000000) &&
# this commit is fffff2e and not ambiguous with the 00000* objects
test $(git rev-parse $commit^{tree}) = $(git rev-parse 0000000000cdc)
[master (root-commit) 86520b7] empty
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
create mode 100644 empty
create mode 100644 empty.t
ok 5 - disambiguate tree
expecting success:
# create one commit 0000000000e4f
git commit -m a2onsxbvj
[master (root-commit) 0000000000e] a2onsxbvj
Author: A U Thor <author@example.com>
1 file changed, 12 insertions(+)
create mode 100644 a0blgqsjc
ok 6 - first commit
expecting success:
# feed commit-ish in an unambiguous way
git rev-parse --verify 0000000000e4f^{commit} &&
# ambiguous at the object name level, but there is only one
# such commit (the others are tree and blob)
git rev-parse --verify 000000000^{commit} &&
# likewise
git rev-parse --verify 000000000^0
error: inflate: data stream error (incorrect header check)
error: unable to unpack e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 header
error: inflate: data stream error (incorrect header check)
error: inflate: data stream error (incorrect header check)
fatal: loose object e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 (stored in .git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391) is corrupt
ok 8 - #3: explicit GIT_WORK_TREE from parent of worktree
expecting success:
try_case $N/sub/sub "$here/$N/wt" ../../.git \
"$dotdotgit" "$here/$N/wt" "$here/$N/sub/sub" "(null)" &&
try_case $N/sub/sub ../../wt ../../.git \
"$dotdotgit" "$here/$N/wt" "$here/$N/sub/sub" "(null)" &&
try_case $N/sub/sub ../../wt "$here/$N/.git" \
"$absgit" "$here/$N/wt" "$here/$N/sub/sub" "(null)" &&
try_case $N/sub/sub "$here/$N/wt" "$here/$N/.git" \
"$absgit" "$here/$N/wt" "$here/$N/sub/sub" "(null)"
0000000000e4f9fbd19cf1e932319e5ad0d1d00b
Branch remove_sub1 set up to track remote branch remove_sub1 from origin.
0000000000e4f9fbd19cf1e932319e5ad0d1d00b
warning: unable to rmdir sub1: Directory not empty
0000000000e4f9fbd19cf1e932319e5ad0d1d00b
ok 7 - disambiguate commit-ish
expecting success:
commit=$(echo "hoaxj" | git commit-tree 0000000000cdc -p 000000000) &&
# this commit is ffffffd8 and not ambiguous with the 00000* objects
test $(git rev-parse $commit^) = $(git rev-parse 0000000000e4f)
error: inflate: data stream error (incorrect header check)
fatal: loose object 0d3d3508cb204b9201d016862e6025a49e8c01d6 (stored in .git/objects/0d/3d3508cb204b9201d016862e6025a49e8c01d6) is corrupt
ok 54 - fsck --connectivity-only
# passed all 54 test(s)
1..54
ok 8 - disambiguate commit
expecting success:
# These are underspecified from the prefix-length point of view
# to disambiguate the commit with other objects, but there is only
# one commit that has 00000* prefix at this point.
git log 000000000..000000000 &&
git log ..000000000 &&
git log 000000000.. &&
git log 000000000...000000000 &&
git log ...000000000 &&
git log 000000000...
ok 20 - git read-tree -u --reset: removed submodule leaves submodule directory and its contents in place
expecting success:
prolog &&
reset_work_tree_to add_sub1 &&
(
cd submodule_update &&
git branch -t remove_sub1 origin/remove_sub1 &&
replace_gitfile_with_git_dir sub1 &&
$command remove_sub1 &&
test_superproject_content origin/remove_sub1 &&
test_git_directory_is_unchanged sub1 &&
test_submodule_content sub1 origin/add_sub1
)
ok 9 - #3: explicit GIT_WORK_TREE from nephew of worktree
expecting success:
try_case $N "$here" .git \
"$absgit" "$here" "$here" $N/ &&
try_case $N .. .git \
"$absgit" "$here" "$here" $N/ &&
try_case $N .. "$here/$N/.git" \
"$absgit" "$here" "$here" $N/ &&
try_case $N "$here" "$here/$N/.git" \
"$absgit" "$here" "$here" $N/
ok 9 - log name1..name2 takes only commit-ishes on both ends
expecting success:
# Likewise.
git rev-parse 000000000..000000000 &&
git rev-parse ..000000000 &&
git rev-parse 000000000..
0000000000e4f9fbd19cf1e932319e5ad0d1d00b
^0000000000e4f9fbd19cf1e932319e5ad0d1d00b
0000000000e4f9fbd19cf1e932319e5ad0d1d00b
^0000000000e4f9fbd19cf1e932319e5ad0d1d00b
0000000000e4f9fbd19cf1e932319e5ad0d1d00b
^0000000000e4f9fbd19cf1e932319e5ad0d1d00b
ok 10 - rev-parse name1..name2 takes only commit-ishes on both ends
expecting success:
# Likewise.
git log 000000000
commit 0000000000e4f9fbd19cf1e932319e5ad0d1d00b
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
a2onsxbvj
ok 11 - git log takes only commit-ish
expecting success:
# Likewise.
git reset 000000000
Cloning into 'submodule_update'...
ok 12 - git reset takes only commit-ish
expecting success:
# create one tag 0000000000f8f
git tag -a -m j7cp83um v1.0.0
ok 10 - #3: chdir_to_toplevel uses worktree, not git dir
expecting success:
try_case $N/sub/sub "$here" ../../.git \
"$absgit" "$here" "$here" $N/sub/sub/ &&
try_case $N/sub/sub ../../.. ../../.git \
"$absgit" "$here" "$here" $N/sub/sub/ &&
try_case $N/sub/sub ../../../ "$here/$N/.git" \
"$absgit" "$here" "$here" $N/sub/sub/ &&
try_case $N/sub/sub "$here" "$here/$N/.git" \
"$absgit" "$here" "$here" $N/sub/sub/
ok 13 - first tag
checking known breakage:
# At this point, we have a tag 0000000000f8f that points
# at a commit 0000000000e4f, and a tree and a blob that
# share 0000000000 prefix with these tag and commit.
#
# Once the parser becomes ultra-smart, it could notice that
# 0000000000 before ^{commit} name many different objects, but
# that only two (HEAD and v1.0.0 tag) can be peeled to commit,
# and that peeling them down to commit yield the same commit
# without ambiguity.
git rev-parse --verify 0000000000^{commit} &&
# likewise
git log 0000000000..0000000000 &&
git log ..0000000000 &&
git log 0000000000.. &&
git log 0000000000...0000000000 &&
git log ...0000000000 &&
git log 0000000000...
error: short SHA1 0000000000 is ambiguous.
fatal: Needed a single revision
not ok 14 - two semi-ambiguous commit-ish # TODO known breakage
checking known breakage:
# Likewise for tree-ish. HEAD, v1.0.0 and HEAD^{tree} share
# the prefix but peeling them to tree yields the same thing
git rev-parse --verify 0000000000^{tree}
error: short SHA1 0000000000 is ambiguous.
fatal: Needed a single revision
not ok 15 - three semi-ambiguous tree-ish # TODO known breakage
expecting success:
# feed an unambiguous describe name
git rev-parse --verify v1.0.0-0-g0000000000e4f &&
# ambiguous at the object name level, but there is only one
# such commit (others are blob, tree and tag)
git rev-parse --verify v1.0.0-0-g000000000
done.
0000000000e4f9fbd19cf1e932319e5ad0d1d00b
0000000000e4f9fbd19cf1e932319e5ad0d1d00b
ok 16 - parse describe name
expecting success:
# commit 0000000000043
git mv a0blgqsjc d12cr3h8t &&
echo h62xsjeu >>d12cr3h8t &&
git add d12cr3h8t &&
test_tick &&
git commit -m czy8f73t &&
# commit 00000000008ec
git mv d12cr3h8t j000jmpzn &&
echo j08bekfvt >>j000jmpzn &&
git add j000jmpzn &&
test_tick &&
git commit -m ioiley5o &&
# commit 0000000005b0
git checkout v1.0.0^0 &&
git mv a0blgqsjc f5518nwu &&
for i in h62xsjeu j08bekfvt kg7xflhm
do
echo $i
done >>f5518nwu &&
git add f5518nwu &&
test_tick &&
git commit -m b3wettvi &&
side=$(git rev-parse HEAD) &&
# commit 000000000066
git checkout master &&
# If you use recursive, merge will fail and you will need to
# clean up a0blgqsjc as well. If you use resolve, merge will
# succeed.
test_might_fail git merge --no-commit -s recursive $side &&
git rm -f f5518nwu j000jmpzn &&
test_might_fail git rm -f a0blgqsjc &&
(
git cat-file blob $side:f5518nwu
echo j3l0i9s6
) >ab2gs879 &&
git add ab2gs879 &&
test_tick &&
git commit -m ad2uee
Switched to a new branch 'add_sub1'
Branch add_sub1 set up to track remote branch add_sub1 from origin.
[master 00000000000] czy8f73t
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
rename a0blgqsjc => d12cr3h8t (76%)
ok 11 - #3: chdir_to_toplevel uses worktree (from subdir)
expecting success:
setup_repo 4 ../sub "" unset &&
mkdir -p 4/sub sub &&
try_case 4 unset unset \
.git "$here/4/sub" "$here/4" "(null)" \
"$here/4/.git" "$here/4/sub" "$here/4/sub" "(null)" 2>message &&
! test -s message
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1510-repo-setup/4/.git/
[master 00000000008] ioiley5o
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
rename d12cr3h8t => j000jmpzn (79%)
Note: checking out 'v1.0.0^0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 0000000000e... a2onsxbvj
*** t1513-rev-parse-prefix.sh ***
ok 12 - #4: core.worktree without GIT_DIR set is accepted
expecting success:
# or: you cannot intimidate away the lack of GIT_DIR setting
try_repo 5 "$here" unset "$here/5" "" unset \
"$here/5/.git" "$here" "$here" 5/ \
"$here/5/.git" "$here" "$here" 5/sub/ 2>message &&
try_repo 5a .. unset "$here/5a" "" unset \
"$here/5a/.git" "$here" "$here" 5a/ \
"$here/5a/.git" "$here/5a" "$here/5a" sub/ &&
! test -s message
[detached HEAD 0000000005] b3wettvi
Author: A U Thor <author@example.com>
1 file changed, 3 insertions(+)
rename a0blgqsjc => f5518nwu (51%)
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1510-repo-setup/5/.git/
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
0000000005 b3wettvi
If you want to keep it by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> 0000000005
Switched to branch 'master'
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1513-rev-parse-prefix/.git/
expecting success:
mkdir -p sub1/sub2 &&
echo top >top &&
echo file1 >sub1/file1 &&
echo file2 >sub1/sub2/file2 &&
git add top sub1/file1 sub1/sub2/file2 &&
git commit -m commit
Merging:
00000000008 ioiley5o
virtual 0000000005b0d85f595e1a98533157ea161798da
found 1 common ancestor:
0000000000e a2onsxbvj
CONFLICT (rename/rename): Rename "a0blgqsjc"->"j000jmpzn" in branch "HEAD" rename "a0blgqsjc"->"f5518nwu" in "0000000005b0d85f595e1a98533157ea161798da"
Automatic merge failed; fix conflicts and then commit the result.
f5518nwu: needs merge
j000jmpzn: needs merge
rm 'f5518nwu'
rm 'j000jmpzn'
a0blgqsjc: needs merge
rm 'a0blgqsjc'
[master (root-commit) dce83f4] commit
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 sub1/file1
create mode 100644 sub1/sub2/file2
create mode 100644 top
ok 1 - setup
expecting success:
git rev-parse --prefix "" -- top sub1/file1 >actual &&
cat <<-\EOF >expected &&
--
top
sub1/file1
EOF
test_cmp expected actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1510-repo-setup/5a/.git/
Submodule 'sub1' (/«PKGBUILDDIR»/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.) registered for path 'sub1'
ok 2 - empty prefix -- file
expecting success:
git rev-parse --prefix sub1/ -- file1 sub2/file2 >actual &&
cat <<-\EOF >expected &&
--
sub1/file1
sub1/sub2/file2
EOF
test_cmp expected actual
[master 00000000006] ad2uee
Author: A U Thor <author@example.com>
ok 17 - more history
checking known breakage:
# ambiguous at the object name level, but there is only one
# such commit at generation 0
git rev-parse --verify v1.0.0-0-g000000000 &&
# likewise for generation 2 and 4
git rev-parse --verify v1.0.0-2-g000000000 &&
git rev-parse --verify v1.0.0-4-g000000000
fatal: Needed a single revision
not ok 18 - parse describe name taking advantage of generation # TODO known breakage
expecting success:
# ambiguous at the object name level, and there are two such
# commits at generation 1
test_must_fail git rev-parse --verify v1.0.0-1-g000000000
fatal: Needed a single revision
ok 3 - valid prefix -- file
expecting success:
git rev-parse --prefix sub1/ -- ../top sub2/file2 >actual &&
cat <<-\EOF >expected &&
--
sub1/../top
sub1/sub2/file2
EOF
test_cmp expected actual
ok 19 - parse describe name not ignoring ambiguity
expecting success:
# Now there are many commits that begin with the
# common prefix, none of these should pick one at
# random. They all should result in ambiguity errors.
test_must_fail git rev-parse --verify 00000000^{commit} &&
# likewise
test_must_fail git log 000000000..000000000 &&
test_must_fail git log ..000000000 &&
test_must_fail git log 000000000.. &&
test_must_fail git log 000000000...000000000 &&
test_must_fail git log ...000000000 &&
test_must_fail git log 000000000...
error: short SHA1 00000000 is ambiguous.
fatal: Needed a single revision
ok 4 - valid prefix -- ../file
expecting success:
git rev-parse --prefix "" HEAD:./top >actual &&
git rev-parse HEAD:top >expected &&
test_cmp expected actual
ok 13 - #5: core.worktree + GIT_WORK_TREE is accepted
expecting success:
setup_repo 6 "$here/6" "" unset &&
try_case 6 unset .git \
.git "$here/6" "$here/6" "(null)" &&
try_case 6 unset "$here/6/.git" \
"$here/6/.git" "$here/6" "$here/6" "(null)" &&
try_case 6/sub/sub unset ../../.git \
"$here/6/.git" "$here/6" "$here/6" sub/sub/ &&
try_case 6/sub/sub unset "$here/6/.git" \
"$here/6/.git" "$here/6" "$here/6" sub/sub/
error: short SHA1 000000000 is ambiguous.
fatal: ambiguous argument '000000000..000000000': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1510-repo-setup/6/.git/
error: short SHA1 000000000 is ambiguous.
fatal: ambiguous argument '..000000000': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
ok 5 - empty prefix HEAD:./path
expecting success:
git rev-parse --prefix sub1/ HEAD:./file1 >actual &&
git rev-parse HEAD:sub1/file1 >expected &&
test_cmp expected actual
error: short SHA1 000000000 is ambiguous.
fatal: ambiguous argument '000000000..': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
error: short SHA1 000000000 is ambiguous.
fatal: ambiguous argument '000000000...000000000': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Cloning into 'sub1'...
ok 6 - valid prefix HEAD:./path
expecting success:
git rev-parse --prefix sub1/ HEAD:../top >actual &&
git rev-parse HEAD:top >expected &&
test_cmp expected actual
error: short SHA1 000000000 is ambiguous.
fatal: ambiguous argument '...000000000': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
error: short SHA1 000000000 is ambiguous.
fatal: ambiguous argument '000000000...': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
ok 20 - ambiguous commit-ish
expecting success:
# The test creates 16 objects that share the prefix and two
# commits created by commit-tree in earlier tests share a
# different prefix.
git rev-parse --disambiguate=000000000 >actual &&
test $(wc -l <actual) = 16 &&
test "$(sed -e "s/^\(.........\).*/\1/" actual | sort -u)" = 000000000
ok 7 - valid prefix HEAD:../path
expecting success:
git rev-parse --prefix sub1/ HEAD:top >actual &&
git rev-parse HEAD:top >expected &&
test_cmp expected actual
done.
ok 21 - rev-parse --disambiguate
expecting success:
TREE=$(git mktree </dev/null) &&
REF=`git rev-parse HEAD` &&
VAL=$(git commit-tree $TREE </dev/null) &&
git update-ref refs/heads/$REF $VAL &&
test `git rev-parse $REF 2>err` = $REF &&
grep "refname.*${REF}.*ambiguous" err
ok 8 - prefix ignored with HEAD:top
expecting success:
git rev-parse --prefix sub1/ file1 >actual &&
cat <<-\EOF >expected &&
sub1/file1
EOF
test_cmp expected actual
ok 9 - disambiguate path with valid prefix
expecting success:
git rev-parse --prefix sub1/ master file1 >actual &&
cat <<-EOF >expected &&
$(git rev-parse master)
sub1/file1
EOF
test_cmp expected actual
ok 14 - #6: setting GIT_DIR brings core.worktree to life
expecting success:
setup_repo 6b .. "" unset &&
try_case 6b unset .git \
.git "$here/6b" "$here/6b" "(null)" &&
try_case 6b unset "$here/6b/.git" \
"$here/6b/.git" "$here/6b" "$here/6b" "(null)" &&
try_case 6b/sub/sub unset ../../.git \
"$here/6b/.git" "$here/6b" "$here/6b" sub/sub/ &&
try_case 6b/sub/sub unset "$here/6b/.git" \
"$here/6b/.git" "$here/6b" "$here/6b" sub/sub/
ok 10 - file and refs with prefix
expecting success:
git rev-parse --prefix sub1/sub2/ -- file2 >actual &&
cat <<-\EOF >expected &&
--
sub1/sub2/file2
EOF
test_cmp expected actual
warning: refname '0000000000663a70a94c2b280b575855256220fa' is ambiguous.
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1510-repo-setup/6b/.git/
ok 22 - ambiguous 40-hex ref
expecting success:
TREE=$(git mktree </dev/null) &&
REF=`git rev-parse --short HEAD` &&
VAL=$(git commit-tree $TREE </dev/null) &&
git update-ref refs/heads/$REF $VAL &&
test `git rev-parse $REF 2>err` = $VAL &&
grep "refname.*${REF}.*ambiguous" err
ok 11 - two-levels deep
# passed all 11 test(s)
1..11
Submodule path 'sub1': checked out '58630c04cd08e6914ad0ab5a3126bcfb71a3e6ca'
*** t1514-rev-parse-push.sh ***
warning: refname '00000000006' is ambiguous.
ok 23 - ambiguous short sha1 ref
# still have 3 known breakage(s)
# passed all remaining 20 test(s)
1..23
*** t1600-index.sh ***
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1514-rev-parse-push/.git/
ok 15 - #6b: GIT_DIR set, core.worktree relative
expecting success:
setup_repo 6c "$here/6c/wt" "" unset &&
mkdir -p 6c/wt/sub &&
try_case 6c unset .git \
.git "$here/6c/wt" "$here/6c" "(null)" &&
try_case 6c unset "$here/6c/.git" \
"$here/6c/.git" "$here/6c/wt" "$here/6c" "(null)" &&
try_case 6c/sub/sub unset ../../.git \
../../.git "$here/6c/wt" "$here/6c/sub/sub" "(null)" &&
try_case 6c/sub/sub unset "$here/6c/.git" \
"$here/6c/.git" "$here/6c/wt" "$here/6c/sub/sub" "(null)"
Branch remove_sub1 set up to track remote branch remove_sub1 from origin.
expecting success:
git init --bare parent.git &&
git init --bare other.git &&
git remote add origin parent.git &&
git remote add other other.git &&
test_commit base &&
git push origin HEAD &&
git branch --set-upstream-to=origin/master master &&
git branch --track topic origin/master &&
git push origin topic &&
git push other topic
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1514-rev-parse-push/parent.git/
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1510-repo-setup/6c/.git/
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1514-rev-parse-push/other.git/
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1600-index/.git/
expecting success:
echo 1 >a
ok 1 - setup
expecting success:
(
rm -f .git/index &&
GIT_INDEX_VERSION=2bogus &&
export GIT_INDEX_VERSION &&
git add a 2>&1 | sed "s/[0-9]//" >actual.err &&
sed -e "s/ Z$/ /" <<-\EOF >expect.err &&
warning: GIT_INDEX_VERSION set, but the value is invalid.
Using version Z
EOF
test_i18ncmp expect.err actual.err
)
warning: unable to rmdir sub1: Directory not empty
ok 2 - bogus GIT_INDEX_VERSION issues warning
expecting success:
(
rm -f .git/index &&
GIT_INDEX_VERSION=1 &&
export GIT_INDEX_VERSION &&
git add a 2>&1 | sed "s/[0-9]//" >actual.err &&
sed -e "s/ Z$/ /" <<-\EOF >expect.err &&
warning: GIT_INDEX_VERSION set, but the value is invalid.
Using version Z
EOF
test_i18ncmp expect.err actual.err
)
[master (root-commit) d1ff1c9] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 base.t
ok 3 - out of bounds GIT_INDEX_VERSION issues warning
expecting success:
(
GIT_INDEX_VERSION=1 &&
export GIT_INDEX_VERSION &&
git add a 2>actual.err &&
>expect.err &&
test_i18ncmp expect.err actual.err
)
ok 4 - no warning with bogus GIT_INDEX_VERSION and existing index
expecting success:
(
sane_unset GIT_INDEX_VERSION &&
rm -f .git/index &&
git config --add index.version 1 &&
git add a 2>&1 | sed "s/[0-9]//" >actual.err &&
sed -e "s/ Z$/ /" <<-\EOF >expect.err &&
warning: index.version set, but the value is invalid.
Using version Z
EOF
test_i18ncmp expect.err actual.err
)
ok 16 - #6c: GIT_DIR set, core.worktree=../wt (absolute)
expecting success:
setup_repo 6d "$here/6d/wt" "" unset &&
mkdir -p 6d/wt/sub &&
try_case 6d unset .git \
.git "$here/6d/wt" "$here/6d" "(null)" &&
try_case 6d unset "$here/6d/.git" \
"$here/6d/.git" "$here/6d/wt" "$here/6d" "(null)" &&
try_case 6d/sub/sub unset ../../.git \
../../.git "$here/6d/wt" "$here/6d/sub/sub" "(null)" &&
try_case 6d/sub/sub unset "$here/6d/.git" \
"$here/6d/.git" "$here/6d/wt" "$here/6d/sub/sub" "(null)"
ok 5 - out of bounds index.version issues warning
expecting success:
(
rm -f .git/index &&
GIT_INDEX_VERSION=4 &&
export GIT_INDEX_VERSION &&
git config --add index.version 2 &&
git add a 2>&1 &&
echo 4 >expect &&
test-index-version <.git/index >actual &&
test_cmp expect actual
)
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1510-repo-setup/6d/.git/
To parent.git
* [new branch] HEAD -> master
Branch master set up to track remote branch master from origin.
ok 6 - GIT_INDEX_VERSION takes precedence over config
# passed all 6 test(s)
1..6
Branch topic set up to track remote branch master from origin.
ok 21 - git read-tree -u --reset: removed submodule leaves submodule containing a .git directory alone
checking known breakage:
prolog &&
reset_work_tree_to add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_directory origin/replace_sub1_with_directory &&
test_must_fail $command replace_sub1_with_directory &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
*** t1700-split-index.sh ***
To parent.git
* [new branch] topic -> topic
ok 17 - #6d: GIT_DIR set, core.worktree=../wt (relative)
expecting success:
setup_repo 6e "$here" "" unset &&
try_case 6e unset .git \
"$here/6e/.git" "$here" "$here" 6e/ &&
try_case 6e unset "$here/6e/.git" \
"$here/6e/.git" "$here" "$here" 6e/ &&
try_case 6e/sub/sub unset ../../.git \
"$here/6e/.git" "$here" "$here" 6e/sub/sub/ &&
try_case 6e/sub/sub unset "$here/6e/.git" \
"$here/6e/.git" "$here" "$here" 6e/sub/sub/
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1700-split-index/.git/
expecting success:
git update-index --split-index &&
test-dump-split-index .git/index >actual &&
indexversion=$(test-index-version <.git/index) &&
if test "$indexversion" = "4"
then
own=432ef4b63f32193984f339431fd50ca796493569
base=508851a7f0dfa8691e9f69c7f055865389012491
else
own=8299b0bcd1ac364e5f1d7768efb62fa2da79a339
base=39d890139ee5356c7ef572216cebcd27aa41f9df
fi &&
cat >expect <<EOF &&
own $own
base $base
replacements:
deletions:
EOF
test_cmp expect actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1510-repo-setup/6e/.git/
Cloning into 'submodule_update'...
ok 1 - enable split index
expecting success:
: >one &&
git update-index --add one &&
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<EOF &&
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 one
EOF
test_cmp ls-files.expect ls-files.actual &&
test-dump-split-index .git/index | sed "/^own/d" >actual &&
cat >expect <<EOF &&
base $base
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 one
replacements:
deletions:
EOF
test_cmp expect actual
To other.git
* [new branch] topic -> topic
ok 1 - setup
expecting success:
test_config push.default nothing &&
test_must_fail git rev-parse master@{push}
done.
fatal: push has no destination (push.default is 'nothing')
ok 2 - @{push} with default=nothing
expecting success:
test_config push.default simple &&
resolve master@{push} refs/remotes/origin/master
ok 2 - add one file
expecting success:
git update-index --no-split-index &&
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<EOF &&
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 one
EOF
test_cmp ls-files.expect ls-files.actual &&
BASE=`test-dump-split-index .git/index | grep "^own" | sed "s/own/base/"` &&
test-dump-split-index .git/index | sed "/^own/d" >actual &&
cat >expect <<EOF &&
not a split index
EOF
test_cmp expect actual
Switched to a new branch 'add_sub1'
Branch add_sub1 set up to track remote branch add_sub1 from origin.
ok 3 - @{push} with default=simple
expecting success:
test_config push.default simple &&
test_must_fail git rev-parse topic@{push}
ok 18 - #6e: GIT_DIR set, core.worktree=../.. (absolute)
expecting success:
setup_repo 6f ../../ "" unset &&
try_case 6f unset .git \
"$here/6f/.git" "$here" "$here" 6f/ &&
try_case 6f unset "$here/6f/.git" \
"$here/6f/.git" "$here" "$here" 6f/ &&
try_case 6f/sub/sub unset ../../.git \
"$here/6f/.git" "$here" "$here" 6f/sub/sub/ &&
try_case 6f/sub/sub unset "$here/6f/.git" \
"$here/6f/.git" "$here" "$here" 6f/sub/sub/
fatal: cannot resolve 'simple' push to a single destination
ok 3 - disable split index
expecting success:
git update-index --split-index &&
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<EOF &&
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 one
EOF
test_cmp ls-files.expect ls-files.actual &&
test-dump-split-index .git/index | sed "/^own/d" >actual &&
cat >expect <<EOF &&
$BASE
replacements:
deletions:
EOF
test_cmp expect actual
Initialized empty Git repository in /«PKGBUILDDIR»/t/trash directory.t1510-repo-setup/6f/.git/
ok 4 - triangular @{push} fails with default=simple
expecting success:
test_config push.default current &&
resolve topic@{push} refs/remotes/origin/topic
ok 4 - enable split index again, "one" now belongs to base index"
expecting success:
echo modified >one &&
git update-index one &&
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<EOF &&
100644 2e0996000b7e9019eabcad29391bf0f5c7702f0b 0 one
EOF
test_cmp ls-files.expect ls-files.actual &&
test-dump-split-index .git/index | sed "/^own/d" >actual &&
q_to_tab >expect <<EOF &&
$BASE
100644 2e0996000b7e9019eabcad29391bf0f5c7702f0b 0Q
replacements: 0
deletions:
EOF
test_cmp expect actual
ok 5 - @{push} with default=current
expecting success:
test_config push.default matching &&
resolve topic@{push} refs/remotes/origin/topic
ok 6 - @{push} with default=matching
expecting success:
test_config push.default current &&
test_config branch.topic.pushremote other &&
resolve topic@{push} refs/remotes/other/topic
ok 5 - modify original file, base index untouched
expecting success:
: >two &&
git update-index --add two &&
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<EOF &&
100644 2e0996000b7e9019eabcad29391bf0f5c7702f0b 0 one
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 two
EOF
test_cmp ls-files.expect ls-files.actual &&
test-dump-split-index .git/index | sed "/^own/d" >actual &&
q_to_tab >expect <<EOF &a